| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Types | Private Attributes | List of all members
PartitionSwitchTool Class Reference
Inheritance diagram for PartitionSwitchTool:
[legend]
Collaboration diagram for PartitionSwitchTool:
[legend]

## Public Member Functions
| PartitionSwitchTool (CSTR typ, CSTR nam, const IInterface *parent)
| Standard constructor.
virtual | ~PartitionSwitchTool ()
| Standard destructor.
virtual STATUS | initialize ()
| Initialize.
virtual STATUS | finalize ()
| Finalize.
void | _check (STATUS sc, CSTR msg) const
virtual STATUS | create (CSTR nam, CSTR typ)
| Create a partition object. The name identifies the partition uniquely.
virtual STATUS | create (CSTR nam, CSTR typ, IInterface *&pPartition)
| Create a partition object. The name identifies the partition uniquely.
virtual STATUS | drop (CSTR nam)
| Drop a partition object. The name identifies the partition uniquely.
virtual STATUS | drop (IInterface *pPartition)
| Drop a partition object. The name identifies the partition uniquely.
virtual STATUS | activate (CSTR nam)
| Activate a partition object. The name identifies the partition uniquely.
virtual STATUS | activate (IInterface *pPartition)
| Activate a partition object.
virtual STATUS | get (CSTR nam, IInterface *&pPartition) const
| Access a partition object. The name identifies the partition uniquely.
virtual STATUS | activePartition (std::string &nam, IInterface *&pPartition) const
| Access the active partition object.
Public Member Functions inherited from extends1< AlgTool, IPartitionControl >
| extends1 (A1 a1, A2 a2, A3 a3)
| Templated constructor with 3 arguments.
| extends1 (A1 a1, A2 a2)
| Templated constructor with 2 arguments.
| extends1 (A1 a1)
| Templated constructor with 1 argument.
| extends1 ()
| Default constructor.
virtual void * | i_cast (const InterfaceID &tid) const
| Implementation of IInterface::i_cast.
virtual StatusCode | queryInterface (const InterfaceID &ti, void **pp)
| Implementation of IInterface::queryInterface.
virtual std::vector< std::string > | getInterfaceNames () const
| Implementation of IInterface::getInterfaceNames.
virtual | ~extends1 ()
| Virtual destructor.
Public Member Functions inherited from AlgTool
virtual const std::string & | name () const
| Retrieve full identifying name of the concrete tool object.
virtual const std::string & | type () const
| Retrieve type (concrete class) of the sub-algtool.
virtual const IInterface * | parent () const
| Retrieve parent of the sub-algtool.
virtual StatusCode | configure ()
virtual StatusCode | start ()
virtual StatusCode | stop ()
virtual StatusCode | terminate ()
virtual StatusCode | reinitialize ()
virtual StatusCode | restart ()
virtual Gaudi::StateMachine::State | FSMState () const
virtual Gaudi::StateMachine::State | targetFSMState () const
virtual StatusCode | sysInitialize ()
| Initialize AlgTool.
virtual StatusCode | sysStart ()
| Start AlgTool.
virtual StatusCode | sysStop ()
| Stop AlgTool.
virtual StatusCode | sysFinalize ()
| Finalize AlgTool.
virtual StatusCode | sysReinitialize ()
| Initialize AlgTool.
virtual StatusCode | sysRestart ()
| Start AlgTool.
virtual StatusCode | setProperty (const Property &p)
| Default implementations for IProperty interface.
virtual StatusCode | setProperty (const std::string &s)
virtual StatusCode | setProperty (const std::string &n, const std::string &v)
virtual StatusCode | getProperty (Property *p) const
virtual const Property & | getProperty (const std::string &name) const
virtual StatusCode | getProperty (const std::string &n, std::string &v) const
virtual const std::vector < Property * > & | getProperties () const
PropertyMgr * | getPropertyMgr ()
template<class TYPE >
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value
| AlgTool (const std::string &type, const std::string &name, const IInterface *parent)
| Standard Constructor.
ISvcLocator * | serviceLocator () const
| Retrieve pointer to service locator.
ISvcLocator * | svcLoc () const
| shortcut for the method service locator
IMessageSvc * | msgSvc () const
| Retrieve pointer to message service.
IToolSvc * | toolSvc () const
| The standard ToolSvc service, Return a pointer to the service if present.
StatusCode | setProperties ()
| Method for setting declared properties to the values specified in the jobOptions via the job option service.
template<class T >
StatusCode | service (const std::string &name, T *&svc, bool createIf=true) const
| Access a service by name, creating it if it doesn't already exist.
template<class T >
StatusCode | service (const std::string &type, const std::string &name, T *&svc) const
| Access a service by name, type creating it if it doesn't already exist.
SmartIF< IService > | service (const std::string &name, const bool createIf=true, const bool quiet=false) const
| Return a pointer to the service identified by name (or "type/name")
void | declInterface (const InterfaceID &, void *)
| declare interface
template<class T >
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const
| Declare the named property.
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
| Declare remote named properties.
IAuditorSvc * | auditorSvc () const
| Access the auditor service.
IMonitorSvc * | monitorSvc () const
| Access the monitor service.
template<class T >
void | declareInfo (const std::string &name, const T &var, const std::string &desc) const
| Declare monitoring information.
void | declareInfo (const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const
| Declare monitoring information (special case)
Public Member Functions inherited from extend_interfaces1< IPartitionControl >
virtual | ~extend_interfaces1 ()
| Virtual destructor.
Public Member Functions inherited from IPartitionControl
| DeclareInterfaceID (IPartitionControl, 1, 0)
| InterfaceID.
virtual StatusCode | create (const std::string &name, const std::string &type)=0
| Create a partition object. The name identifies the partition uniquely.
virtual StatusCode | create (const std::string &name, const std::string &type, IInterface *&pPartition)=0
| Create a partition object. The name identifies the partition uniquely.
virtual StatusCode | drop (const std::string &name)=0
| Drop a partition object. The name identifies the partition uniquely.
virtual StatusCode | activate (const std::string &name)=0
| Activate a partition object. The name identifies the partition uniquely.
virtual StatusCode | get (const std::string &name, IInterface *&pPartition) const =0
| Access a partition object. The name identifies the partition uniquely.
Public Member Functions inherited from IInterface
virtual unsigned long | addRef ()=0
| Increment the reference count of Interface instance.
virtual unsigned long | release ()=0
| Release Interface instance.
virtual unsigned long | refCount () const =0
| Current reference count.
virtual | ~IInterface ()
| Virtual destructor.

## Private Types
typedef const std::string & | CSTR
typedef StatusCode | STATUS

## Private Attributes
std::string | m_actorName
| Job option to set the multi-service name.
SmartIF< IPartitionControl > | m_actor
| reference to Partition Controller

## Additional Inherited Members
Public Types inherited from extends1< AlgTool, IPartitionControl >
typedef extends1 | base_class
| Typedef to this class.
typedef extend_interfaces1 < IPartitionControl > | extend_interfaces_base
| Typedef to the base of this class.
typedef extend_interfaces_base::ext_iids | interfaces
| MPL set of all the implemented interfaces.
Static Public Member Functions inherited from IInterface
static const InterfaceID & | interfaceID ()
| Return an instance of InterfaceID identifying the interface.
Protected Member Functions inherited from AlgTool
int | outputLevel () const
| get tool's output level
IntegerProperty & | outputLevelProperty ()
| Accessor for the Message level property.
void | initOutputLevel (Property &prop)
| callback for output level property
virtual | ~AlgTool ()

## Detailed Description

Author
  Markus Frank

Date
  2004-06-24

Definition at line 16 of file PartitionSwitchTool.cpp.

## Member Typedef Documentation

typedef const std::string& PartitionSwitchTool::CSTR
| private

Definition at line 18 of file PartitionSwitchTool.cpp.

typedef StatusCode PartitionSwitchTool::STATUS
| private

Definition at line 19 of file PartitionSwitchTool.cpp.

## Constructor & Destructor Documentation

PartitionSwitchTool::PartitionSwitchTool | ( | CSTR | typ,
|  | CSTR | nam,
|  | const IInterface * | parent
| ) |  |
| inline

Standard constructor.

Definition at line 31 of file PartitionSwitchTool.cpp.

: base_class(typ, nam , parent)
{
declareProperty("Actor", m_actorName = "EventDataService");
}

virtual PartitionSwitchTool::~PartitionSwitchTool | ( |  | ) |
| inline virtual

Standard destructor.

Definition at line 37 of file PartitionSwitchTool.cpp.

{
m_actor = 0;
}

## Member Function Documentation

void PartitionSwitchTool::_check | ( | STATUS | sc,
|  | CSTR | msg
| ) |  | const
| inline

Definition at line 67 of file PartitionSwitchTool.cpp.

{
MsgStream log(msgSvc(), name());
log << MSG::ERROR << msg << " Status=" << sc.getCode() << endmsg;
}

virtual STATUS PartitionSwitchTool::activate | ( | CSTR | nam | ) |
| inline virtual

Activate a partition object. The name identifies the partition uniquely.

Definition at line 94 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->activate(nam) : NO_INTERFACE;
CHECK(sc, "Cannot activate partition: "+nam);
}

