2 #include "GaudiKernel/AlgTool.h"
3 #include "GaudiKernel/SmartIF.h"
4 #include "GaudiKernel/MsgStream.h"
5 #include "GaudiKernel/IPartitionControl.h"
14 using CSTR =
const std::string&;
30 declareProperty(
"Actor", m_actorName =
"EventDataService");
46 sc = service(m_actorName, tmpPtr);
49 log <<
MSG::ERROR <<
"Cannot retrieve partition controller \""
50 << m_actorName <<
"\"!" <<
endmsg;
65 #define CHECK(x,y) if ( !x.isSuccess() ) _check(x, y); return x;
70 CHECK(sc,
"Cannot create partition: "+nam+
" of type "+typ);
74 STATUS sc = m_actor ? m_actor->
create(nam,typ,pPartition) : NO_INTERFACE;
75 CHECK(sc,
"Cannot create partition: "+nam+
" of type "+typ);
80 CHECK(sc,
"Cannot drop partition: "+nam);
84 STATUS sc = m_actor ? m_actor->
drop(pPartition) : NO_INTERFACE;
85 CHECK(sc,
"Cannot drop partition by Interface.");
90 CHECK(sc,
"Cannot activate partition: "+nam);
95 CHECK(sc,
"Cannot activate partition by Interface.");
99 STATUS sc = m_actor ? m_actor->
get(nam, pPartition) : NO_INTERFACE;
100 CHECK(sc,
"Cannot get partition "+nam);
105 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.
virtual StatusCode get(const std::string &name, IInterface *&pPartition) const =0
Access a partition object. The name identifies the partition uniquely.
Create / access partitions.
Base class used to extend a class implementing other interfaces.
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.