ATLAS Offline Software
Loading...
Searching...
No Matches
OutputConditionsAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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 (COOL or CREST)
10// Richard Hawkings, started 1/9/05, from a skeleton by Walter Lampl
11
13#include "GaudiKernel/ServiceHandle.h"
14#include "GaudiKernel/ToolHandle.h"
16#include "GaudiKernel/IAddressCreator.h"
18#include "GaudiKernel/IClassIDSvc.h"
20
21#include <vector>
22#include <string>
23
24
26{
27public:
28
31
32 StatusCode initialize();
33 StatusCode execute(const EventContext& ctx);
34 StatusCode finalize();
35
36private:
37
38 ServiceHandle<IClassIDSvc> p_clidsvc{this,"ClassIDSvc","ClassIDSvc"};
39 ServiceHandle<IIOVRegistrationSvc> p_regsvc{this, "IOVRegistrationSvc","IOVRegistrationSvc"};
40 ServiceHandle<IAddressCreator> m_persSvc{this,"EventPersistencySvc","EventPersistencySvc"};
41
42
43 ToolHandle<IAthenaOutputStreamTool> m_streamer{this,"StreamName","AthenaOutputStreamTool/ConditionsAlgStream"};
44
45 Gaudi::Property<std::vector<std::string> > m_objectList{this,"ObjectList",{},"List of object to be written","OrderedSet<std::string>"};
46 Gaudi::Property<bool> m_par_writeIOV{this,"WriteIOV",true};
47 Gaudi::Property<std::string> m_par_crestDir{this,"CrestDir",""};
48 Gaudi::Property<unsigned int> m_par_run1 {this,"Run1",IOVTime::MINRUN,"IOV start (run-number)"};
49 Gaudi::Property<unsigned int> m_par_lumib1 {this,"LB1",IOVTime::MINEVENT,"IOV start (LB-number)"};
50 Gaudi::Property<unsigned int> m_par_run2 {this,"Run2",IOVTime::MAXRUN,"IOV end (run-number),ignored in CREST mode"};
51 Gaudi::Property<unsigned int> m_par_lumib2 {this,"LB2",IOVTime::MAXEVENT,"IOV end (LB-number), ignored in CREST mode"};
52 UnsignedLongProperty m_par_time1 {this,"Time1",IOVTime::MINTIMESTAMP,"IOV start (timestamp)"};
53 UnsignedLongProperty m_par_time2 {this,"Time2",IOVTime::MAXEVENT,"IOV end (timestamp), ignored in CREST mode"};
54 Gaudi::Property<bool> m_par_timestamp {this,"UseTime",false,"IOV in second or Run/LB"};
55 Gaudi::Property<std::vector<std::string> > m_par_iovtags {this,"IOVTagList",{},"List of Tags to be written","OrderedSet<std::string>"};
56 Gaudi::Property<std::vector<std::string> > m_par_tagDescr {this,"TagDescriptionList",{},"Human-readable description for each tag (only for CREST)","OrderedSet<std::string>"};
57
58 //Internal helper methods:
59 void buildDescription(const std::string& identifier, const std::string& value, std::string& description) const;
60 StatusCode splitAddress(const std::string& address, std::string& address_header, std::string& address_data ) const;
61 uint64_t timeToNano(unsigned long int timesec) const;
62};
63
64#endif // REGISTRATIONSVC_OUTPUTCONDALG_H
Interface to an output stream tool.
This is an interface to a tool used to register conditions objects in the Interval of Validity (IOV) ...
Basic time unit for IOVSvc.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
static constexpr uint32_t MAXRUN
Definition IOVTime.h:49
static constexpr uint32_t MINEVENT
Definition IOVTime.h:51
static constexpr uint64_t MINTIMESTAMP
Definition IOVTime.h:57
static constexpr uint32_t MAXEVENT
Definition IOVTime.h:52
static constexpr uint32_t MINRUN
Definition IOVTime.h:45
uint64_t timeToNano(unsigned long int timesec) const
UnsignedLongProperty m_par_time2
ServiceHandle< IClassIDSvc > p_clidsvc
StatusCode execute(const EventContext &ctx)
Execute method.
Gaudi::Property< std::vector< std::string > > m_par_tagDescr
Gaudi::Property< bool > m_par_writeIOV
void buildDescription(const std::string &identifier, const std::string &value, std::string &description) const
ServiceHandle< IIOVRegistrationSvc > p_regsvc
Gaudi::Property< unsigned int > m_par_lumib2
Gaudi::Property< std::vector< std::string > > m_par_iovtags
Gaudi::Property< bool > m_par_timestamp
ToolHandle< IAthenaOutputStreamTool > m_streamer
StatusCode splitAddress(const std::string &address, std::string &address_header, std::string &address_data) const
ServiceHandle< IAddressCreator > m_persSvc
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Property< std::vector< std::string > > m_objectList
Gaudi::Property< unsigned int > m_par_run2
UnsignedLongProperty m_par_time1
Gaudi::Property< unsigned int > m_par_lumib1
Gaudi::Property< unsigned int > m_par_run1
Gaudi::Property< std::string > m_par_crestDir
std::string description
glabal timer - how long have I taken so far?
Definition hcg.cxx:93