Gaudi Framework, version v23r9

Home   Generated: Thu Jul 18 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Types | Private Attributes | List of all members
PartitionSwitchTool Class Reference
Inheritance diagram for PartitionSwitchTool:
Inheritance graph
[legend]
Collaboration diagram for PartitionSwitchTool:
Collaboration graph
[legend]

Public Member Functions

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

Private Types

typedef const std::stringCSTR
 
typedef StatusCode STATUS
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from extends1< AlgTool, IPartitionControl >
typedef extends1 base_class
 Typedef to this class.
 
typedef extend_interfaces1
< IPartitionControl
extend_interfaces_base
 Typedef to the base of this class.
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces.
 
- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface.
 
- Protected Member Functions inherited from AlgTool
int outputLevel () const
 get tool's output level
 
IntegerPropertyoutputLevelProperty ()
 Accessor for the Message level property.
 
void initOutputLevel (Property &prop)
 callback for output level property
 
virtual ~AlgTool ()
 

Detailed Description

Author
Markus Frank
Date
2004-06-24

Definition at line 16 of file PartitionSwitchTool.cpp.

Member Typedef Documentation

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

Definition at line 18 of file PartitionSwitchTool.cpp.

Definition at line 19 of file PartitionSwitchTool.cpp.

Constructor & Destructor Documentation

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

Standard constructor.

Definition at line 31 of file PartitionSwitchTool.cpp.

: base_class(typ, nam , parent)
{
declareProperty("Actor", m_actorName = "EventDataService");
}
virtual PartitionSwitchTool::~PartitionSwitchTool ( )
inlinevirtual

Standard destructor.

Definition at line 37 of file PartitionSwitchTool.cpp.

{
m_actor = 0;
}

Member Function Documentation

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

Definition at line 67 of file PartitionSwitchTool.cpp.

{
log << MSG::ERROR << msg << " Status=" << sc.getCode() << endmsg;
}
virtual STATUS PartitionSwitchTool::activate ( CSTR  nam)
inlinevirtual

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

Definition at line 94 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->activate(nam) : NO_INTERFACE;
CHECK(sc, "Cannot activate partition: "+nam);
}
virtual STATUS PartitionSwitchTool::activate ( IInterface pPartition)
inlinevirtual

Activate a partition object.

Implements IPartitionControl.

Definition at line 99 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->activate(pPartition) : NO_INTERFACE;
CHECK(sc, "Cannot activate partition by Interface.");
}
virtual STATUS PartitionSwitchTool::activePartition ( std::string nam,
IInterface *&  pPartition 
) const
inlinevirtual

Access the active partition object.

Implements IPartitionControl.

Definition at line 109 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->activePartition(nam, pPartition) : NO_INTERFACE;
CHECK(sc, "Cannot determine active partition.");
}
virtual STATUS PartitionSwitchTool::create ( CSTR  nam,
CSTR  typ 
)
inlinevirtual

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

Definition at line 74 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->create(nam,typ) : NO_INTERFACE;
CHECK(sc, "Cannot create partition: "+nam+" of type "+typ);
}
virtual STATUS PartitionSwitchTool::create ( CSTR  nam,
CSTR  typ,
IInterface *&  pPartition 
)
inlinevirtual

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

Definition at line 79 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->create(nam,typ,pPartition) : NO_INTERFACE;
CHECK(sc, "Cannot create partition: "+nam+" of type "+typ);
}
virtual STATUS PartitionSwitchTool::drop ( CSTR  nam)
inlinevirtual

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

Definition at line 84 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->drop(nam) : NO_INTERFACE;
CHECK(sc, "Cannot drop partition: "+nam);
}
virtual STATUS PartitionSwitchTool::drop ( IInterface pPartition)
inlinevirtual

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

Implements IPartitionControl.

Definition at line 89 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->drop(pPartition) : NO_INTERFACE;
CHECK(sc, "Cannot drop partition by Interface.");
}
virtual STATUS PartitionSwitchTool::finalize ( )
inlinevirtual

Finalize.

Reimplemented from AlgTool.

Definition at line 62 of file PartitionSwitchTool.cpp.

{
m_actor = 0;
}
virtual STATUS PartitionSwitchTool::get ( CSTR  nam,
IInterface *&  pPartition 
) const
inlinevirtual

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

Definition at line 104 of file PartitionSwitchTool.cpp.

{
STATUS sc = m_actor ? m_actor->get(nam, pPartition) : NO_INTERFACE;
CHECK(sc, "Cannot get partition "+nam);
}
virtual STATUS PartitionSwitchTool::initialize ( )
inlinevirtual

Initialize.

Access partitioned multi-service

Reimplemented from AlgTool.

Definition at line 42 of file PartitionSwitchTool.cpp.

{
if ( !sc.isSuccess() ) {
log << MSG::ERROR << "Cannot initialize base class!" << endmsg;
return sc;
}
m_actor = 0;
IPartitionControl* tmpPtr = 0;
sc = service(m_actorName, tmpPtr);
m_actor = tmpPtr;
if ( !sc.isSuccess() ) {
log << MSG::ERROR << "Cannot retrieve partition controller \""
<< m_actorName << "\"!" << endmsg;
return sc;
}
return sc;
}

Member Data Documentation

SmartIF<IPartitionControl> PartitionSwitchTool::m_actor
private

reference to Partition Controller

Definition at line 26 of file PartitionSwitchTool.cpp.

std::string PartitionSwitchTool::m_actorName
private

Job option to set the multi-service name.

Definition at line 24 of file PartitionSwitchTool.cpp.


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

Generated at Thu Jul 18 2013 12:18:11 for Gaudi Framework, version v23r9 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004