PartitionSwitchTool Class Reference
Inheritance diagram for PartitionSwitchTool:
Collaboration diagram for PartitionSwitchTool:

Public Member Functions

 PartitionSwitchTool (CSTR typ, CSTR nam, const IInterface *parent)
 Standard constructor. More...
 
virtual ~PartitionSwitchTool ()
 Standard destructor. More...
 
virtual STATUS initialize ()
 Initialize. More...
 
virtual STATUS finalize ()
 Finalize. More...
 
void _check (STATUS sc, CSTR msg) const
 
virtual STATUS create (CSTR nam, CSTR typ)
 Create a partition object. The name identifies the partition uniquely. More...
 
virtual STATUS create (CSTR nam, CSTR typ, IInterface *&pPartition)
 Create a partition object. The name identifies the partition uniquely. More...
 
virtual STATUS drop (CSTR nam)
 Drop a partition object. The name identifies the partition uniquely. More...
 
virtual STATUS drop (IInterface *pPartition)
 Drop a partition object. The name identifies the partition uniquely. More...
 
virtual STATUS activate (CSTR nam)
 Activate a partition object. The name identifies the partition uniquely. More...
 
virtual STATUS activate (IInterface *pPartition)
 Activate a partition object. More...
 
virtual STATUS get (CSTR nam, IInterface *&pPartition) const
 Access a partition object. The name identifies the partition uniquely. More...
 
virtual STATUS activePartition (std::string &nam, IInterface *&pPartition) const
 Access the active partition object. More...
 
- Public Member Functions inherited from extends1< AlgTool, IPartitionControl >
 extends1 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments. More...
 
 extends1 (A1 a1, A2 a2)
 Templated constructor with 2 arguments. More...
 
 extends1 (A1 a1)
 Templated constructor with 1 argument. More...
 
 extends1 ()
 Default constructor. More...
 
 extends1 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments. More...
 
 extends1 (A1 a1, A2 a2)
 Templated constructor with 2 arguments. More...
 
 extends1 (A1 a1)
 Templated constructor with 1 argument. More...
 
 extends1 ()
 Default constructor. More...
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast. More...
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface. More...
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames. More...
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames. More...
 
virtual ~extends1 ()
 Virtual destructor. More...
 
virtual ~extends1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from AlgTool
virtual const std::string & name () const
 Retrieve full identifying name of the concrete tool object. More...
 
virtual const std::string & type () const
 Retrieve type (concrete class) of the sub-algtool. More...
 
virtual const IInterfaceparent () const
 Retrieve parent of the sub-algtool. More...
 
virtual StatusCode configure ()
 Configuration (from OFFLINE to CONFIGURED). More...
 
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING). More...
 
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED). More...
 
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE). More...
 
virtual StatusCode reinitialize ()
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
 
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state. More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
virtual StatusCode sysInitialize ()
 Initialize AlgTool. More...
 
virtual StatusCode sysStart ()
 Start AlgTool. More...
 
virtual StatusCode sysStop ()
 Stop AlgTool. More...
 
virtual StatusCode sysFinalize ()
 Finalize AlgTool. More...
 
virtual StatusCode sysReinitialize ()
 Initialize AlgTool. More...
 
virtual StatusCode sysRestart ()
 Start AlgTool. More...
 
virtual StatusCode setProperty (const Property &p)
 Default implementations for IProperty interface. More...
 
virtual StatusCode setProperty (const std::string &s)
 Set the property by string. More...
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Set the property by std::string. More...
 
virtual StatusCode getProperty (Property *p) const
 Get the property by property. More...
 
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name. More...
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Get the property by std::string. More...
 
virtual const std::vector< Property * > & getProperties () const
 Get list of properties. More...
 
virtual bool hasProperty (const std::string &name) const
 Return true if we have a property with the given name. More...
 
PropertyMgrgetPropertyMgr ()
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
 AlgTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard Constructor. More...
 
ISvcLocatorserviceLocator () const
 Retrieve pointer to service locator. More...
 
ISvcLocatorsvcLoc () const
 shortcut for the method service locator More...
 
IMessageSvcmsgSvc () const
 Retrieve pointer to message service. More...
 
IToolSvctoolSvc () const
 The standard ToolSvc service, Return a pointer to the service if present. More...
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified in the jobOptions via the job option service. More...
 
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. More...
 
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. More...
 
