|
ATLAS Offline Software
|
Go to the documentation of this file.
6 #include "GaudiKernel/ISvcLocator.h"
7 #include "GaudiKernel/IIncidentSvc.h"
8 #include "GaudiKernel/IIoComponentMgr.h"
14 #include "CoolKernel/IObject.h"
22 , m_lastLumiBlock(9999999)
24 , m_metaStore(
"StoreGateSvc/MetaDataStore",
name)
41 incSvc->addListener(
this,
"MetaDataStop", 50);
46 if (!ioMgr->io_register(
this).isSuccess()) {
47 ATH_MSG_FATAL(
"Could not register myself with the IoComponentMgr");
48 return(StatusCode::FAILURE);
57 return StatusCode::SUCCESS;
72 return StatusCode::FAILURE;
99 return StatusCode::SUCCESS;
107 return StatusCode::SUCCESS;
117 std::unique_ptr<xAOD::LumiBlockRangeContainer> piovComplete = std::make_unique<xAOD::LumiBlockRangeContainer>();
118 std::unique_ptr<xAOD::LumiBlockRangeAuxContainer> piovCompleteAux = std::make_unique<xAOD::LumiBlockRangeAuxContainer>();
119 piovComplete->setStore( piovCompleteAux.get() );
121 std::unique_ptr<xAOD::LumiBlockRangeContainer> piovUnfinished = std::make_unique<xAOD::LumiBlockRangeContainer>();
122 std::unique_ptr<xAOD::LumiBlockRangeAuxContainer> piovUnfinishedAux = std::make_unique<xAOD::LumiBlockRangeAuxContainer>();
123 piovUnfinished->setStore( piovUnfinishedAux.get() );
125 std::unique_ptr<xAOD::LumiBlockRangeContainer> piovSuspect = std::make_unique<xAOD::LumiBlockRangeContainer>();
126 std::unique_ptr<xAOD::LumiBlockRangeAuxContainer> piovSuspectAux = std::make_unique<xAOD::LumiBlockRangeAuxContainer>();
127 piovSuspect->setStore( piovSuspectAux.get() );
138 else if(
p.second.second >
p.second.first) {
152 if(!piovComplete->
empty()) {
156 << lbr->startRunNumber() <<
"," << lbr->startLumiBlockNumber()
158 << lbr->startRunNumber() <<
"," << lbr->startLumiBlockNumber()
159 <<
") eventsSeen = " << lbr->eventsSeen()
160 <<
", eventsExpected = " << lbr->eventsExpected()
165 if(!piovUnfinished->
empty()) {
166 ATH_MSG_INFO(
"Number of Unfinished LumiBlocks:" << piovUnfinished->
size() );
169 << lbr->startRunNumber() <<
"," << lbr->startLumiBlockNumber()
171 << lbr->startRunNumber() <<
"," << lbr->startLumiBlockNumber()
172 <<
") eventsSeen = " << lbr->eventsSeen()
173 <<
", eventsExpected = " << lbr->eventsExpected()
178 if(!piovSuspect->
empty()) {
182 << lbr->startRunNumber() <<
"," << lbr->startLumiBlockNumber()
184 << lbr->startRunNumber() <<
"," << lbr->startLumiBlockNumber()
185 <<
") eventsSeen = " << lbr->eventsSeen()
186 <<
", eventsExpected = " << lbr->eventsExpected()
193 if(!piovComplete->
empty()) {
198 if(!piovUnfinished->
empty()) {
203 if(!piovSuspect->
empty()) {
211 return StatusCode::SUCCESS;
218 if(inc.type() ==
"MetaDataStop") {
219 ATH_MSG_INFO(
" finishUp: write lumiblocks to meta data store " );
242 for (;
it != last; ++
it) {
245 int chan = (*it).first;
246 std::string theName = nitr->second;
264 if (attrList[
"NEventRec"].isNull()) {
265 ATH_MSG_INFO(
" NEventRec not in database. Set it to 0 " );
269 cool::Int32
nev = attrList[
"NEventRec"].data<cool::Int32>();
283 return StatusCode::SUCCESS;
JetConstituentVector::iterator iterator
const_iterator end() const
void setStopLumiBlockNumber(uint32_t value)
Set the luminosity block of the stop time of the range.
virtual void handle(const Incident &incident) override
Incident service handle listening for MetaDataStop.
void setStopRunNumber(uint32_t value)
Set the run number of the stop time of the range.
Gaudi::Property< std::string > m_LBColl_name
virtual StatusCode execute() override
void setStartRunNumber(uint32_t value)
Set the run number of the start time of the range.
virtual StatusCode finalize() override
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
Gaudi::Property< bool > m_checkEventsExpected
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
Gaudi::Property< std::string > m_suspectLBColl_name
CreateLumiBlockCollectionFromFile(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode io_reinit() override
Callback method to reinitialize the internal state of the component for I/O purposes (e....
LumiBlockRange_v1 LumiBlockRange
Declare the latest version of the class.
ChanNameMap::const_iterator name_const_iterator
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
void setEventsExpected(uint32_t value)
Set the number of expected events in this luminosity block range.
uint32_t getNEventsFromDb()
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode initialize() override
void setEventsSeen(uint32_t value)
Set the number of seen/processed events in this luminosity block range.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
name_size_type name_size() const
number of Chan/Name pairs
std::pair< uint32_t, uint32_t > inOut
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
StatusCode fillLumiBlockCollection()
Fill metaDataStore and ntuples.
Class describing a luminosity block range.
ChanAttrListMap::const_iterator const_iterator
Gaudi::Property< std::string > m_unfinishedLBColl_name
name_const_iterator chanNamePair(ChanNum chanNum) const
Access to Chan/Name pairs via channel number: returns map iterator.
ServiceHandle< StoreGateSvc > m_metaStore
SG::ReadCondHandleKey< CondAttrListCollection > m_rchk
Gaudi::Property< std::string > m_streamName
size_type size() const noexcept
Returns the number of elements in the collection.
void setStartLumiBlockNumber(uint32_t value)
Set the luminosity block of the start time of the range.
bool empty() const noexcept
Returns true if the collection is empty.
bool match(std::string s1, std::string s2)
match the individual directories of two strings