| The Gaudi Framework v27r1

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

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

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 (const std::string &typ, const std::string &nam, const IInterface *parent)
| Standard constructor. More...
| ~PartitionSwitchTool () override=default
| Standard destructor. More...
STATUS | initialize () override
| Initialize. More...
STATUS | finalize () override
| Finalize. More...
void | _check (STATUS sc, CSTR msg) const
STATUS | create (CSTR nam, CSTR typ) override
| Create a partition object. The name identifies the partition uniquely. More...
STATUS | create (CSTR nam, CSTR typ, IInterface *&pPartition) override
| Create a partition object. The name identifies the partition uniquely. More...
STATUS | drop (CSTR nam) override
| Drop a partition object. The name identifies the partition uniquely. More...
STATUS | drop (IInterface *pPartition) override
| Drop a partition object. The name identifies the partition uniquely. More...
STATUS | activate (CSTR nam) override
| Activate a partition object. The name identifies the partition uniquely. More...
STATUS | activate (IInterface *pPartition) override
| Activate a partition object. More...
STATUS | get (CSTR nam, IInterface *&pPartition) const override
| Access a partition object. The name identifies the partition uniquely. More...
STATUS | activePartition (std::string &nam, IInterface *&pPartition) const override
| Access the active partition object. More...
Public Member Functions inherited from extends< AlgTool, IPartitionControl >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
| ~extends () override=default
| Virtual destructor. More...
Public Member Functions inherited from AlgTool
StatusCode | queryInterface (const InterfaceID &riid, void **ppvUnknown) override
| Query for a given interface. More...
const std::string & | name () const override
| Retrieve full identifying name of the concrete tool object. More...
const std::string & | type () const override
| Retrieve type (concrete class) of the sub-algtool. More...
const IInterface * | parent () const override
| Retrieve parent of the sub-algtool. More...
StatusCode | configure () override
StatusCode | initialize () override
StatusCode | start () override
StatusCode | stop () override
StatusCode | finalize () override
StatusCode | terminate () override
StatusCode | reinitialize () override
StatusCode | restart () override
Gaudi::StateMachine::State | FSMState () const override
Gaudi::StateMachine::State | targetFSMState () const override
StatusCode | sysInitialize () override
| Initialize AlgTool. More...
StatusCode | sysStart () override
| Start AlgTool. More...
StatusCode | sysStop () override
| Stop AlgTool. More...
StatusCode | sysFinalize () override
| Finalize AlgTool. More...
StatusCode | sysReinitialize () override
| Initialize AlgTool. More...
StatusCode | sysRestart () override
| Start AlgTool. More...
StatusCode | setProperty (const Property &p) override
| Default implementations for IProperty interface. More...
StatusCode | setProperty (const std::string &s) override
StatusCode | setProperty (const std::string &n, const std::string &v) override
StatusCode | getProperty (Property *p) const override
const Property & | getProperty (const std::string &name) const override
StatusCode | getProperty (const std::string &n, std::string &v) const override
const std::vector< Property * > & | getProperties () const override
bool | hasProperty (const std::string &name) const override
PropertyMgr * | getPropertyMgr () const
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...
SmartIF< ISvcLocator > & | serviceLocator () const override
| Retrieve pointer to service locator. More...
ISvcLocator * | svcLoc () const
| shortcut for the method service locator More...
IDataProviderSvc * | evtSvc () const
| accessor to event service service More...
IToolSvc * | toolSvc () 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< 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") More...
template<typename T >
SmartIF< T > | service (const std::string &name, const bool createIf=true, const bool quiet=false) const
template<class T >
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const
| Declare the named property. More...
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
| Declare remote named properties. More...
template<class T >
Property * | declareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none") const
template<class T >
StatusCode | declareTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
template<class T >
Property * | declareProperty (const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none") const
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override
virtual const DataObjIDColl & | extraInputDeps () const override
virtual const DataObjIDColl & | extraOutputDeps () const override
virtual void | acceptDHVisitor (IDataHandleVisitor *) const override
DataObjIDColl | inputDataObjs () const
DataObjIDColl | outputDataObjs () const
void | commitHandles () override
void | registerTool (IAlgTool *tool) const
void | deregisterTool (IAlgTool *tool) const
template<class T >
StatusCode | declarePublicTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
| Declare used public tool. More...
template<class T >
StatusCode | declarePrivateTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
| Declare used private tool. More...
const std::vector< IAlgTool * > & | tools () const
IAuditorSvc * | auditorSvc () const
| Access the auditor service. More...
IMonitorSvc * | monitorSvc () 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...
| ~AlgTool () override
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) More...
MSG::Level | msgLevel () const
| get the output level from the embedded MsgStream More...
MSG::Level | outputLevel () const __attribute__((deprecated))
| Backward compatibility function for getting the output level. More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
Public Member Functions inherited from extend_interfaces< Interfaces...>
| ~extend_interfaces () override=default
| Virtual destructor. More...

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

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

