ATLAS Offline Software
TrigSORFromPtreeHelper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef TRIGSORFROMPTREEHELPER_H_
5 #define TRIGSORFROMPTREEHELPER_H_
6 
9 #include "GaudiKernel/ServiceHandle.h"
10 #include "GaudiKernel/StatusCode.h"
11 #include "StoreGate/StoreGateSvc.h"
12 #include <boost/property_tree/ptree.hpp>
13 
15 class IMessageSvc;
16 
26 public:
28 
37  const std::string& sorpath, const boost::property_tree::ptree& rparams);
38 
43  void setRunNumber(unsigned int run) { m_runNumber = run; }
44 
49  void setSORtime_ns(unsigned long long sorTime_ns) { m_sorTime_ns = sorTime_ns; }
50 
55  StatusCode fillSOR(const EventContext& ctx) const;
56 
60  EventIDBase eventID() const;
61 
62 private:
63  StatusCode createSOR ATLAS_NOT_THREAD_SAFE () const;
65  StatusCode setIOVRange(IOVRange& iovRange) const;
66  StatusCode updateProxy(SOR* sor) const;
67 
69  std::string m_sorpath;
71  unsigned int m_runNumber{0};
72  unsigned long long m_sorTime_ns{0};
73 };
74 
75 #endif /* TRIGSORFROMPTREEHELPER_H_ */
TrigSORFromPtreeHelper::fillSOR
StatusCode fillSOR(const EventContext &ctx) const
Fill SOR record in Detector Store, reusing if present or creating new one otherwise/ @params ctx Even...
Definition: TrigSORFromPtreeHelper.cxx:49
TrigSORFromPtreeHelper::updateProxy
StatusCode updateProxy(SOR *sor) const
Definition: TrigSORFromPtreeHelper.cxx:178
IOVRange
Validity Range object. Holds two IOVTimes (start and stop)
Definition: IOVRange.h:30
TrigSORFromPtreeHelper
Helper class for Start Of Run (SOR) record.
Definition: TrigSORFromPtreeHelper.h:25
CondAttrListCollection.h
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
TrigSORFromPtreeHelper::ATLAS_NOT_THREAD_SAFE
StatusCode createSOR ATLAS_NOT_THREAD_SAFE() const
TrigSORFromPtreeHelper::TrigSORFromPtreeHelper
TrigSORFromPtreeHelper(IMessageSvc *msgSvc, const ServiceHandle< StoreGateSvc > &detStore, const std::string &sorpath, const boost::property_tree::ptree &rparams)
Create the SOR helper @params msgSvc Pointer to MessageSvc @params detStore Handle to DetectorStore @...
Definition: TrigSORFromPtreeHelper.cxx:23
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
TrigSORFromPtreeHelper::setRunNumber
void setRunNumber(unsigned int run)
Overwrite run number from RunParams @params run New run number.
Definition: TrigSORFromPtreeHelper.h:43
TrigSORFromPtreeHelper::ATLAS_NOT_THREAD_SAFE
coral::AttributeList getAttrList ATLAS_NOT_THREAD_SAFE() const
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
TrigSORFromPtreeHelper::m_sorTime_ns
unsigned long long m_sorTime_ns
Definition: TrigSORFromPtreeHelper.h:72
TrigSORFromPtreeHelper::m_detStore
ServiceHandle< StoreGateSvc > m_detStore
Definition: TrigSORFromPtreeHelper.h:68
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrigSORFromPtreeHelper::SOR
CondAttrListCollection SOR
Definition: TrigSORFromPtreeHelper.h:27
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
TrigSORFromPtreeHelper::m_sorpath
std::string m_sorpath
Definition: TrigSORFromPtreeHelper.h:69
run
Definition: run.py:1
TrigSORFromPtreeHelper::m_runNumber
unsigned int m_runNumber
Definition: TrigSORFromPtreeHelper.h:71
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
ptree
boost::property_tree::ptree ptree
Definition: JsonFileLoader.cxx:16
TrigSORFromPtreeHelper::setIOVRange
StatusCode setIOVRange(IOVRange &iovRange) const
Definition: TrigSORFromPtreeHelper.cxx:165
TrigSORFromPtreeHelper::m_rparams
const boost::property_tree::ptree & m_rparams
Definition: TrigSORFromPtreeHelper.h:70
TrigSORFromPtreeHelper::setSORtime_ns
void setSORtime_ns(unsigned long long sorTime_ns)
Overwrite SOR time from RunParams @params sorTime_ns New start of run time in nanoseconds since epoch...
Definition: TrigSORFromPtreeHelper.h:49
TrigSORFromPtreeHelper::eventID
EventIDBase eventID() const
Create an EventIDBase filled with the value from rparams.
Definition: TrigSORFromPtreeHelper.cxx:76
AthMessaging.h
StoreGateSvc.h
ServiceHandle< StoreGateSvc >