virtual STATUS PartitionSwitchTool::activate | ( | IInterface * | pPartition | ) |
| inline virtual

Activate a partition object.

Implements IPartitionControl.

Definition at line 99 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->activate(pPartition) : NO_INTERFACE;
CHECK(sc, "Cannot activate partition by Interface.");
}

virtual STATUS PartitionSwitchTool::activePartition | ( | std::string & | nam,
|  | IInterface *& | pPartition
| ) |  | const
| inline virtual

Access the active partition object.

Implements IPartitionControl.

Definition at line 109 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->activePartition(nam, pPartition) : NO_INTERFACE;
CHECK(sc, "Cannot determine active partition.");
}

virtual STATUS PartitionSwitchTool::create | ( | CSTR | nam,
|  | CSTR | typ
| ) |  |
| inline virtual

Create a partition object. The name identifies the partition uniquely.

Definition at line 74 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->create(nam,typ) : NO_INTERFACE;
CHECK(sc, "Cannot create partition: "+nam+" of type "+typ);
}

virtual STATUS PartitionSwitchTool::create | ( | CSTR | nam,
|  | CSTR | typ,
|  | IInterface *& | pPartition
| ) |  |
| inline virtual

Create a partition object. The name identifies the partition uniquely.

Definition at line 79 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->create(nam,typ,pPartition) : NO_INTERFACE;
CHECK(sc, "Cannot create partition: "+nam+" of type "+typ);
}