## Additional Inherited Members
Public Types inherited from extends< AlgTool, IPartitionControl >
using | base_class = extends
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces...>
| Typedef to the base of this class. More...
Public Types inherited from AlgTool
typedef Gaudi::PluginService::Factory< IAlgTool *, const std::string &, const std::string &, const IInterface * > | Factory
Public Types inherited from CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >
using | base_class = CommonMessaging
Public Types inherited from extend_interfaces< Interfaces...>
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type
| take union of the ext_iids of all Interfaces... More...
Protected Member Functions inherited from AlgTool
template<typename I >
void | declareInterface (I *i)
virtual void | declareInput (Gaudi::DataHandle *im) override
virtual void | declareOutput (Gaudi::DataHandle *im) override
std::vector< IAlgTool * > & | tools ()
Protected Member Functions inherited from CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...
Protected Attributes inherited from AlgTool
std::unique_ptr< IDataHandleVisitor > | m_updateDataHandles
| Hook for for derived classes to provide a custom visitor for data handles. More...
SmartIF< PropertyMgr > | m_propertyMgr
| Property Manager. More...

## Detailed Description

Author
  Markus Frank

Date
  2004-06-24

Definition at line 12 of file PartitionSwitchTool.cpp.

## Member Typedef Documentation

using PartitionSwitchTool::CSTR = const std::string&
| private

Definition at line 15 of file PartitionSwitchTool.cpp.

using PartitionSwitchTool::STATUS = StatusCode
| private

Definition at line 16 of file PartitionSwitchTool.cpp.

## Constructor & Destructor Documentation

PartitionSwitchTool::PartitionSwitchTool | ( | const std::string & | typ,
|  | const std::string & | 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 }
extends< AlgTool, IPartitionControl >::base_class
extends base_class
Typedef to this class.
Definition: extends.h:14
PartitionSwitchTool::m_actorName
std::string m_actorName
Job option to set the multi-service name.
Definition: PartitionSwitchTool.cpp:21
AlgTool::declareProperty
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: AlgTool.h:249

PartitionSwitchTool::~PartitionSwitchTool | ( |  | ) |
| override default

Standard destructor.

## Member Function Documentation

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

Definition at line 61 of file PartitionSwitchTool.cpp.

61 {
62 error() << msg << " Status=" << sc.getCode() << endmsg;
63 }
StatusCode::getCode
unsigned long getCode() const
Get the status code by value.
Definition: StatusCode.h:93
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:118
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

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

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

Definition at line 87 of file PartitionSwitchTool.cpp.

87 {
88 STATUS sc = m_actor ? m_actor->activate(nam) : NO_INTERFACE;
89 CHECK(sc, "Cannot activate partition: "+nam);
90 }
merge_files.sc
int sc
Definition: merge_files.py:167
CHECK
#define CHECK(x, y)
Definition: PartitionSwitchTool.cpp:64
PartitionSwitchTool::m_actor
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
Definition: PartitionSwitchTool.cpp:23
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IPartitionControl::activate
virtual StatusCode activate(const std::string &name)=0
Activate a partition object. The name identifies the partition uniquely.

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

Activate a partition object.

Definition at line 92 of file PartitionSwitchTool.cpp.

92 {
93 STATUS sc = m_actor ? m_actor->activate(pPartition) : NO_INTERFACE;
94 CHECK(sc, "Cannot activate partition by Interface.");
95 }
merge_files.sc
int sc
Definition: merge_files.py:167
CHECK
#define CHECK(x, y)
Definition: PartitionSwitchTool.cpp:64
PartitionSwitchTool::m_actor
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
Definition: PartitionSwitchTool.cpp:23
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IPartitionControl::activate
virtual StatusCode activate(const std::string &name)=0
Activate a partition object. The name identifies the partition uniquely.

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

Access the active partition object.

Definition at line 102 of file PartitionSwitchTool.cpp.

102 {
103 STATUS sc = m_actor ? m_actor->activePartition(nam, pPartition) : NO_INTERFACE;
104 CHECK(sc, "Cannot determine active partition.");
105 }
IPartitionControl::activePartition
virtual StatusCode activePartition(std::string &name, IInterface *&pPartition) const =0
Access the active partition object.
merge_files.sc
int sc
Definition: merge_files.py:167
CHECK
#define CHECK(x, y)
Definition: PartitionSwitchTool.cpp:64
PartitionSwitchTool::m_actor
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
Definition: PartitionSwitchTool.cpp:23
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26

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

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

Definition at line 67 of file PartitionSwitchTool.cpp.

