The Gaudi Framework  master (37c0b60a)
IPartitionControl.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIKERNEL_IPARTITIONCONTROL_H
12 #define GAUDIKERNEL_IPARTITIONCONTROL_H
13 
14 // Framework include files
15 #include <GaudiKernel/IInterface.h>
16 
17 // C++ include files
18 #include <string>
19 
76 class GAUDI_API IPartitionControl : virtual public IInterface {
77 public:
80 
82 
93  virtual StatusCode create( const std::string& name, const std::string& type ) = 0;
94 
96 
108  virtual StatusCode create( const std::string& name, const std::string& type, IInterface*& pPartition ) = 0;
109 
111 
119  virtual StatusCode drop( const std::string& name ) = 0;
120 
122 
132  virtual StatusCode drop( IInterface* pPartition ) = 0;
133 
135 
145  virtual StatusCode activate( const std::string& name ) = 0;
146 
148 
161  virtual StatusCode activate( IInterface* pPartition ) = 0;
162 
164 
171  virtual StatusCode get( const std::string& name, IInterface*& pPartition ) const = 0;
172 
174 
181  virtual StatusCode activePartition( std::string& name, IInterface*& pPartition ) const = 0;
182 
183  // Return codes:
184  enum class Status : StatusCode::code_t { PARTITION_NOT_PRESENT = 2, PARTITION_EXISTS = 4, NO_ACTIVE_PARTITION = 6 };
185 };
186 
188 
189 #endif // GAUDIKERNEL_IPARTITIONCONTROL_H
IPartitionControl::create
virtual StatusCode create(const std::string &name, const std::string &type, IInterface *&pPartition)=0
Create a partition object. The name identifies the partition uniquely.
std::string
STL class.
IPartitionControl
Definition: IPartitionControl.h:76
IPartitionControl::activate
virtual StatusCode activate(IInterface *pPartition)=0
Activate a partition object.
StatusCode::code_t
unsigned long code_t
type of StatusCode value
Definition: StatusCode.h:67
IPartitionControl::drop
virtual StatusCode drop(IInterface *pPartition)=0
Drop a partition object. The name identifies the partition uniquely.
IPartitionControl::create
virtual StatusCode create(const std::string &name, const std::string &type)=0
Create a partition object. The name identifies the partition uniquely.
IInterface::Status
Status
Return status.
Definition: IInterface.h:292
IPartitionControl::Status
Status
Definition: IPartitionControl.h:184
StatusCode
Definition: StatusCode.h:65
IInterface.h
IPartitionControl::drop
virtual StatusCode drop(const std::string &name)=0
Drop a partition object. The name identifies the partition uniquely.
IPartitionControl::get
virtual StatusCode get(const std::string &name, IInterface *&pPartition) const =0
Access a partition object. The name identifies the partition uniquely.
gaudirun.type
type
Definition: gaudirun.py:160
IPartitionControl::activePartition
virtual StatusCode activePartition(std::string &name, IInterface *&pPartition) const =0
Access the active partition object.
STATUSCODE_ENUM_DECL
#define STATUSCODE_ENUM_DECL(ENUM)
Declare an enum to be used as StatusCode value.
Definition: StatusCode.h:286
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
IInterface
Definition: IInterface.h:239
IPartitionControl::activate
virtual StatusCode activate(const std::string &name)=0
Activate a partition object. The name identifies the partition uniquely.
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81
IPartitionControl::DeclareInterfaceID
DeclareInterfaceID(IPartitionControl, 1, 0)
InterfaceID.