| # Gaudi Framework, version v22r0 |

Home |  | Generated: 9 Feb 2011

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

    00032   : base_class(typ, nam , parent)
    00033   {
    00034     declareProperty("Actor", m_actorName = "EventDataService");
    00035   }

virtual PartitionSwitchTool::~PartitionSwitchTool | ( |  | ) | `[inline, virtual]`

Standard destructor.

Definition at line 37 of file PartitionSwitchTool.cpp.

    00037                                    {
    00038     m_actor = 0;
    00039   }

## Member Function Documentation

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

Definition at line 67 of file PartitionSwitchTool.cpp.

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

virtual STATUS PartitionSwitchTool::activate | ( | IInterface * | pPartition | ) | `[inline, virtual]`

Activate a partition object.

Implements IPartitionControl.

Definition at line 99 of file PartitionSwitchTool.cpp.

    00099                                                    {
    00100     STATUS sc = m_actor ? m_actor->activate(pPartition) : NO_INTERFACE;
    00101     CHECK(sc, "Cannot activate partition by Interface.");
    00102   }

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.

    00094                                      {
    00095     STATUS sc = m_actor ? m_actor->activate(nam) : NO_INTERFACE;
    00096     CHECK(sc, "Cannot activate partition: "+nam);
    00097   }

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.

    00109                                                                                  {
    00110     STATUS sc = m_actor ? m_actor->activePartition(nam, pPartition) : NO_INTERFACE;
    00111     CHECK(sc, "Cannot determine active partition.");
    00112   }

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.

    00079                                                                       {
    00080     STATUS sc = m_actor ? m_actor->create(nam,typ,pPartition) : NO_INTERFACE;
    00081     CHECK(sc, "Cannot create partition: "+nam+" of type "+typ);
    00082   }

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.

    00074                                              {
    00075     STATUS sc = m_actor ? m_actor->create(nam,typ) : NO_INTERFACE;
    00076     CHECK(sc, "Cannot create partition: "+nam+" of type "+typ);
    00077   }

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.

    00089                                                {
    00090     STATUS sc = m_actor ? m_actor->drop(pPartition) : NO_INTERFACE;
    00091     CHECK(sc, "Cannot drop partition by Interface.");
    00092   }

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.

    00084                                  {
    00085     STATUS sc = m_actor ? m_actor->drop(nam) : NO_INTERFACE;
    00086     CHECK(sc, "Cannot drop partition: "+nam);
    00087   }

virtual STATUS PartitionSwitchTool::finalize | ( |  | ) | `[inline, virtual]`

Finalize.

Reimplemented from AlgTool.

Definition at line 62 of file PartitionSwitchTool.cpp.

    00062                               {
    00063     m_actor = 0;
    00064     return AlgTool::finalize();
    00065   }

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.

    00104                                                                {
    00105     STATUS sc = m_actor ? m_actor->get(nam, pPartition) : NO_INTERFACE;
    00106     CHECK(sc, "Cannot get partition "+nam);
    00107   }

virtual STATUS PartitionSwitchTool::initialize | ( |  | ) | `[inline, virtual]`

Initialize.

Access partitioned multi-service

Reimplemented from AlgTool.

Definition at line 42 of file PartitionSwitchTool.cpp.

    00042                                {
    00044     STATUS sc = AlgTool::initialize();
    00045     MsgStream log(msgSvc(), name());
    00046     if ( !sc.isSuccess() )  {
    00047       log << MSG::ERROR << "Cannot initialize base class!" << endmsg;
    00048       return sc;
    00049     }
    00050     m_actor = 0;
    00051     IPartitionControl* tmpPtr = 0;
    00052     sc = service(m_actorName, tmpPtr);
    00053     m_actor = tmpPtr;
    00054     if ( !sc.isSuccess() )  {
    00055       log << MSG::ERROR << "Cannot retrieve partition controller \""
    00056           << m_actorName << "\"!" << endmsg;
    00057       return sc;
    00058     }
    00059     return sc;
    00060   }

## 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_v22r0/GaudiSvc/src/DataSvc/PartitionSwitchTool.cpp

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