| # Gaudi Framework, version v22r4 |

Home |  | Generated: Fri Sep 2 2011

Public Member Functions | Private Types | Private Attributes

# PartitionSwitchTool Class Reference

Inheritance diagram for PartitionSwitchTool:
[legend]
Collaboration diagram for PartitionSwitchTool:
[legend]

List of all members.

## 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.
## Private Types
typedef const std::string & | CSTR
typedef StatusCode | STATUS
## Private Attributes
std::string | m_actorName
| Job option to set the multi-service name.
SmartIF< IPartitionControl > | m_actor
| reference to Partition Controller

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

typedef StatusCode PartitionSwitchTool::STATUS`[private]`

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 | ( | ) | `[inline, virtual]`

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.

                                              {
        MsgStream log(msgSvc(), name());
        log << MSG::ERROR << msg << " Status=" << sc.getCode() << endmsg;
      }

virtual STATUS PartitionSwitchTool::activate | ( | CSTR | nam ) | `[inline, virtual]`

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 ) | `[inline, virtual]`

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`[inline, virtual]`

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
| ) |  | `[inline, virtual]`

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
| ) |  | `[inline, virtual]`

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 | ( | IInterface * | pPartition ) | `[inline, virtual]`

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::drop | ( | CSTR | nam ) | `[inline, virtual]`

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::finalize | ( | void | ) | `[inline, virtual]`

Finalize.

Reimplemented from AlgTool.

Definition at line 62 of file PartitionSwitchTool.cpp.

                                  {
        m_actor = 0;
        return AlgTool::finalize();
      }

virtual STATUS PartitionSwitchTool::get | ( | CSTR | nam,
|  | IInterface *& | pPartition
| ) |  | const`[inline, virtual]`

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 | ( | void | ) | `[inline, virtual]`

Initialize.

Access partitioned multi-service

Reimplemented from AlgTool.

Definition at line 42 of file PartitionSwitchTool.cpp.

                                   {
        STATUS sc = AlgTool::initialize();
        MsgStream log(msgSvc(), name());
        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:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r4/GaudiSvc/src/DataSvc/PartitionSwitchTool.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines