ATLAS Offline Software
OutputConditionsAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef REGISTRATIONSVC_OUTPUTCONDALG_H
6 #define REGISTRATIONSVC_OUTPUTCONDALG_H
7 // OutputConditionsAlg.h
8 // an Algorithm to output conditions data on an AthenaOutputStream and
9 // optionally register it in the conditions database
10 // Richard Hawkings, started 1/9/05, from a skeleton by Walter Lampl
11 
13 #include "GaudiKernel/ServiceHandle.h"
14 #include "GaudiKernel/ToolHandle.h"
15 #include "AthenaKernel/IOVTime.h"
16 #include <vector>
17 #include <string>
18 
20 class IClassIDSvc;
22 
24 {
25 public:
26 
27  OutputConditionsAlg(const std::string& name, ISvcLocator* pSvcLocator);
29 
33 
34 private:
35 
36  ServiceHandle<IClassIDSvc> p_clidsvc{this,"ClassIDSvc","ClassIDSvc"};
37  ServiceHandle<IIOVRegistrationSvc> p_regsvc{this, "IOVRegistrationSvc","IOVRegistrationSvc"};
38 
39  uint64_t timeToNano(unsigned long int timesec) const;
40 
41  typedef ToolHandle<IAthenaOutputStreamTool> IAthenaOutputStreamTool_t;
43 
44  Gaudi::Property<std::vector<std::string> > m_objectList{this,"ObjectList",{},"List of object to be written","OrderedSet<std::string>"};
45  Gaudi::Property<std::string> m_streamName{this,"StreamName","ConditionsAlgStream"};
46  Gaudi::Property<bool> m_par_writeIOV{this,"WriteIOV",true};
47  Gaudi::Property<unsigned int> m_par_run1 {this,"Run1",IOVTime::MINRUN,"IOV start (run-number)"};
48  Gaudi::Property<unsigned int> m_par_lumib1 {this,"LB1",IOVTime::MINEVENT,"IOV start (LB-number)"};
49  Gaudi::Property<unsigned int> m_par_run2 {this,"Run2",IOVTime::MAXRUN,"IOV end (run-number)"};
50  Gaudi::Property<unsigned int> m_par_lumib2 {this,"LB2",IOVTime::MAXEVENT,"IOV end (LB-number)"};
51  UnsignedLongProperty m_par_time1 {this,"Time1",IOVTime::MINTIMESTAMP,"IOV start (timestamp)"};
52  UnsignedLongProperty m_par_time2 {this,"Time2",IOVTime::MAXEVENT,"IOV end (timestamp)"};
53  Gaudi::Property<bool> m_par_timestamp {this,"UseTime",false,"IOV in second or Run/LB"};
54  Gaudi::Property<std::vector<std::string> > m_par_iovtags {this,"IOVTagList",{},"List of Tags to be written","OrderedSet<std::string>"};
55 };
56 
57 #endif // REGISTRATIONSVC_OUTPUTCONDALG_H
IOVTime::MAXRUN
static constexpr uint32_t MAXRUN
Definition: IOVTime.h:48
OutputConditionsAlg::m_par_lumib2
Gaudi::Property< unsigned int > m_par_lumib2
Definition: OutputConditionsAlg.h:50
OutputConditionsAlg::OutputConditionsAlg
OutputConditionsAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: OutputConditionsAlg.cxx:16
IAthenaOutputStreamTool
This is a tool that allows streaming out of DataObjects. This has been factorized out from AthenaOutp...
Definition: IAthenaOutputStreamTool.h:69
OutputConditionsAlg::p_regsvc
ServiceHandle< IIOVRegistrationSvc > p_regsvc
Definition: OutputConditionsAlg.h:37
IOVTime.h
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
IOVTime::MINRUN
static constexpr uint32_t MINRUN
Definition: IOVTime.h:44
OutputConditionsAlg::m_streamer
IAthenaOutputStreamTool_t m_streamer
Definition: OutputConditionsAlg.h:42
AthAlgorithm.h
OutputConditionsAlg::p_clidsvc
ServiceHandle< IClassIDSvc > p_clidsvc
Definition: OutputConditionsAlg.h:36
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
OutputConditionsAlg::initialize
StatusCode initialize()
Definition: OutputConditionsAlg.cxx:26
OutputConditionsAlg::m_par_iovtags
Gaudi::Property< std::vector< std::string > > m_par_iovtags
Definition: OutputConditionsAlg.h:54
OutputConditionsAlg::m_par_time1
UnsignedLongProperty m_par_time1
Definition: OutputConditionsAlg.h:51
OutputConditionsAlg
Definition: OutputConditionsAlg.h:24
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
IIOVRegistrationSvc
This is an interface to a service used to register conditions objects in the Interval of Validity (IO...
Definition: IIOVRegistrationSvc.h:51
OutputConditionsAlg::finalize
StatusCode finalize()
Definition: OutputConditionsAlg.cxx:58
AthAlgorithm
Definition: AthAlgorithm.h:47
IOVTime::MAXEVENT
static constexpr uint32_t MAXEVENT
Definition: IOVTime.h:51
OutputConditionsAlg::m_par_writeIOV
Gaudi::Property< bool > m_par_writeIOV
Definition: OutputConditionsAlg.h:46
OutputConditionsAlg::execute
StatusCode execute()
Definition: OutputConditionsAlg.cxx:53
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
OutputConditionsAlg::timeToNano
uint64_t timeToNano(unsigned long int timesec) const
Definition: OutputConditionsAlg.cxx:197
OutputConditionsAlg::~OutputConditionsAlg
~OutputConditionsAlg()
Definition: OutputConditionsAlg.cxx:22
IOVTime::MINEVENT
static constexpr uint32_t MINEVENT
Definition: IOVTime.h:50
OutputConditionsAlg::m_par_timestamp
Gaudi::Property< bool > m_par_timestamp
Definition: OutputConditionsAlg.h:53
OutputConditionsAlg::IAthenaOutputStreamTool_t
ToolHandle< IAthenaOutputStreamTool > IAthenaOutputStreamTool_t
Definition: OutputConditionsAlg.h:41
OutputConditionsAlg::m_par_time2
UnsignedLongProperty m_par_time2
Definition: OutputConditionsAlg.h:52
OutputConditionsAlg::m_streamName
Gaudi::Property< std::string > m_streamName
Definition: OutputConditionsAlg.h:45
OutputConditionsAlg::m_par_run1
Gaudi::Property< unsigned int > m_par_run1
Definition: OutputConditionsAlg.h:47
IOVTime::MINTIMESTAMP
static constexpr uint64_t MINTIMESTAMP
Definition: IOVTime.h:56
OutputConditionsAlg::m_par_run2
Gaudi::Property< unsigned int > m_par_run2
Definition: OutputConditionsAlg.h:49
OutputConditionsAlg::m_par_lumib1
Gaudi::Property< unsigned int > m_par_lumib1
Definition: OutputConditionsAlg.h:48
ServiceHandle< IClassIDSvc >
OutputConditionsAlg::m_objectList
Gaudi::Property< std::vector< std::string > > m_objectList
Definition: OutputConditionsAlg.h:44