The Gaudi Framework  master (b9786168)
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>
16#include <GaudiKernel/Service.h>
17#include <GaudiKernel/SmartIF.h>
18
20
25 class CondSvc : public extends<Service, ICondSvc> {
26
27 public:
28 using extends::extends;
29
30 StatusCode initialize() override;
31
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 {
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
69 Gaudi::Property<std::vector<std::string>> m_dataNames{ this, "Data", {}, "Names of conditions data" };
70
72 };
73
75} // namespace Gaudi::TestSuite::Conditions
std::unordered_set< DataObjID, DataObjID_Hasher > DataObjIDColl
Definition DataObjID.h:121
#define DECLARE_COMPONENT(type)
This class represents an entry point to all the event specific data.
Implementation of property with value of concrete type.
Definition PropertyFwd.h:27
Implementation of ICondSvc used for testing Allows declaration of one or more algorithms or data obje...
Definition CondSvc.h:25
bool isRegistered(IAlgorithm *alg) const override
query if a specific Algorithm is a registered condition Algorithm
Definition CondSvc.h:41
void dump(std::ostream &) const override
dump the condition store
Definition CondSvc.h:50
StatusCode initialize() override
Definition CondSvc.cpp:16
SmartIF< IAlgResourcePool > m_algResourcePool
Definition CondSvc.h:71
std::set< IAlgorithm * > m_condAlgs
Definition CondSvc.h:65
StatusCode regHandle(IAlgorithm *, const Gaudi::DataHandle &) override
Definition CondSvc.h:32
ConditionSlotFuture * startConditionSetup(const EventContext &) override
Asynchronously setup conditions.
Definition CondSvc.h:58
const DataObjIDColl & conditionIDs() const override
get collection of all registered condition Object IDs
Definition CondSvc.h:47
const std::set< IAlgorithm * > & condAlgs() const override
get list of all registered condition Algorithms
Definition CondSvc.h:38
Gaudi::Property< std::vector< std::string > > m_algNames
Definition CondSvc.h:66
Gaudi::Property< std::vector< std::string > > m_dataNames
Definition CondSvc.h:69
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
StatusCode registerConditionIOSvc(IConditionIOSvc *) override
register an IConditionIOSvc (alternative to Algorithm processing of Conditions)
Definition CondSvc.h:62
StatusCode validRanges(std::vector< EventIDRange > &, const DataObjID &) const override
retrieve all valid ranges for one Object ID
Definition CondSvc.h:53
bool isRegistered(const DataObjID &id) const override
query if a condition Object ID is registered
Definition CondSvc.h:44
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition IAlgorithm.h:36
Small smart pointer class with automatic reference counting for IInterface.
Definition SmartIF.h:28
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
constexpr static const auto SUCCESS
Definition StatusCode.h:99
Base class used to extend a class implementing other interfaces.
Definition extends.h:19