ATLAS Offline Software
L1CaloCondSvc.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 
8 #ifndef TRIGT1CALOCONDSVC_L1CALOCONDSVC_H
9 #define TRIGT1CALOCONDSVC_L1CALOCONDSVC_H
10 
12 
13 #include "StoreGate/DataHandle.h"
15 
18 
21 
23 
24 #include <string>
25 #include <map>
26 
28 ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // obsolete, replaced by L1CaloCondAlg
29 
38 class L1CaloCondSvc : public AthService
39 {
40 public:
41  L1CaloCondSvc(const std::string& name, ISvcLocator* svc);
42  virtual ~L1CaloCondSvc();
43 
44  virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
45 
46  static const InterfaceID& interfaceID();
47 
48  virtual StatusCode initialize();
49  virtual StatusCode finalize();
50 
51 
58  template <typename T>
59  StatusCode store(const T*& pobj, const std::string& key, const std::string& folder, const std::string& tag) const;
60 
67  template <typename T>
68  StatusCode retrieve(T*& pobj, const std::string& key = "");
69 
76  template <typename T, typename FolderMapping>
77  StatusCode retrieve(T*& pobj, const FolderMapping& folderKeyMap, const std::string& key = "");
78 
80 
81 
82 private:
85 
86  // properties
87  std::string m_streamName;
88 
90 
91  // IOV range
92  unsigned int m_iovBeginRun;
93  unsigned int m_iovEndRun;
94  unsigned int m_iovBeginLB;
95  unsigned int m_iovEndLB;
99 
100  // function for the non-differing parts of the two retrieve functions above
101  template <typename T>
102  StatusCode retrieveImpl(T*& pobj, const std::string& key);
103 
104  template <typename T>
105  StatusCode registerCondition(T*& pobj, const std::string& mykey="");
106 
107  std::map<std::string, const DataHandle<AthenaAttributeList>* > m_mDataHandleAttrList;
108  std::map<std::string, const DataHandle<CondAttrListCollection>* > m_mDataHandleAttrListColl;
109  std::map<std::string, std::vector<IL1CaloPersistenceCapable*> > m_mConditions;
110  std::map<IL1CaloPersistenceCapable*,std::vector<std::string> > m_map_conditions2key;
111 
112 };
113 
114 inline const InterfaceID& L1CaloCondSvc::interfaceID() {
115  static const InterfaceID IID_L1CaloCondSvc("L1CaloCondSvc",1,0);
116  return IID_L1CaloCondSvc;
117 }
118 
119 #ifndef TRIGT1CALOCONDSVC_L1CALOCONDSVC_ICC
121 #endif
122 
123 #endif
L1CaloCondSvc::interfaceID
static const InterfaceID & interfaceID()
Definition: L1CaloCondSvc.h:114
L1CaloCondSvc::queryInterface
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
Definition: L1CaloCondSvc.cxx:32
IL1CaloPersistenceCapable.h
L1CaloCondSvc::m_mDataHandleAttrListColl
std::map< std::string, const DataHandle< CondAttrListCollection > * > m_mDataHandleAttrListColl
Definition: L1CaloCondSvc.h:108
CondAttrListCollection.h
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
L1CaloCondSvc::store
StatusCode store(const T *&pobj, const std::string &key, const std::string &folder, const std::string &tag) const
To store a condition object into the COOL DB.
L1CaloCondSvc::m_iovEndRun
unsigned int m_iovEndRun
Definition: L1CaloCondSvc.h:93
L1CaloCondSvc::L1CaloCondSvc
L1CaloCondSvc(const std::string &name, ISvcLocator *svc)
Definition: L1CaloCondSvc.cxx:13
IIOVRegistrationSvc.h
This is an interface to a tool used to register conditions objects in the Interval of Validity (IOV) ...
L1CaloCondSvc::m_bUseTimeStamp
bool m_bUseTimeStamp
Definition: L1CaloCondSvc.h:98
L1CaloCondSvc::updateConditions
virtual StatusCode updateConditions(IOVSVC_CALLBACK_ARGS)
Definition: L1CaloCondSvc.cxx:72
IOVSVC_CALLBACK_ARGS
#define IOVSVC_CALLBACK_ARGS
short hand for IOVSvc call back argument list, to be used when no access to formal arguments is neede...
Definition: IOVSvcDefs.h:24
AthenaAttributeList.h
L1CaloCondSvc::retrieve
StatusCode retrieve(T *&pobj, const std::string &key="")
To retrieve a condition object from the COOL DB.
DataHandle.h
L1CaloCondSvc.icc
IAthenaOutputStreamTool.h
Interface to an output stream tool.
L1CaloCondSvc::retrieveImpl
StatusCode retrieveImpl(T *&pobj, const std::string &key)
L1CaloCondSvc::registerCondition
StatusCode registerCondition(T *&pobj, const std::string &mykey="")
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthService
Definition: AthService.h:32
L1CaloCondSvc::finalize
virtual StatusCode finalize()
Definition: L1CaloCondSvc.cxx:55
L1CaloCondSvc::initialize
virtual StatusCode initialize()
Definition: L1CaloCondSvc.cxx:47
L1CaloCondSvc::~L1CaloCondSvc
virtual ~L1CaloCondSvc()
Definition: L1CaloCondSvc.cxx:30
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
L1CaloCondSvc::m_regSvc
ServiceHandle< IIOVRegistrationSvc > m_regSvc
Definition: L1CaloCondSvc.h:84
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
L1CaloCondSvc::m_mConditions
std::map< std::string, std::vector< IL1CaloPersistenceCapable * > > m_mConditions
Definition: L1CaloCondSvc.h:109
L1CaloCondSvc::m_iovEndTime
uint64_t m_iovEndTime
Definition: L1CaloCondSvc.h:97
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
L1CaloCondSvc::m_bWriteNewChannels
bool m_bWriteNewChannels
Definition: L1CaloCondSvc.h:89
L1CaloCondSvc::m_iovBeginRun
unsigned int m_iovBeginRun
Definition: L1CaloCondSvc.h:92
L1CaloCondSvc::m_map_conditions2key
std::map< IL1CaloPersistenceCapable *, std::vector< std::string > > m_map_conditions2key
Definition: L1CaloCondSvc.h:110
L1CaloCondSvc::retrieve
StatusCode retrieve(T *&pobj, const FolderMapping &folderKeyMap, const std::string &key="")
To retrieve a condition object from the COOL DB with custom folder mapping.
L1CaloCondSvc::m_streamName
std::string m_streamName
Definition: L1CaloCondSvc.h:87
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
AthService.h
IOVSvcDefs.h
defines and typedefs for IOVSvc
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
L1CaloCondSvc::m_iovBeginLB
unsigned int m_iovBeginLB
Definition: L1CaloCondSvc.h:94
L1CaloCondSvc::m_iovEndLB
unsigned int m_iovEndLB
Definition: L1CaloCondSvc.h:95
checker_macros.h
Define macros for attributes used to control the static checker.
L1CaloCondSvc::m_iovBeginTime
uint64_t m_iovBeginTime
Definition: L1CaloCondSvc.h:96
L1CaloCondSvc
L1CaloCondSvc class.
Definition: L1CaloCondSvc.h:39
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
L1CaloCondSvc::m_mDataHandleAttrList
std::map< std::string, const DataHandle< AthenaAttributeList > * > m_mDataHandleAttrList
Definition: L1CaloCondSvc.h:107
L1CaloCondSvc::m_detStore
ServiceHandle< StoreGateSvc > m_detStore
Definition: L1CaloCondSvc.h:83
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
Definition: L1CaloCondSvc.h:28
ServiceHandle< StoreGateSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37