ATLAS Offline Software
Loading...
Searching...
No Matches
TrigSORFromPtreeHelper.cxx File Reference
#include "TrigSORFromPtreeHelper.h"
#include "AthenaKernel/IIOVDbSvc.h"
#include "AthenaKernel/IAddressProvider.h"
#include "AthenaBaseComps/AthCheckMacros.h"
#include "CxxUtils/checker_macros.h"
#include <ctime>
#include <eformat/DetectorMask.h>
Include dependency graph for TrigSORFromPtreeHelper.cxx:

Go to the source code of this file.

Functions

StatusCode TrigSORFromPtreeHelper::createSOR ATLAS_NOT_THREAD_SAFE () const

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

StatusCode TrigSORFromPtreeHelper::createSOR ATLAS_NOT_THREAD_SAFE ( void ) const

Definition at line 91 of file TrigSORFromPtreeHelper.cxx.

92{
93 // obtain SOR contents from ptree
94 auto attrList = getAttrList();
95
96 // Validity
97 IOVTime iovTimeStart(attrList["RunNumber"].data<unsigned int>(),0);
98 IOVTime iovTimeStop(attrList["RunNumber"].data<unsigned int>()+1,0);
99 IOVRange iovRange(iovTimeStart, iovTimeStop);
100
101 auto sor = new SOR(/*hasRunLumiBlockTime*/true);
102 sor->add(SOR::ChanNum{0}, attrList);
103 sor->add(SOR::ChanNum{0}, iovRange);
104 sor->resetMinRange();
105 sor->addNewStart(iovTimeStart);
106 sor->addNewStop(iovTimeStop);
107
108 // Record or overwrite existing SOR
109 if ( m_detStore->transientContains<SOR>(m_sorpath) ) {
110 const SOR * oldsor = m_detStore->retrieve<const SOR>(m_sorpath);
111 ATH_MSG_INFO("Overwriting SOR contents (a dump of the old one follows):");
112 oldsor->dump();
113 ATH_CHECK( m_detStore->overwrite(sor, m_sorpath, true) );
114 }
115 else {
116 ATH_MSG_DEBUG("Recording new SOR");
117 ATH_CHECK( m_detStore->record(sor, m_sorpath, true) );
118 }
119
120 ATH_CHECK( setIOVRange(iovRange) );
121 ATH_CHECK( updateProxy(sor) );
122
123 ATH_MSG_INFO("Successfully setup SOR:");
124 sor->dump();
125
126 return StatusCode::SUCCESS;
127}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
Validity Range object.
Definition IOVRange.h:30
Basic time unit for IOVSvc.
Definition IOVTime.h:33