67 {
68 STATUS sc = m_actor ? m_actor->create(nam,typ) : NO_INTERFACE;
69 CHECK(sc, "Cannot create partition: "+nam+" of type "+typ);
70 }
IPartitionControl::create
virtual StatusCode create(const std::string &name, const std::string &type)=0
Create a partition object. The name identifies the partition uniquely.
merge_files.sc
int sc
Definition: merge_files.py:167
CHECK
#define CHECK(x, y)
Definition: PartitionSwitchTool.cpp:64
PartitionSwitchTool::m_actor
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
Definition: PartitionSwitchTool.cpp:23
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26

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

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

Definition at line 72 of file PartitionSwitchTool.cpp.

72 {
73 STATUS sc = m_actor ? m_actor->create(nam,typ,pPartition) : NO_INTERFACE;
74 CHECK(sc, "Cannot create partition: "+nam+" of type "+typ);
75 }
IPartitionControl::create
virtual StatusCode create(const std::string &name, const std::string &type)=0
Create a partition object. The name identifies the partition uniquely.
merge_files.sc
int sc
Definition: merge_files.py:167
CHECK
#define CHECK(x, y)
Definition: PartitionSwitchTool.cpp:64
PartitionSwitchTool::m_actor
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
Definition: PartitionSwitchTool.cpp:23
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26

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

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

Definition at line 77 of file PartitionSwitchTool.cpp.

77 {
78 STATUS sc = m_actor ? m_actor->drop(nam) : NO_INTERFACE;
79 CHECK(sc, "Cannot drop partition: "+nam);
80 }
merge_files.sc
int sc
Definition: merge_files.py:167
CHECK
#define CHECK(x, y)
Definition: PartitionSwitchTool.cpp:64
PartitionSwitchTool::m_actor
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
Definition: PartitionSwitchTool.cpp:23
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IPartitionControl::drop
virtual StatusCode drop(const std::string &name)=0
Drop a partition object. The name identifies the partition uniquely.

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

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

Definition at line 82 of file PartitionSwitchTool.cpp.

82 {
83 STATUS sc = m_actor ? m_actor->drop(pPartition) : NO_INTERFACE;
84 CHECK(sc, "Cannot drop partition by Interface.");
85 }
merge_files.sc
int sc
Definition: merge_files.py:167
CHECK
#define CHECK(x, y)
Definition: PartitionSwitchTool.cpp:64
PartitionSwitchTool::m_actor
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
Definition: PartitionSwitchTool.cpp:23
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IPartitionControl::drop
virtual StatusCode drop(const std::string &name)=0
Drop a partition object. The name identifies the partition uniquely.

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

Finalize.

Definition at line 56 of file PartitionSwitchTool.cpp.

56 {
57 m_actor = nullptr;
58 return AlgTool::finalize();
59 }
AlgTool::finalize
StatusCode finalize() override
Definition: AlgTool.cpp:360
PartitionSwitchTool::m_actor
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
Definition: PartitionSwitchTool.cpp:23

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

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

Definition at line 97 of file PartitionSwitchTool.cpp.

97 {
98 STATUS sc = m_actor ? m_actor->get(nam, pPartition) : NO_INTERFACE;
99 CHECK(sc, "Cannot get partition "+nam);
100 }
merge_files.sc
int sc
Definition: merge_files.py:167
CHECK
#define CHECK(x, y)
Definition: PartitionSwitchTool.cpp:64
PartitionSwitchTool::m_actor
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
Definition: PartitionSwitchTool.cpp:23
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IPartitionControl::get
virtual StatusCode get(const std::string &name, IInterface *&pPartition) const =0
Access a partition object. The name identifies the partition uniquely.

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

Initialize.

Access partitioned multi-service

Definition at line 37 of file PartitionSwitchTool.cpp.

37 {
39 STATUS sc = AlgTool::initialize();
40 if ( !sc.isSuccess() ) {
41 error() << "Cannot initialize base class!" << endmsg;
42 return sc;
43 }
44 m_actor = nullptr;
45 IPartitionControl* tmpPtr = nullptr;
46 sc = service(m_actorName, tmpPtr);
47 m_actor = tmpPtr;
48 if ( !sc.isSuccess() ) {
49 error() << "Cannot retrieve partition controller \""
50 << m_actorName << "\"!" << endmsg;
51 return sc;
52 }
53 return sc;
54 }
AlgTool::initialize
StatusCode initialize() override
Definition: AlgTool.cpp:290
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
merge_files.sc
int sc
Definition: merge_files.py:167
PartitionSwitchTool::m_actorName
std::string m_actorName
Job option to set the multi-service name.
Definition: PartitionSwitchTool.cpp:21
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:118
PartitionSwitchTool::m_actor
SmartIF< IPartitionControl > m_actor
reference to Partition Controller
Definition: PartitionSwitchTool.cpp:23
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
AlgTool::service
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:195
IPartitionControl
Create / access partitions.
Definition: IPartitionControl.h:66
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

## 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:

- GaudiCommonSvc/src/DataSvc/PartitionSwitchTool.cpp