SmartIF< IServiceservice (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") More...
 
void declInterface (const InterfaceID &, void *)
 declare interface More...
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
IAuditorSvcauditorSvc () const
 Access the auditor service. More...
 
IMonitorSvcmonitorSvc () const
 Access the monitor service. More...
 
template<class T >
void declareInfo (const std::string &name, const T &var, const std::string &desc) const
 Declare monitoring information. More...
 
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) More...
 
virtual const std::string & name () const
 Retrieve full identifying name of the concrete tool object. More...
 
virtual const std::string & type () const
 Retrieve type (concrete class) of the sub-algtool. More...
 
virtual const IInterfaceparent () const
 Retrieve parent of the sub-algtool. More...
 
virtual StatusCode configure ()
 Configuration (from OFFLINE to CONFIGURED). More...
 
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING). More...
 
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED). More...
 
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE). More...
 
virtual StatusCode reinitialize ()
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
 
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state. More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
virtual StatusCode sysInitialize ()
 Initialize AlgTool. More...
 
virtual StatusCode sysStart ()
 Start AlgTool. More...
 
virtual StatusCode sysStop ()
 Stop AlgTool. More...
 
virtual StatusCode sysFinalize ()
 Finalize AlgTool. More...
 
virtual StatusCode sysReinitialize ()
 Initialize AlgTool. More...
 
virtual StatusCode sysRestart ()
 Start AlgTool. More...
 
virtual StatusCode setProperty (const Property &p)
 Default implementations for IProperty interface. More...
 
virtual StatusCode setProperty (const std::string &s)
 Set the property by string. More...
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Set the property by std::string. More...
 
virtual StatusCode getProperty (Property *p) const
 Get the property by property. More...
 
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name. More...
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Get the property by std::string. More...
 
virtual const std::vector< Property * > & getProperties () const
 Get list of properties. More...
 
virtual bool hasProperty (const std::string &name) const
 Return true if we have a property with the given name. More...
 
PropertyMgrgetPropertyMgr ()
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
 AlgTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard Constructor. More...
 
ISvcLocatorserviceLocator () const
 Retrieve pointer to service locator. More...
 
ISvcLocatorsvcLoc () const
 shortcut for the method service locator More...
 
IMessageSvcmsgSvc () const
 Retrieve pointer to message service. More...
 
IToolSvctoolSvc () const
 The standard ToolSvc service, Return a pointer to the service if present. More...
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified in the jobOptions via the job option service. More...
 
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. More...
 
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. More...
 
SmartIF< IServiceservice (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") More...
 
void declInterface (const InterfaceID &, void *)
 declare interface More...
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
IAuditorSvcauditorSvc () const
 Access the auditor service. More...
 
IMonitorSvcmonitorSvc () const
 Access the monitor service. More...
 
template<class T >
void declareInfo (const std::string &name, const T &var, const std::string &desc) const
 Declare monitoring information. More...
 
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) More...
 
- Public Member Functions inherited from extend_interfaces3< IAlgTool, IProperty, IStateful >
virtual ~extend_interfaces3 ()
 Virtual destructor. More...
 
virtual ~extend_interfaces3 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IAlgTool
 DeclareInterfaceID (IAlgTool, 3, 0)
 InterfaceID. More...
 
virtual ~IAlgTool ()
 Virtual destructor. More...
 
virtual unsigned long refCount () const =0
 Current number of reference counts. More...
 
 DeclareInterfaceID (IAlgTool, 3, 0)
 InterfaceID. More...
 
virtual ~IAlgTool ()
 Virtual destructor. More...
 
virtual unsigned long refCount () const =0
 Current number of reference counts. More...
 
- Public Member Functions inherited from INamedInterface
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID. More...
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes). More...
 
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID. More...
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes). More...
 
- Public Member Functions inherited from IInterface
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long release ()=0
 Release Interface instance. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long release ()=0
 Release Interface instance. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IProperty
 DeclareInterfaceID (IProperty, 2, 1)
 InterfaceID. More...
 
 DeclareInterfaceID (IProperty, 2, 1)
 InterfaceID. More...
 
- Public Member Functions inherited from IStateful
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 
- Public Member Functions inherited from extend_interfaces1< IPartitionControl >
virtual ~extend_interfaces1 ()
 Virtual destructor. More...
 
virtual ~extend_interfaces1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IPartitionControl
 DeclareInterfaceID (IPartitionControl, 1, 0)
 InterfaceID. More...
 
