2 #include "GaudiKernel/AlgTool.h"
3 #include "GaudiKernel/SmartIF.h"
4 #include "GaudiKernel/MsgStream.h"
5 #include "GaudiKernel/ToolFactory.h"
6 #include "GaudiKernel/IPartitionControl.h"
15 typedef const std::string&
CSTR;
49 sc =
service(m_actorName, tmpPtr);
52 log <<
MSG::ERROR <<
"Cannot retrieve partition controller \""
53 << m_actorName <<
"\"!" <<
endmsg;
68 #define CHECK(x,y) if ( !x.isSuccess() ) _check(x, y); return x;
71 virtual STATUS
create(CSTR nam, CSTR typ) {
73 CHECK(sc,
"Cannot create partition: "+nam+
" of type "+typ);
78 CHECK(sc,
"Cannot create partition: "+nam+
" of type "+typ);
81 virtual STATUS
drop(CSTR nam) {
83 CHECK(sc,
"Cannot drop partition: "+nam);
88 CHECK(sc,
"Cannot drop partition by Interface.");
93 CHECK(sc,
"Cannot activate partition: "+nam);
98 CHECK(sc,
"Cannot activate partition by Interface.");
101 virtual STATUS
get(CSTR nam,
IInterface*& pPartition)
const {
103 CHECK(sc,
"Cannot get partition "+nam);
108 CHECK(sc,
"Cannot determine active partition.");
Definition of the MsgStream class used to transmit messages.
virtual StatusCode activePartition(std::string &name, IInterface *&pPartition) const =0
Access the active partition object.
unsigned long getCode() const
Get the status code by value.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
bool isSuccess() const
Test for a status code of SUCCESS.
virtual StatusCode create(const std::string &name, const std::string &type)=0
Create a partition object. The name identifies the partition uniquely.
#define DECLARE_COMPONENT(type)
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
Requested interface is not available.
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.
Create / access partitions.
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.