The Gaudi Framework
master (57817a18)
Toggle main menu visibility
Loading...
Searching...
No Matches
CondSvc.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
#pragma once
12
13
#include <
Gaudi/Property.h
>
14
#include <
GaudiKernel/IAlgResourcePool.h
>
15
#include <
GaudiKernel/ICondSvc.h
>
16
#include <
GaudiKernel/Service.h
>
17
#include <
GaudiKernel/SmartIF.h
>
18
19
namespace
Gaudi::TestSuite::Conditions
{
20
25
class
CondSvc
:
public
extends
<Service, ICondSvc> {
26
27
public
:
28
using
extends::extends;
29
30
StatusCode
initialize
()
override
;
31
32
StatusCode
regHandle
(
IAlgorithm
*,
const
Gaudi::DataHandle
& )
override
{
return
StatusCode::SUCCESS
; };
33
35
bool
isValidID
(
const
EventContext
&,
const
DataObjID
& )
const override
{
return
false
; };
36
38
const
std::set<IAlgorithm*>&
condAlgs
()
const override
{
return
m_condAlgs
; };
39
41
bool
isRegistered
(
IAlgorithm
* alg )
const override
{
return
(
m_condAlgs
.find( alg ) !=
m_condAlgs
.end() ); };
42
44
bool
isRegistered
(
const
DataObjID
&
id
)
const override
{
return
(
m_condData
.find(
id
) !=
m_condData
.end() ); };
45
47
const
DataObjIDColl
&
conditionIDs
()
const override
{
return
m_condData
; }
48
50
void
dump
( std::ostream& )
const override
{};
51
53
StatusCode
validRanges
( std::vector<EventIDRange>&,
const
DataObjID
& )
const override
{
54
return
StatusCode::SUCCESS
;
55
};
56
58
ConditionSlotFuture*
startConditionSetup
(
const
EventContext
& )
override
{
return
nullptr
; };
59
62
StatusCode
registerConditionIOSvc
( IConditionIOSvc* )
override
{
return
StatusCode::SUCCESS
; }
63
64
private
:
65
std::set<IAlgorithm*>
m_condAlgs
;
66
Gaudi::Property<std::vector<std::string>
>
m_algNames
{
this
,
"Algs"
, {},
"Names of conditions algorithms"
};
67
68
DataObjIDColl
m_condData
;
69
Gaudi::Property<std::vector<std::string>
>
m_dataNames
{
this
,
"Data"
, {},
"Names of conditions data"
};
70
71
SmartIF<IAlgResourcePool>
m_algResourcePool
;
72
};
73
74
DECLARE_COMPONENT
(
CondSvc
)
75
}
// namespace Gaudi::TestSuite::Conditions
DataObjIDColl
std::unordered_set< DataObjID, DataObjID_Hasher > DataObjIDColl
Definition
DataObjID.h:121
Property.h
IAlgResourcePool.h
ICondSvc.h
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition
PluginServiceV1.h:45
Service.h
SmartIF.h
DataObjID
Definition
DataObjID.h:47
EventContext
This class represents an entry point to all the event specific data.
Definition
EventContext.h:35
Gaudi::DataHandle
Definition
DataHandle.h:43
Gaudi::Property
Implementation of property with value of concrete type.
Definition
Property.h:35
Gaudi::TestSuite::Conditions::CondSvc
Implementation of ICondSvc used for testing Allows declaration of one or more algorithms or data obje...
Definition
CondSvc.h:25
Gaudi::TestSuite::Conditions::CondSvc::m_condData
DataObjIDColl m_condData
Definition
CondSvc.h:68
Gaudi::TestSuite::Conditions::CondSvc::isRegistered
bool isRegistered(IAlgorithm *alg) const override
query if a specific Algorithm is a registered condition Algorithm
Definition
CondSvc.h:41
Gaudi::TestSuite::Conditions::CondSvc::dump
void dump(std::ostream &) const override
dump the condition store
Definition
CondSvc.h:50
Gaudi::TestSuite::Conditions::CondSvc::initialize
StatusCode initialize() override
Definition
CondSvc.cpp:16
Gaudi::TestSuite::Conditions::CondSvc::m_algResourcePool
SmartIF< IAlgResourcePool > m_algResourcePool
Definition
CondSvc.h:71
Gaudi::TestSuite::Conditions::CondSvc::m_condAlgs
std::set< IAlgorithm * > m_condAlgs
Definition
CondSvc.h:65
Gaudi::TestSuite::Conditions::CondSvc::regHandle
StatusCode regHandle(IAlgorithm *, const Gaudi::DataHandle &) override
Definition
CondSvc.h:32
Gaudi::TestSuite::Conditions::CondSvc::startConditionSetup
ConditionSlotFuture * startConditionSetup(const EventContext &) override
Asynchronously setup conditions.
Definition
CondSvc.h:58
Gaudi::TestSuite::Conditions::CondSvc::conditionIDs
const DataObjIDColl & conditionIDs() const override
get collection of all registered condition Object IDs
Definition
CondSvc.h:47
Gaudi::TestSuite::Conditions::CondSvc::condAlgs
const std::set< IAlgorithm * > & condAlgs() const override
get list of all registered condition Algorithms
Definition
CondSvc.h:38
Gaudi::TestSuite::Conditions::CondSvc::m_algNames
Gaudi::Property< std::vector< std::string > > m_algNames
Definition
CondSvc.h:66
Gaudi::TestSuite::Conditions::CondSvc::m_dataNames
Gaudi::Property< std::vector< std::string > > m_dataNames
Definition
CondSvc.h:69
Gaudi::TestSuite::Conditions::CondSvc::isValidID
bool isValidID(const EventContext &, const DataObjID &) const override
check to see if a specific condition object ID is valid for this event
Definition
CondSvc.h:35
Gaudi::TestSuite::Conditions::CondSvc::registerConditionIOSvc
StatusCode registerConditionIOSvc(IConditionIOSvc *) override
register an IConditionIOSvc (alternative to Algorithm processing of Conditions)
Definition
CondSvc.h:62
Gaudi::TestSuite::Conditions::CondSvc::validRanges
StatusCode validRanges(std::vector< EventIDRange > &, const DataObjID &) const override
retrieve all valid ranges for one Object ID
Definition
CondSvc.h:53
Gaudi::TestSuite::Conditions::CondSvc::isRegistered
bool isRegistered(const DataObjID &id) const override
query if a condition Object ID is registered
Definition
CondSvc.h:44
IAlgorithm
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition
IAlgorithm.h:37
SmartIF
Small smart pointer class with automatic reference counting for IInterface.
Definition
SmartIF.h:28
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition
StatusCode.h:99
extends
Base class used to extend a class implementing other interfaces.
Definition
extends.h:19
Gaudi::TestSuite::Conditions
Definition
ConditionAccessorHolder.h:21
GaudiTestSuite
include
Gaudi
TestSuite
Conditions
CondSvc.h
Generated on
for The Gaudi Framework by
1.17.0