virtual StatusCode create (const std::string &name, const std::string &type)=0
 Create a partition object. The name identifies the partition uniquely. More...
 
virtual StatusCode create (const std::string &name, const std::string &type, IInterface *&pPartition)=0
 Create a partition object. The name identifies the partition uniquely. More...
 
virtual StatusCode drop (const std::string &name)=0
 Drop a partition object. The name identifies the partition uniquely. More...
 
virtual StatusCode activate (const std::string &name)=0
 Activate a partition object. The name identifies the partition uniquely. More...
 
virtual StatusCode get (const std::string &name, IInterface *&pPartition) const =0
 Access a partition object. The name identifies the partition uniquely. More...
 
 DeclareInterfaceID (IPartitionControl, 1, 0)
 InterfaceID. More...
 
virtual StatusCode create (const std::string &name, const std::string &type)=0
 Create a partition object. The name identifies the partition uniquely. More...
 
virtual StatusCode create (const std::string &name, const std::string &type, IInterface *&pPartition)=0
 Create a partition object. The name identifies the partition uniquely. More...
 
virtual StatusCode drop (const std::string &name)=0
 Drop a partition object. The name identifies the partition uniquely. More...
 
virtual StatusCode activate (const std::string &name)=0
 Activate a partition object. The name identifies the partition uniquely. More...
 
virtual StatusCode get (const std::string &name, IInterface *&pPartition) const =0
 Access a partition object. The name identifies the partition uniquely. More...
 

Private Types

typedef const std::string & CSTR
 
typedef StatusCode STATUS
 

Private Attributes

std::string m_actorName
 Job option to set the multi-service name. More...
 
SmartIF< IPartitionControlm_actor
 reference to Partition Controller More...
 

Additional Inherited Members

- Public Types inherited from extends1< AlgTool, IPartitionControl >
typedef extends1 base_class
 Typedef to this class. More...
 
typedef extends1 base_class
 Typedef to this class. More...
 
typedef extend_interfaces1< IPartitionControlextend_interfaces_base
 Typedef to the base of this class. More...
 
typedef extend_interfaces1< IPartitionControlextend_interfaces_base
 Typedef to the base of this class. More...
 
typedef extend_interfaces_base::ext_iids interfaces
 MPL set of all the implemented interfaces. More...
 
typedef extend_interfaces_base::ext_iids interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from AlgTool
typedef Gaudi::PluginService::Factory< IAlgTool *, const std::string &, const std::string &, const IInterface * > Factory
 
typedef Gaudi::PluginService::Factory< IAlgTool *, const std::string &, const std::string &, const IInterface * > Factory
 
- Public Types inherited from implements3< IAlgTool, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class. More...
 
typedef implements3 base_class
 Typedef to this class. More...
 
typedef extend_interfaces3< IAlgTool, IProperty, IStatefulextend_interfaces_base
 Typedef to the base of this class. More...
 
typedef extend_interfaces3< IAlgTool, IProperty, IStatefulextend_interfaces_base
 Typedef to the base of this class. More...
 
typedef extend_interfaces_base::ext_iids interfaces
 MPL set of all the implemented interfaces. More...
 
typedef extend_interfaces_base::ext_iids interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces3< IAlgTool, IProperty, IStateful >
typedef mpl::fold< typename IAlgTool::iid::iids::type, typename mpl::fold< typename IProperty::iid::iids::type, typename IStateful::iid::iids::type, mpl::insert< mpl::_1, mpl::_2 > >::type, mpl::insert< mpl::_1, mpl::_2 > >::type ext_iids
 MPL set of interfaces extended by this one. More...
 
typedef mpl::fold< typename IAlgTool::iid::iids::type, typename mpl::fold< typename IProperty::iid::iids::type, typename IStateful::iid::iids::type, mpl::insert< mpl::_1, mpl::_2 > >::type, mpl::insert< mpl::_1, mpl::_2 > >::type ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IInterface
enum  Status {
  SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR,
  SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR
}
 Return status. More...
 
enum  Status {
  SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR,
  SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR
}
 Return status. More...
 
typedef Gaudi::InterfaceId< IInterface, 0, 0 > iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
typedef Gaudi::InterfaceId< IInterface, 0, 0 > iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
- Public Types inherited from extend_interfaces1< IPartitionControl >
typedef IPartitionControl::iid::iids::type ext_iids
 MPL set of interfaces extended by this one. More...
 
