27 typedef const std::string&
CSTR;
57 log <<
MSG::ERROR <<
"Unable to load PartitionSwitchTool "
62 if ( tool )
toolSvc()->releaseTool(tool);
67 log <<
MSG::ERROR <<
"Cannot access partition \""
76 if ( tool )
toolSvc()->releaseTool(tool);
87 log <<
MSG::ERROR <<
"Cannot activate partition \""
102 #define CHECK(x,y) if ( !x.isSuccess() ) _check(x, y); return x;
107 CHECK(sc,
"Cannot create partition: "+nam+
" of type "+typ);
112 CHECK(sc,
"Cannot create partition: "+nam+
" of type "+typ);
117 CHECK(sc,
"Cannot drop partition: "+nam);
122 CHECK(sc,
"Cannot drop partition by Interface.");
127 CHECK(sc,
"Cannot activate partition: "+nam);
132 CHECK(sc,
"Cannot activate partition by Interface.");
137 CHECK(sc,
"Cannot get partition "+nam);
142 CHECK(sc,
"Cannot determine active partition.");
virtual STATUS execute()
Execute procedure.
Definition of the MsgStream class used to transmit messages.
Small smart pointer class with automatic reference counting for IInterface.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
virtual StatusCode activePartition(std::string &name, IInterface *&pPartition) const =0
Access the active partition object.
virtual STATUS activePartition(std::string &nam, IInterface *&pPartition) const
Access the active partition object.
unsigned long getCode() const
Get the status code by value.
Requested interface is not available.
bool isSuccess() const
Test for a status code of SUCCESS.
virtual STATUS finalize()
Finalize.
virtual STATUS initialize()
Initialize.
virtual StatusCode create(const std::string &name, const std::string &type)=0
Create a partition object. The name identifies the partition uniquely.
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
virtual STATUS activate(CSTR nam)
Activate a partition object. The name identifies the partition uniquely.
virtual STATUS drop(CSTR nam)
Drop a partition object. The name identifies the partition uniquely.
bool isFailure() const
Test for a status code of FAILURE.
#define DECLARE_COMPONENT(type)
SmartIF< IToolSvc > & toolSvc() const
The standard ToolSvc service, Return a pointer to the service if present.
PartitionSwitchAlg(CSTR name, ISvcLocator *pSvcLocator)
Standard algorithm constructor.
std::string m_partName
Job option to set the requested partition name.
virtual ~PartitionSwitchAlg()
Standard Destructor.
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
Base class used to extend a class implementing other interfaces.
virtual StatusCode get(const std::string &name, IInterface *&pPartition) const =0
Access a partition object. The name identifies the partition uniquely.
virtual const std::string & name() const
The identifying name of the algorithm object.
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Small algorith, which switches the partition of a configurable multi-service.
virtual STATUS activate(IInterface *pPartition)
Activate a partition object.
virtual STATUS create(CSTR nam, CSTR typ)
Create a partition object. The name identifies the partition uniquely.
Create / access partitions.
void _check(STATUS sc, CSTR msg) const
IPartitionControl * m_actor
reference to Partition Controller
virtual StatusCode drop(const std::string &name)=0
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 create(CSTR nam, CSTR typ, IInterface *&pPartition)
Create 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.
std::string m_toolType
Job option to set the tool manipulating the multi-service name.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.