virtual STATUS PartitionSwitchTool::drop | ( | CSTR | nam | ) |
| inline virtual

Drop a partition object. The name identifies the partition uniquely.

Definition at line 84 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->drop(nam) : NO_INTERFACE;
CHECK(sc, "Cannot drop partition: "+nam);
}

virtual STATUS PartitionSwitchTool::drop | ( | IInterface * | pPartition | ) |
| inline virtual

Drop a partition object. The name identifies the partition uniquely.

Implements IPartitionControl.

Definition at line 89 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->drop(pPartition) : NO_INTERFACE;
CHECK(sc, "Cannot drop partition by Interface.");
}

virtual STATUS PartitionSwitchTool::finalize | ( |  | ) |
| inline virtual

Finalize.

Reimplemented from AlgTool.

Definition at line 62 of file PartitionSwitchTool.cpp.

{
m_actor = 0;
return AlgTool::finalize();
}

virtual STATUS PartitionSwitchTool::get | ( | CSTR | nam,
|  | IInterface *& | pPartition
| ) |  | const
| inline virtual

Access a partition object. The name identifies the partition uniquely.

Definition at line 104 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->get(nam, pPartition) : NO_INTERFACE;
CHECK(sc, "Cannot get partition "+nam);
}

virtual STATUS PartitionSwitchTool::initialize | ( |  | ) |
| inline virtual

Initialize.

Access partitioned multi-service

Reimplemented from AlgTool.

Definition at line 42 of file PartitionSwitchTool.cpp.

{
STATUS sc = AlgTool::initialize();
MsgStream log(msgSvc(), name());
if ( !sc.isSuccess() ) {
log << MSG::ERROR << "Cannot initialize base class!" << endmsg;
return sc;
}
m_actor = 0;
IPartitionControl* tmpPtr = 0;
sc = service(m_actorName, tmpPtr);
m_actor = tmpPtr;
if ( !sc.isSuccess() ) {
log << MSG::ERROR << "Cannot retrieve partition controller \""
<< m_actorName << "\"!" << endmsg;
return sc;
}
return sc;
}

## Member Data Documentation

SmartIF<IPartitionControl> PartitionSwitchTool::m_actor
| private

reference to Partition Controller

Definition at line 26 of file PartitionSwitchTool.cpp.

std::string PartitionSwitchTool::m_actorName
| private

Job option to set the multi-service name.

Definition at line 24 of file PartitionSwitchTool.cpp.

The documentation for this class was generated from the following file:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiCommonSvc/src/DataSvc/PartitionSwitchTool.cpp