typedef IPartitionControl::iid::iids::type ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IPartitionControl
enum  { PARTITION_NOT_PRESENT = 2, PARTITION_EXISTS = 4, NO_ACTIVE_PARTITION = 6 }
 
enum  { PARTITION_NOT_PRESENT = 2, PARTITION_EXISTS = 4, NO_ACTIVE_PARTITION = 6 }
 
- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 
- Protected Member Functions inherited from AlgTool
int outputLevel () const
 get tool's output level More...
 
IntegerPropertyoutputLevelProperty ()
 Accessor for the Message level property. More...
 
void initOutputLevel (Property &prop)
 callback for output level property More...
 
virtual ~AlgTool ()
 
int outputLevel () const
 get tool's output level More...
 
IntegerPropertyoutputLevelProperty ()
 Accessor for the Message level property. More...
 
void initOutputLevel (Property &prop)
 callback for output level property More...
 
virtual ~AlgTool ()
 

Detailed Description

Author
Markus Frank
Date
2004-06-24

Definition at line 13 of file PartitionSwitchTool.cpp.

Member Typedef Documentation

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

Definition at line 15 of file PartitionSwitchTool.cpp.

Definition at line 16 of file PartitionSwitchTool.cpp.

Constructor & Destructor Documentation

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

Standard constructor.

Definition at line 28 of file PartitionSwitchTool.cpp.

29  : base_class(typ, nam , parent)
30  {
31  declareProperty("Actor", m_actorName = "EventDataService");
32  }
extends1 base_class
Typedef to this class.
Definition: extends.h:12
std::string m_actorName
Job option to set the multi-service name.
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: AlgTool.h:235
virtual PartitionSwitchTool::~PartitionSwitchTool ( )
inlinevirtual

Standard destructor.

Definition at line 34 of file PartitionSwitchTool.cpp.

34  {
35  m_actor = 0;
36  }
SmartIF< IPartitionControl > m_actor
reference to Partition Controller

Member Function Documentation

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

Definition at line 64 of file PartitionSwitchTool.cpp.

64  {
65  MsgStream log(msgSvc(), name());
66  log << MSG::ERROR << msg << " Status=" << sc.getCode() << endmsg;
67  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
unsigned long getCode() const
Get the status code by value.
Definition: StatusCode.h:92
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
IMessageSvc * msgSvc() const
Retrieve pointer to message service.
Definition: AlgTool.cpp:79
virtual const std::string & name() const
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:51
virtual STATUS PartitionSwitchTool::activate ( CSTR  nam)
inlinevirtual

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

Definition at line 91 of file PartitionSwitchTool.cpp.

91  {
93  CHECK(sc, "Cannot activate partition: "+nam);
94  }
#define CHECK(x, y)
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Requested interface is not available.
Definition: IInterface.h:221
virtual StatusCode activate(const std::string &name)=0
Activate a partition object. The name identifies the partition uniquely.
virtual STATUS PartitionSwitchTool::activate ( IInterface pPartition)
inlinevirtual

Activate a partition object.

Implements IPartitionControl.

Definition at line 96 of file PartitionSwitchTool.cpp.

96  {
97  STATUS sc = m_actor ? m_actor->activate(pPartition) : NO_INTERFACE;
98  CHECK(sc, "Cannot activate partition by Interface.");
99  }
#define CHECK(x, y)
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Requested interface is not available.
Definition: IInterface.h:221
virtual StatusCode activate(const std::string &name)=0
Activate a partition object. The name identifies the partition uniquely.
virtual STATUS PartitionSwitchTool::activePartition ( std::string &  nam,
IInterface *&  pPartition 
) const
inlinevirtual

Access the active partition object.

Implements IPartitionControl.

Definition at line 106 of file PartitionSwitchTool.cpp.

106  {
107  STATUS sc = m_actor ? m_actor->activePartition(nam, pPartition) : NO_INTERFACE;
108  CHECK(sc, "Cannot determine active partition.");
109  }
virtual StatusCode activePartition(std::string &name, IInterface *&pPartition) const =0
Access the active partition object.
#define CHECK(x, y)
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Requested interface is not available.
Definition: IInterface.h:221
virtual STATUS PartitionSwitchTool::create ( CSTR  nam,
CSTR  typ 
)
inlinevirtual

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

Definition at line 71 of file PartitionSwitchTool.cpp.

71  {
72  STATUS sc = m_actor ? m_actor->create(nam,typ) : NO_INTERFACE;
73  CHECK(sc, "Cannot create partition: "+nam+" of type "+typ);
74  }
virtual StatusCode create(const std::string &name, const std::string &type)=0
Create a partition object. The name identifies the partition uniquely.
#define CHECK(x, y)
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Requested interface is not available.
Definition: IInterface.h:221
virtual STATUS PartitionSwitchTool::create ( CSTR  nam,
CSTR  typ,
IInterface *&  pPartition 
)
inlinevirtual

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

Definition at line 76 of file PartitionSwitchTool.cpp.

76  {
77  STATUS sc = m_actor ? m_actor->create(nam,typ,pPartition) : NO_INTERFACE;
78  CHECK(sc, "Cannot create partition: "+nam+" of type "+typ);
79  }
virtual StatusCode create(const std::string &name, const std::string &type)=0
Create a partition object. The name identifies the partition uniquely.
#define CHECK(x, y)
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Requested interface is not available.
Definition: IInterface.h:221
virtual STATUS PartitionSwitchTool::drop ( CSTR  nam)
inlinevirtual

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

Definition at line 81 of file PartitionSwitchTool.cpp.

81  {
83  CHECK(sc, "Cannot drop partition: "+nam);
84  }
#define CHECK(x, y)
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Requested interface is not available.
Definition: IInterface.h:221
virtual StatusCode drop(const std::string &name)=0
Drop a partition object. The name identifies the partition uniquely.
virtual STATUS PartitionSwitchTool::drop ( IInterface pPartition)
inlinevirtual

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

Implements IPartitionControl.

Definition at line 86 of file PartitionSwitchTool.cpp.

86  {
87  STATUS sc = m_actor ? m_actor->drop(pPartition) : NO_INTERFACE;
88  CHECK(sc, "Cannot drop partition by Interface.");
89  }
#define CHECK(x, y)
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Requested interface is not available.
Definition: IInterface.h:221
virtual StatusCode drop(const std::string &name)=0
Drop a partition object. The name identifies the partition uniquely.
virtual STATUS PartitionSwitchTool::finalize ( )
inlinevirtual

Finalize.

Reimplemented from AlgTool.

Definition at line 59 of file PartitionSwitchTool.cpp.

59  {
60  m_actor = 0;
61  return AlgTool::finalize();
62  }
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
Definition: AlgTool.cpp:438
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
virtual STATUS PartitionSwitchTool::get ( CSTR  nam,
IInterface *&  pPartition 
) const
inlinevirtual

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

Definition at line 101 of file PartitionSwitchTool.cpp.

101  {
102  STATUS sc = m_actor ? m_actor->get(nam, pPartition) : NO_INTERFACE;
103  CHECK(sc, "Cannot get partition "+nam);
104  }
#define CHECK(x, y)
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Requested interface is not available.
Definition: IInterface.h:221
virtual StatusCode get(const std::string &name, IInterface *&pPartition) const =0
Access a partition object. The name identifies the partition uniquely.
virtual STATUS PartitionSwitchTool::initialize ( )
inlinevirtual

Initialize.

Access partitioned multi-service

Reimplemented from AlgTool.

Definition at line 39 of file PartitionSwitchTool.cpp.

39  {
42  MsgStream log(msgSvc(), name());
43  if ( !sc.isSuccess() ) {
44  log << MSG::ERROR << "Cannot initialize base class!" << endmsg;
45  return sc;
46  }
47  m_actor = 0;
48  IPartitionControl* tmpPtr = 0;
49  sc = service(m_actorName, tmpPtr);
50  m_actor = tmpPtr;
51  if ( !sc.isSuccess() ) {
52  log << MSG::ERROR << "Cannot retrieve partition controller \""
53  << m_actorName << "\"!" << endmsg;
54  return sc;
55  }
56  return sc;
57  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
std::string m_actorName
Job option to set the multi-service name.
IMessageSvc * msgSvc() const
Retrieve pointer to message service.
Definition: AlgTool.cpp:79
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
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.
Definition: AlgTool.h:180
Create / access partitions.
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
Definition: AlgTool.cpp:311
virtual const std::string & name() const
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:51

Member Data Documentation

SmartIF<IPartitionControl> PartitionSwitchTool::m_actor
private

reference to Partition Controller

Definition at line 23 of file PartitionSwitchTool.cpp.

std::string PartitionSwitchTool::m_actorName
private

Job option to set the multi-service name.

Definition at line 21 of file PartitionSwitchTool.cpp.


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