ATLAS Offline Software
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
IOVDbMetaDataTool Class Reference

This is an interface to a tool used to manage the IOV Meta Data for a given object in the Meta Data Store. More...

#include <IOVDbMetaDataTool.h>

Inheritance diagram for IOVDbMetaDataTool:
Collaboration diagram for IOVDbMetaDataTool:

Public Member Functions

 IOVDbMetaDataTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~IOVDbMetaDataTool ()
 
virtual StatusCode initialize () override
 Initialize AlgTool. More...
 
virtual StatusCode finalize () override
 Finalize AlgTool. More...
 
virtual StatusCode beginInputFile (const SG::SourceID &) override
 Function called when a new input file is opened. More...
 
virtual StatusCode endInputFile (const SG::SourceID &) override
 Function called when the currently open input file got completely processed. More...
 
virtual StatusCode metaDataStop () override
 Function called when the tool should write out its metadata. More...
 
virtual void handle (const Incident &incident) override
 Incident service handle listening for BeginInputFile and EndInputFile. More...
 
virtual StatusCode registerFolder (const std::string &folderName, const std::string &folderDescription) const override
 Register folder in the IOV Db MetaData - done once at initialize. More...
 
virtual StatusCode registerFolder (const std::string &folderName) const override
 Register folder in the IOV Db MetaData without folder description - uses default folder description for CondAttrListCollection. More...
 
virtual StatusCode addPayload (const std::string &folderName, CondAttrListCollection *payload) const override
 Add an IOV and Payload for a particular folder - replaces payloads if there is an IOV overlap. More...
 
virtual StatusCode processInputFileMetaData (const std::string &fileName) override
 Explicit call to process IOV meta data from the input meta data store, transferring it to the main meta data store. More...
 
virtual IOVMetaDataContainerfindMetaDataContainer (const std::string &folderName) const override final
 
virtual void lock_shared () const override final
 
virtual void unlock_shared () const override final
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 Handles to the meta data stores. More...
 

Private Member Functions

IOVMetaDataContainergetMetaDataContainer (const std::string &folderName, const std::string &folderDescription) const
 return meta data container from the meta data store More...
 
void checkOverrideRunNumber ()
 check if we should override the run number in the incoming meta data More...
 
StatusCode overrideIOV (CondAttrListCollection *&coll) const
 override IOV with new run number More...
 
StatusCode modifyPayload (const std::string &folderName, CondAttrListCollection *&payload) const
 Modify a Payload for a particular folder - replaces one of the internal attributes. More...
 

Private Attributes

StoreGateSvc_t m_metaDataStore
 
StoreGateSvc_t m_inputStore
 
StoreGateSvc_t m_condStore
 
bool m_overrideRunNumber
 
bool m_overrideMinMaxRunNumber
 
unsigned int m_newRunNumber
 
unsigned int m_oldRunNumber
 
unsigned int m_minRunNumber
 
unsigned int m_maxRunNumber
 
std::set< std::string > m_filesProcessed
 
UnsignedIntegerArrayProperty m_minMaxRunNumbers {this, "MinMaxRunNumbers", {}, "Min/max run numbers for overriding meta data IOV"}
 
StringArrayProperty m_foldersToBeModified {this, "FoldersToBeModified", {"/Simulation/Parameters"}}
 
StringArrayProperty m_attributesToBeRemoved {this, "AttributesToBeRemoved", {"RandomSeedOffset"}}
 
bool m_modifyFolders
 
Gaudi::Property< std::map< std::string, std::string > > m_payloads
 
std::shared_mutex m_mutex
 

Detailed Description

This is an interface to a tool used to manage the IOV Meta Data for a given object in the Meta Data Store.

Definition at line 39 of file IOVDbMetaDataTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

Handles to the meta data stores.

Definition at line 113 of file IOVDbMetaDataTool.h.

Constructor & Destructor Documentation

◆ IOVDbMetaDataTool()

IOVDbMetaDataTool::IOVDbMetaDataTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 35 of file IOVDbMetaDataTool.cxx.

38  : base_class(type, name, parent)
39  , m_metaDataStore ("StoreGateSvc/MetaDataStore", name)
40  , m_inputStore ("StoreGateSvc/InputMetaDataStore", name)
41  , m_condStore ("StoreGateSvc/ConditionStore", name)
42  , m_overrideRunNumber(false)
44  , m_newRunNumber(0)
45  , m_oldRunNumber(0)
46  , m_minRunNumber(0)
47  , m_maxRunNumber(0)
48  , m_modifyFolders(false)
49 {
50 }

◆ ~IOVDbMetaDataTool()

IOVDbMetaDataTool::~IOVDbMetaDataTool ( )
virtual

Definition at line 53 of file IOVDbMetaDataTool.cxx.

54 {}

Member Function Documentation

◆ addPayload()

StatusCode IOVDbMetaDataTool::addPayload ( const std::string &  folderName,
CondAttrListCollection payload 
) const
overridevirtual

Add an IOV and Payload for a particular folder - replaces payloads if there is an IOV overlap.

Definition at line 363 of file IOVDbMetaDataTool.cxx.

365 {
366  // lock the tool while it is modifying the folder
367  std::scoped_lock guard( m_mutex );
368 
369  ATH_MSG_DEBUG("begin addPayload ");
370 
371  // Check if the folder has already been found
373  if(cont) {
374  ATH_MSG_DEBUG("Retrieved IOVMetaDataContainer from MetaDataStore for folder "
375  << folderName);
376  }
377  else {
378  ATH_MSG_ERROR("addPayload: Could not find IOVMetaDataContainer in MetaDataStore for folder "
379  << folderName
380  << ". One must have previously called registerFolder. ");
381  return StatusCode::FAILURE;
382  }
383 
384  // Override run number if requested
387  }
388 
389  // Add payload to container
390  bool success = cont->merge(payload);
391  if (success) {
392  ATH_MSG_DEBUG("Added new payload for folder " << folderName);
393  }
394  else {
395  ATH_MSG_DEBUG("Could not add new payload for folder "
396  << folderName
397  << " (may be duplicate payload).");
398 
399  // To Do: the function implicitly assumes ownership on the payload pointer
400  delete payload;
401  payload = nullptr;
402  }
403 
404  // Debug printout
405  if(payload && msgLvl(MSG::DEBUG)) {
406  std::ostringstream stream;
407  payload->dump(stream);
408  ATH_MSG_DEBUG(stream.str());
409  }
410 
411  return StatusCode::SUCCESS;
412 }

◆ beginInputFile()

StatusCode IOVDbMetaDataTool::beginInputFile ( const SG::SourceID sid)
overridevirtual

Function called when a new input file is opened.

Definition at line 227 of file IOVDbMetaDataTool.cxx.

228 {
229  if (!m_filesProcessed.contains(sid)) {
231  m_filesProcessed.insert(sid);
232  }
233  return StatusCode::SUCCESS;
234 }

◆ checkOverrideRunNumber()

void IOVDbMetaDataTool::checkOverrideRunNumber ( )
private

check if we should override the run number in the incoming meta data

Definition at line 249 of file IOVDbMetaDataTool.cxx.

250 {
251  ATH_MSG_DEBUG("begin checkOverrideRunNumber");
252 
253  // Check if override run numbers have been set by properties or by
254  // the EventSelector
255 
256  if (m_minMaxRunNumbers.value().size() > 0) {
258  m_minRunNumber = m_minMaxRunNumbers.value()[0];
259  if (m_minMaxRunNumbers.value().size() > 1) m_maxRunNumber = m_minMaxRunNumbers.value()[1];
261 
263 
264  ATH_MSG_INFO("checkOverrideRunNumber: overriding IOV for range - min: " << m_minRunNumber
265  << " max: " << m_maxRunNumber);
266  return;
267  }
268 
269  ATH_MSG_DEBUG("checkOverrideRunNumber: check if tag is set in jobOpts");
270 
271  // Get name of event selector from the application manager to
272  // make sure we get the one for MC signal events
273  SmartIF<IProperty> appMgr{serviceLocator()->service("ApplicationMgr")};
274  if (!appMgr) {
275  ATH_MSG_ERROR("checkOverrideRunNumber: Cannot get ApplicationMgr ");
276  return;
277  }
278  StringProperty property("EvtSel", "");
279  StatusCode sc = appMgr->getProperty(&property);
280  if (!sc.isSuccess()) {
281  ATH_MSG_ERROR("checkOverrideRunNumber: unable to get EvtSel: found " << property.value());
282  return;
283  }
284  // Get EventSelector for ApplicationMgr
285  const std::string eventSelector = property.value();
286  SmartIF<IProperty> evtSel{serviceLocator()->service(eventSelector)};
287  if (!evtSel) {
288  ATH_MSG_ERROR("checkOverrideRunNumber: Cannot get EventSelector " << eventSelector);
289  return;
290  }
291 
292  // Is flag set to override the run number?
293  BooleanProperty overrideRunNumber("OverrideRunNumberFromInput", false);
294  sc = evtSel->getProperty(&overrideRunNumber);
295  if (!sc.isSuccess()) {
296  // Not all EventSelectors have this property, so we must be tolerant
297  ATH_MSG_DEBUG("resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector ");
298  return;
299  }
300  m_overrideRunNumber = overrideRunNumber.value();
301  if (m_overrideRunNumber) {
302  // New run number
303  IntegerProperty runNumber("RunNumber", 0);
304  sc = evtSel->getProperty(&runNumber);
305  if (!sc.isSuccess()) {
306  ATH_MSG_ERROR("checkOverrideRunNumber: unable to get RunNumber from EventSelector: found "
307  << runNumber.value());
308  return;
309  }
310  m_newRunNumber = runNumber.value();
311  // Old run number
312  IntegerProperty oldRunNumber("OldRunNumber", 0);
313  sc = evtSel->getProperty(&oldRunNumber);
314  if (!sc.isSuccess()) {
315  ATH_MSG_ERROR("checkOverrideRunNumber: unable to get OldRunNumber from EventSelector: found "
316  << oldRunNumber.value());
317  return;
318  }
319  m_oldRunNumber = oldRunNumber.value();
320 
321  ATH_MSG_DEBUG("checkOverrideRunNumber: Changing old to new run number: " << m_oldRunNumber
322  << " " << m_newRunNumber << " obtained from " << eventSelector);
323  }
324  else ATH_MSG_DEBUG("checkOverrideRunNumber: OverrideRunNumberFromInput not set for " << eventSelector);
325 }

◆ endInputFile()

StatusCode IOVDbMetaDataTool::endInputFile ( const SG::SourceID )
overridevirtual

Function called when the currently open input file got completely processed.

Definition at line 236 of file IOVDbMetaDataTool.cxx.

237 {
238  return StatusCode::SUCCESS;
239 }

◆ finalize()

StatusCode IOVDbMetaDataTool::finalize ( )
overridevirtual

Finalize AlgTool.

Definition at line 204 of file IOVDbMetaDataTool.cxx.

205 {
206  return StatusCode::SUCCESS;
207 }

◆ findMetaDataContainer()

IOVMetaDataContainer * IOVDbMetaDataTool::findMetaDataContainer ( const std::string &  folderName) const
finaloverridevirtual

Definition at line 504 of file IOVDbMetaDataTool.cxx.

505 {
506  // lock the tool before this call
507  // Return the folder if it is in the meta data store
508  return m_metaDataStore->tryRetrieve<IOVMetaDataContainer>(folderName);
509 }

◆ getMetaDataContainer()

IOVMetaDataContainer * IOVDbMetaDataTool::getMetaDataContainer ( const std::string &  folderName,
const std::string &  folderDescription 
) const
private

return meta data container from the meta data store

Definition at line 513 of file IOVDbMetaDataTool.cxx.

515 {
516  // protected by locks in addPayload() and registerFolder()
517  ATH_MSG_DEBUG("begin getMetaDataContainer ");
518 
519  IOVMetaDataContainer* cont{nullptr};
520  // See if it is in the meta data store
522  // Container not found, add in new one
523  cont = new IOVMetaDataContainer(folderName, folderDescription);
524  ATH_MSG_DEBUG("No IOVMetaDataContainer in MetaDataStore for folder " << folderName
525  << ". Created a new instance");
526  StatusCode sc = m_metaDataStore->record(cont, folderName);
527  if (!sc.isSuccess()) {
528  ATH_MSG_ERROR("Could not record IOVMetaDataContainer in MetaDataStore for folder " << folderName);
529  delete cont;
530  cont = nullptr;
531  }
532  }
533  else {
534  ATH_MSG_DEBUG("IOVMetaDataContainer already in MetaDataStore for folder " << folderName);
535  StatusCode sc = m_metaDataStore->retrieve(cont, folderName);
536  if (!sc.isSuccess()) {
537  ATH_MSG_ERROR("Could not retrieve IOVMetaDataContainer in MetaDataStore for folder " << folderName);
538  cont = nullptr;
539  }
540  }
541  return cont;
542 }

◆ handle()

void IOVDbMetaDataTool::handle ( const Incident &  incident)
overridevirtual

Incident service handle listening for BeginInputFile and EndInputFile.

Definition at line 211 of file IOVDbMetaDataTool.cxx.

212 {
213  const FileIncident* fileInc = dynamic_cast<const FileIncident*>(&inc);
214  if(!fileInc) throw std::runtime_error("Unable to get FileName from FirstInputFile incident");
215 
216  const std::string fileName = fileInc->fileName();
217  ATH_MSG_DEBUG("handle() " << inc.type() << " for " << fileName);
218 
219  // Check if we need to override run number - only needed for simulation
221 
223  if(!sc.isSuccess()) throw std::runtime_error("Could not process input file meta data");
224  m_filesProcessed.insert(std::move(fileName));
225 }

◆ initialize()

StatusCode IOVDbMetaDataTool::initialize ( )
overridevirtual

Initialize AlgTool.

Definition at line 59 of file IOVDbMetaDataTool.cxx.

60 {
61  ATH_MSG_DEBUG("in initialize()");
62 
63  // Set to be listener for FirstInputFile
64  ServiceHandle<IIncidentSvc> incSvc("IncidentSvc", this->name());
65  ATH_CHECK(incSvc.retrieve());
66  incSvc->addListener(this, "FirstInputFile", 60); // pri has to be < 100 to be after MetaDataSvc.
67 
68  // locate the meta data stores
69  ATH_CHECK(m_metaDataStore.retrieve());
70  ATH_CHECK(m_inputStore.retrieve());
71 
72  // Check whether folders need to be modified
73  m_modifyFolders = (m_foldersToBeModified.value().size()>0);
74  ATH_MSG_DEBUG("initialize(): " << (m_modifyFolders ? "" : "No ") << "need to modify folders");
75 
76  // Process direct payloads if configured
77  if (!m_payloads.value().empty()) {
78  // Group by folder: parse "folder:key" format from flat map
79  std::map<std::string, std::map<std::string, std::string>> folderPayloads;
80 
81  for (const auto& [key, value] : m_payloads.value()) {
82  // Split key on ':' to get folder and parameter name
83  size_t colonPos = key.find(':');
84  if (colonPos == std::string::npos) {
85  ATH_MSG_ERROR("Invalid payload key format: " << key << " (expected 'folder:key')");
86  return StatusCode::FAILURE;
87  }
88 
89  std::string folderName = key.substr(0, colonPos);
90  std::string paramName = key.substr(colonPos + 1);
91  folderPayloads[folderName][paramName] = value;
92  }
93 
94  ATH_MSG_DEBUG("Processing " << folderPayloads.size() << " folder(s) for direct payload registration");
95 
96  // Store payloads for ConditionStore registration (after MetaDataStore registration)
97  std::map<std::string, std::pair<std::unique_ptr<CondAttrListCollection>, EventIDRange>> payloadsForCondStore;
98 
99  for (const auto& [folderName, parameters] : folderPayloads) {
100  // Extract beginRun and endRun from parameters
101  if (!parameters.contains("beginRun") || !parameters.contains("endRun")) {
102  ATH_MSG_ERROR("Payload for folder " << folderName << " missing beginRun or endRun");
103  return StatusCode::FAILURE;
104  }
105 
106  unsigned int beginRun = std::stoul(parameters.at("beginRun"));
107  unsigned int endRun = std::stoul(parameters.at("endRun"));
108 
109  // Create filtered parameters map without beginRun/endRun
110  std::map<std::string, std::string> filteredParams;
111  std::ranges::copy_if(parameters, std::inserter(filteredParams, filteredParams.end()),
112  [](const auto& p) { return p.first != "beginRun" && p.first != "endRun"; });
113 
114  ATH_MSG_DEBUG("Registering folder " << folderName << " with " << filteredParams.size()
115  << " parameters, IOV [" << beginRun << ", " << endRun << "]");
116 
118 
119  // Build payload for MetaDataStore
120  // Note: AttributeListSpecification has protected destructor, must use new
121  // The AttributeList constructor with 'true' takes ownership and will call release()
122  coral::AttributeListSpecification* spec = new coral::AttributeListSpecification();
123  for (const auto& [key, value] : filteredParams) {
124  spec->extend(key, "string");
125  }
126 
127  coral::AttributeList attrList(*spec, true);
128  for (const auto& [key, value] : filteredParams) {
129  attrList[key].setValue(value);
130  }
131 
132  auto payload = std::make_unique<CondAttrListCollection>(true);
133  payload->addNewStart(IOVTime(beginRun, 0));
134  payload->addNewStop(IOVTime(endRun, IOVTime::MAXEVENT));
135  payload->add(0, attrList);
136 
137  ATH_MSG_DEBUG("Created payload with IOV [" << beginRun << ", " << endRun << "]");
138 
139  // Store payload copy for ConditionStore registration
140  EventIDRange iovRange(EventIDBase(beginRun, EventIDBase::UNDEFEVT, 0, 0, 0),
141  EventIDBase(endRun, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM));
142  payloadsForCondStore[folderName] = std::make_pair(std::make_unique<CondAttrListCollection>(*payload), iovRange);
143 
144  // Add to MetaDataStore
145  ATH_CHECK(addPayload(folderName, payload.release()));
146  }
147 
148  // Now populate ConditionStore with all payloads
149  if (!payloadsForCondStore.empty()) {
150  ATH_MSG_INFO("Registering " << payloadsForCondStore.size() << " payload(s) to ConditionStore");
151 
152  ATH_CHECK(m_condStore.retrieve());
153 
154  ServiceHandle<Athena::IRCUSvc> rcuSvc("Athena::RCUSvc", name());
155  ATH_CHECK(rcuSvc.retrieve());
156 
157  for (auto& [folderName, payloadPair] : payloadsForCondStore) {
158  auto& [payload, iovRange] = payloadPair;
159 
160  // Check if CondCont<AthenaAttributeList> already exists using contains() to avoid warnings
163  ATH_MSG_INFO("Creating CondCont<AthenaAttributeList> for " << folderName);
164 
168  folderName);
169  if (!cb) {
170  ATH_MSG_ERROR("Failed to create CondCont for " << folderName);
171  return StatusCode::FAILURE;
172  }
173 
174  if (m_condStore->recordObject(cb, folderName, true, false) == nullptr) {
175  ATH_MSG_ERROR("Failed to record CondCont for " << folderName);
176  return StatusCode::FAILURE;
177  }
178  }
179 
180  ATH_CHECK(m_condStore->retrieve(cc, folderName));
181 
182  // Extract AthenaAttributeList from CondAttrListCollection
183  if (payload->size() != 1) {
184  ATH_MSG_ERROR("Expected single-entry CondAttrListCollection for " << folderName << ", got " << payload->size() << " entries");
185  return StatusCode::FAILURE;
186  }
187 
188  auto itr = payload->begin();
189  const coral::AttributeList& attrList = itr->second;
190  auto athAttrList = std::make_unique<AthenaAttributeList>(attrList);
191 
192  ATH_CHECK(cc->insert(iovRange, std::move(athAttrList), Gaudi::Hive::currentContext()));
193  ATH_MSG_INFO("Inserted payload into CondCont for " << folderName << " with IOV " << iovRange);
194  }
195  }
196  }
197 
198  return(StatusCode::SUCCESS);
199 }

◆ lock_shared()

virtual void IOVDbMetaDataTool::lock_shared ( ) const
inlinefinaloverridevirtual

Definition at line 92 of file IOVDbMetaDataTool.h.

92 { m_mutex.lock_shared(); }

◆ metaDataStop()

StatusCode IOVDbMetaDataTool::metaDataStop ( )
overridevirtual

Function called when the tool should write out its metadata.

Definition at line 241 of file IOVDbMetaDataTool.cxx.

242 {
243  return StatusCode::SUCCESS;
244 }

◆ modifyPayload()

StatusCode IOVDbMetaDataTool::modifyPayload ( const std::string &  folderName,
CondAttrListCollection *&  payload 
) const
private

Modify a Payload for a particular folder - replaces one of the internal attributes.

Modify a Payload for a particular folder - replaces one of the internal attributes

Definition at line 417 of file IOVDbMetaDataTool.cxx.

419 {
420  // protected by lock in processInputFileMetaData()
421 
424  ATH_MSG_DEBUG("begin modifyPayload for folder " << folderName);
425 
426  // check if this folder needs to be modified
427  bool modifyAttr = false;
428  std::string attributeName;
429  const std::vector<std::string>& folders = m_foldersToBeModified.value();
430  const std::vector<std::string>& attrs = m_attributesToBeRemoved.value();
431  for (unsigned int i = 0; i < folders.size(); ++i) {
432  if (folderName == folders[i]) {
433  if (attrs.size() > i) {
434  attributeName = attrs[i];
435  modifyAttr = true;
436  ATH_MSG_DEBUG("modifyPayload: remove attribute " << attributeName);
437  break;
438  }
439  }
440  }
441 
442  if (!modifyAttr) {
443  ATH_MSG_DEBUG("modifyPayload: folder " << folderName << " OK ");
444  return StatusCode::SUCCESS;
445  }
446 
447  bool iovSizeIsZero = coll->iov_size() == 0;
448  IOVRange testIOV = coll->minRange();
449  IOVTime start = testIOV.start();
450  IOVTime stop = testIOV.stop();
451  // Set the IOV
453  if (iovSizeIsZero) {
454  // Only add in overall range if channels do not have
455  // IOVs - otherwise this is automatically calculated
456  coll1->addNewStart(start);
457  coll1->addNewStop (stop);
458  }
459  // Add in channels
460  unsigned int nchans = coll->size();
461  bool hasChanNames = (coll->name_size() == nchans);
462  for (unsigned int ichan = 0; ichan < nchans; ++ichan) {
463  CondAttrListCollection::ChanNum chan = coll->chanNum(ichan);
464  // Now filter out the unwanted attribute
466  const CondAttrListCollection::AttributeList& oldAttrList = coll->attributeList(chan);
467  for (unsigned int iatt = 0; iatt < oldAttrList.size(); ++iatt) {
468  // skip the unwanted attribute
469  if (attributeName == oldAttrList[iatt].specification().name()) {
470  ATH_MSG_DEBUG("modifyPayload: skipping attribute name " << oldAttrList[iatt].specification().name());
471  continue;
472  }
473 
474  // copy the rest
475  newAttrList.extend(oldAttrList[iatt].specification().name(),
476  oldAttrList[iatt].specification().type());
477  const coral::Attribute& oldAttr = oldAttrList[iatt];
478  coral::Attribute& newAttr = newAttrList[oldAttrList[iatt].specification().name()];
479  newAttr = oldAttr;
480  // newAttr.setValue(oldAttr.data());
481  ATH_MSG_DEBUG("modifyPayload: copying attr name "
482  << oldAttrList[iatt].specification().name() << " "
483  /*<< newAttr*/);
484  }
485  coll1->add(chan, newAttrList);
486  if (!iovSizeIsZero) coll1->add(chan, coll->iovRange(chan));
487  if(hasChanNames)coll1->add(chan, coll->chanName(chan));
488  ATH_MSG_DEBUG("modifyPayload: copied attribute list for channel " << chan);
489  }
490  delete coll;
491  coll = coll1;
492  if (msgLvl(MSG::DEBUG)) {
493  std::ostringstream stream;
494  coll->dump(stream);
495  ATH_MSG_DEBUG(stream.str());
496  }
497 
498  return StatusCode::SUCCESS;
499 }

◆ overrideIOV()

StatusCode IOVDbMetaDataTool::overrideIOV ( CondAttrListCollection *&  coll) const
private

override IOV with new run number

Definition at line 817 of file IOVDbMetaDataTool.cxx.

818 {
819  ATH_MSG_DEBUG("overrideIOV ");
820 
821  // Override the IOV for run/event IOVs
822 
823  // (ONLY TRUE FOR OVERRIDE COMING IN VIA EVENTSELECTOR:)
824  // NOTE: we require that the old run number falls within the
825  // IOVRange of the incoming collection. We override ALL IOVs for
826  // ALL channels forcing the IOVRange to be (newRunNumber,1) to
827  // (newRunNumber+1,1)
828 
829  bool iovSizeIsZero = coll->iov_size() == 0;
830  IOVRange testIOV = coll->minRange();
831  IOVTime start = testIOV.start();
832  IOVTime stop = testIOV.stop();
833  IOVTime oldRun(m_oldRunNumber, 0);
834  if (start.isRunEvent() && stop.isRunEvent()) { // only for run/event
835  IOVRange newRange;
836  // Two ways of resetting
838  else if (m_overrideRunNumber) newRange = IOVRange(IOVTime(m_newRunNumber, 0), IOVTime(m_newRunNumber + 1, 0));
839 
840  if (m_overrideRunNumber && !testIOV.isInRange(oldRun)) {
841  // old run must be in the range
842  ATH_MSG_ERROR("overrideIOV: old run number does not match. Old run number " << m_oldRunNumber << " IOVRange: " << testIOV);
843  return StatusCode::SUCCESS;
844  }
845 
846  ATH_MSG_DEBUG("overrideIOV: overrideMinMaxRunNumber: " << (int)m_overrideMinMaxRunNumber
847  << " overrideRunNumber " << (int)m_overrideRunNumber
848  << " iovSizeIsZero: " << (int)iovSizeIsZero
849  << " newRange " << newRange);
850 
851  // Now over ride IOVs - two cases: 1) single IOV for full collection, 2) IOVs for individual channels.
852  // Must treat the reset of collection IOV differently
853  if (iovSizeIsZero) {
854  // Only add in overall range if channels do not have
855  // IOVs - otherwise this is automatically calculated
856  coll->resetMinRange(); // must first reset to 'full range' and then reduce the IOVRange accordingly
857  coll->addNewStart(newRange.start());
858  coll->addNewStop (newRange.stop());
859  }
860  else {
861  // Add in channels
862  unsigned int nchans = coll->size();
863  ATH_MSG_DEBUG("overrideIOV: nchans " << nchans);
864  for (unsigned int ichan = 0; ichan < nchans; ++ichan) {
865  // FIXME: O(N^2)!
867  coll->add(chan, newRange);
868  ATH_MSG_DEBUG("overrideIOV: overriding the IOV of collection chan " << chan);
869  }
870  // must reset the collection range AFTER the channels, because the collection range will be
871  // 'narrowed' to that of the channels
872  coll->resetMinRange();
873  }
874  if (msgLvl(MSG::DEBUG)) {
875  ATH_MSG_DEBUG("overrideIOV: after overriding the IOV of collection");
876  std::ostringstream stream;
877  coll->dump(stream);
878  ATH_MSG_DEBUG(stream.str());
879  }
880  }
881  else ATH_MSG_DEBUG("overrideIOV: IOV is not run/event ");
882 
883  return StatusCode::SUCCESS;
884 }

◆ processInputFileMetaData()

StatusCode IOVDbMetaDataTool::processInputFileMetaData ( const std::string &  fileName)
overridevirtual

Explicit call to process IOV meta data from the input meta data store, transferring it to the main meta data store.

Normally, this method is called at the BeginInputFile incident. However, this explicit call allows the transfer to occur during the initialization phase, which occurs before BeginInputFile incident.

Definition at line 546 of file IOVDbMetaDataTool.cxx.

547 {
548  // lock the tool while it is processing input metadata
549  std::scoped_lock guard( m_mutex );
550 
551  ATH_MSG_DEBUG("processInputFileMetaData: file name " << fileName);
552 
553  // Retrieve all meta data containers from InputMetaDataStore
556 
557  StatusCode sc = m_inputStore->retrieve(cont, contEnd);
558  if (!sc.isSuccess()) {
559  ATH_MSG_DEBUG("processInputFileMetaData: Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data");
560  return StatusCode::SUCCESS;
561  }
562 
563  ATH_MSG_DEBUG("processInputFileMetaData: Retrieved from IOVMetaDataContainer(s) from InputMetaDataStore");
564 
565  // For each container, merge its contents into the MetaDataStore
566  unsigned int ncolls = 0;
567  unsigned int ndupColls = 0;
568  for (; cont != contEnd; ++cont) {
569  IOVMetaDataContainer* contMaster = getMetaDataContainer(cont->folderName()
570  , cont->folderDescription());
571 
572  // We assume that the folder is the same for all versions, and
573  // now we loop over versions for the payloads
574  std::list<SG::ObjectWithVersion<IOVMetaDataContainer> > allVersions;
575  sc = m_inputStore->retrieveAllVersions(allVersions, cont.key());
576  if (!sc.isSuccess()) {
577  ATH_MSG_ERROR("Could not retrieve all versions for " << cont.key());
578  return sc;
579  }
580 
581  for (SG::ObjectWithVersion<IOVMetaDataContainer>& obj : allVersions) {
582  const IOVPayloadContainer* payload = obj.dataObject->payloadContainer();
583 
584  ATH_MSG_DEBUG("processInputFileMetaData: New container: payload size " << payload->size() << " version key " << obj.versionedKey);
585 
586  // detailed printout before merge
587  if (msgLvl(MSG::VERBOSE)) {
588  const IOVPayloadContainer* payloadMaster = contMaster->payloadContainer();
589  ATH_MSG_VERBOSE("Before merge, payload minRange for folder " << cont->folderName());
590  if (payloadMaster && payloadMaster->size()) {
591  // Loop over AttrColls and print out minRange
592  IOVPayloadContainer::const_iterator itColl = payloadMaster->begin();
593  IOVPayloadContainer::const_iterator itCollEnd = payloadMaster->end();
594  unsigned int iPayload = 0;
595  for (; itColl != itCollEnd; ++itColl, ++iPayload) {
596  ATH_MSG_VERBOSE(iPayload << " " << (*itColl)->minRange() << " "
597  << (*itColl)->size());
598  }
599  }
600  else {
601  ATH_MSG_VERBOSE(" no payloads yet!");
602  }
603  }
604  }
605 
606  // Detailed printout
607  if (msgLvl(MSG::DEBUG)) {
608  ATH_MSG_DEBUG("processInputFileMetaData: Current payload before merge " << contMaster->folderName());
610  IOVPayloadContainer::const_iterator itCollEnd1 = contMaster->payloadContainer()->end();
611  std::ostringstream stream;
612  for (; itColl1 != itCollEnd1; ++itColl1) (*itColl1)->dump(stream);
613  ATH_MSG_DEBUG(stream.str());
614  }
615 
616  //
617  // Loop over CondAttrListCollections and do merge
618  //
619  for (SG::ObjectWithVersion<IOVMetaDataContainer>& obj : allVersions) {
620  const IOVPayloadContainer* payload = obj.dataObject->payloadContainer();
622  IOVPayloadContainer::const_iterator itCollEnd = payload->end();
623  for (; itColl != itCollEnd; ++itColl) {
624 
625  // Make a copy of the collection and merge it into
626  // master container in meta data store
627  CondAttrListCollection* coll = new CondAttrListCollection(**itColl);
628  // Override run number if requested
630  ATH_CHECK( overrideIOV(coll) );
631  }
632 
633  // first check if we need to modify the incoming payload
634  if (!modifyPayload (contMaster->folderName(), coll).isSuccess()) {
635  ATH_MSG_ERROR("processInputFileMetaData: Could not modify the payload for folder " << contMaster->folderName());
636  return StatusCode::FAILURE;
637  }
638 
639  ATH_MSG_VERBOSE("processInputFileMetaData: merge minRange: " << coll->minRange());
640  if (!contMaster->merge(coll)) {
641  // Did not merge it in - was a duplicate, so we need to delete it
642  delete coll;
643  ++ndupColls;
644  ATH_MSG_VERBOSE(" => not merged ");
645  }
646  else {
647  ++ncolls;
648  ATH_MSG_VERBOSE(" => merged ");
649  }
650 
651  }
652  ATH_MSG_DEBUG("processInputFileMetaData: Merged together containers for folder " << cont->folderName() << " ncoll/ndup "
653  << ncolls << " " << ndupColls);
654 
655  // Check for consistency after merge
656  const IOVPayloadContainer* payloadMaster = contMaster->payloadContainer();
657  if (payloadMaster && payloadMaster->size()) {
658  // Loop over AttrColls and print out minRange
659  IOVPayloadContainer::const_iterator itColl = payloadMaster->begin();
660  IOVPayloadContainer::const_iterator itCollEnd = payloadMaster->end();
661  IOVTime lastStop;
662  if ((*itColl)->minRange().start().isTimestamp()) lastStop = IOVTime(0);
663  else lastStop = IOVTime(0,0);
664  bool hasError = false;
665  for (; itColl != itCollEnd; ++itColl) {
666  if ((*itColl)->minRange().start() < lastStop) hasError = true;
667  lastStop = (*itColl)->minRange().stop();
668  }
669  if (hasError) {
670  ATH_MSG_ERROR("processInputFileMetaData: error after merge of file meta data. " );
671  ATH_MSG_ERROR("processInputFileMetaData: Filename " << fileName);
672  ATH_MSG_ERROR("processInputFileMetaData: folder " << contMaster->folderName());
673  ATH_MSG_ERROR("processInputFileMetaData: MinRange for meta data folders ");
674  unsigned int iPayload = 0;
675  itColl = payloadMaster->begin();
676  for (; itColl != itCollEnd; ++itColl, ++iPayload) {
677  ATH_MSG_ERROR(iPayload << " " << (*itColl)->minRange() << " " << (*itColl)->size());
678  }
679  }
680  }
681 
682  // detailed printout after merge
683  if (msgLvl(MSG::VERBOSE)) {
684  const IOVPayloadContainer* payloadMaster = contMaster->payloadContainer();
685  ATH_MSG_VERBOSE("processInputFileMetaData: After merge, payload minRange ");
686  if (payloadMaster) {
687  // Loop over AttrColls and print out minRange
688  IOVPayloadContainer::const_iterator itColl = payloadMaster->begin();
689  IOVPayloadContainer::const_iterator itCollEnd = payloadMaster->end();
690  unsigned int iPayload = 0;
691  for (; itColl != itCollEnd; ++itColl, ++iPayload) {
692  ATH_MSG_VERBOSE(iPayload << " " << (*itColl)->minRange() << " "
693  << (*itColl)->size());
694  }
695  }
696  else { ATH_MSG_ERROR(" no payloads yet!"); }
697  }
698 
699  // Detailed printout
700  if (msgLvl(MSG::DEBUG)) {
701  ATH_MSG_DEBUG("processInputFileMetaData: Input payload " << cont->folderName());
702  std::ostringstream streamInp;
703  itColl = payload->begin();
704  itCollEnd = payload->end();
705  for (; itColl != itCollEnd; ++itColl) (*itColl)->dump(streamInp);
706  ATH_MSG_DEBUG(streamInp.str());
707  ATH_MSG_DEBUG("processInputFileMetaData: Output payload " << contMaster->folderName());
708  std::ostringstream streamOut;
709  itColl = contMaster->payloadContainer()->begin();
710  itCollEnd = contMaster->payloadContainer()->end();
711  for (; itColl != itCollEnd; ++itColl) (*itColl)->dump(streamOut);
712  ATH_MSG_DEBUG(streamOut.str());
713  }
714  }
715  }
716 
717  ATH_MSG_DEBUG("processInputFileMetaData: Total number of attribute collections merged together " << ncolls
718  << " Number of duplicate collections " << ndupColls);
719 
720  // Also populate ConditionStore for parameter folders when reading from file metadata
721  // without intermediate sqlite files (direct in-file metadata mode).
722  // Only do this if IOVDbSvc hasn't registered the folder (checked by CondCont existence).
723  // Note: We're already holding m_mutex lock, so we populate ConditionStore directly
724  // without calling addPayload() to avoid deadlock.
725  constexpr std::array folderNames{"/Digitization/Parameters", "/Simulation/Parameters"};
726  for (std::string_view folderName : folderNames) {
727  // Skip if folder doesn't exist in MetaDataStore (e.g., old files without these folders)
728  if (!m_metaDataStore->contains<IOVMetaDataContainer>(std::string(folderName))) {
729  continue;
730  }
731 
732  // Skip if folder is in Payloads (write-only mode for overlay)
733  // When Payloads contains entries for a folder, we're explicitly providing the data
734  // and don't need to read from input file
735  bool inPayloads = false;
736  for (const auto& [key, value] : m_payloads) {
737  if (key.find(std::string(folderName) + ":") == 0) {
738  inPayloads = true;
739  break;
740  }
741  }
742  if (inPayloads) {
743  ATH_MSG_DEBUG("Folder " << folderName << " is in Payloads, skipping auto-read from input");
744  continue;
745  }
746 
747  // Check MetaDataStore (merged view of metadata from all input files)
748  IOVMetaDataContainer* contMaster = nullptr;
749  if (m_metaDataStore->retrieve(contMaster, std::string(folderName)).isSuccess() && contMaster) {
750  const IOVPayloadContainer* payloadMaster = contMaster->payloadContainer();
751  if (payloadMaster && payloadMaster->size() > 0) {
752  // Ensure ConditionStore is available
753  if (!m_condStore.isValid()) {
754  ATH_CHECK(m_condStore.retrieve());
755  }
756 
757  // Check if CondCont already exists - if so, IOVDbSvc is managing it
758  if (m_condStore->contains<CondCont<AthenaAttributeList>>(std::string(folderName))) {
759  ATH_MSG_DEBUG("CondCont for " << folderName << " already exists, skipping");
760  continue;
761  }
762 
763  // Get the first payload (should only be one for parameter folders)
764  const CondAttrListCollection* coll = dynamic_cast<const CondAttrListCollection*>(*(payloadMaster->begin()));
765  if (coll) {
766  // Create new CondCont using CondContFactory
768  ServiceHandle<Athena::IRCUSvc> rcuSvc("Athena::RCUSvc", name());
769  ATH_CHECK(rcuSvc.retrieve());
770 
774  std::string(folderName));
775  if (!cb) {
776  ATH_MSG_ERROR("Failed to create CondCont for " << folderName);
777  return StatusCode::FAILURE;
778  }
779 
780  if (m_condStore->recordObject(cb, std::string(folderName), true, false) == nullptr) {
781  ATH_MSG_ERROR("Failed to record CondCont for " << folderName);
782  return StatusCode::FAILURE;
783  }
784 
785  // Retrieve the CondCont
786  ATH_CHECK(m_condStore->retrieve(cc, std::string(folderName)));
787 
788  // Extract AthenaAttributeList from CondAttrListCollection and insert into CondCont
789  auto itr = coll->begin();
790  const coral::AttributeList& attrList = itr->second;
791  auto athAttrList = std::make_unique<AthenaAttributeList>(attrList);
792 
793  // Create EventIDRange from the collection's IOV
794  IOVRange iovRange = coll->minRange();
795  EventIDBase start, stop;
796  start.set_run_number(iovRange.start().run());
797  start.set_lumi_block(iovRange.start().event());
798  stop.set_run_number(iovRange.stop().run());
799  stop.set_lumi_block(iovRange.stop().event());
800  EventIDRange range(start, stop);
801 
802  // Insert into CondCont
803  ATH_CHECK(cc->insert(range, std::move(athAttrList), Gaudi::Hive::currentContext()));
804 
805  ATH_MSG_DEBUG("Populated ConditionStore for " << folderName << " from file metadata");
806  }
807  }
808  }
809  }
810 
811  return StatusCode::SUCCESS;
812 }

◆ registerFolder() [1/2]

StatusCode IOVDbMetaDataTool::registerFolder ( const std::string &  folderName) const
overridevirtual

Register folder in the IOV Db MetaData without folder description - uses default folder description for CondAttrListCollection.

Definition at line 330 of file IOVDbMetaDataTool.cxx.

331 {
332  // Set the default folder description for a CondAttrListCollection
333  // which will be read back via IOVDbSvc
334  std::string folderDescr = "<timeStamp>run-event</timeStamp><addrHeader><address_header service_type=\"256\" clid=\"1238547719\" /> </addrHeader><typeName>CondAttrListCollection</typeName>" ;
335 
337 }

◆ registerFolder() [2/2]

StatusCode IOVDbMetaDataTool::registerFolder ( const std::string &  folderName,
const std::string &  folderDescription 
) const
overridevirtual

Register folder in the IOV Db MetaData - done once at initialize.

Definition at line 342 of file IOVDbMetaDataTool.cxx.

344 {
345  // lock the tool before getMetaDataContainer() call
346  std::scoped_lock guard( m_mutex );
347 
348  ATH_MSG_DEBUG("begin registerFolder ");
349 
350  if( ! getMetaDataContainer(folderName, folderDescription) ) {
351  ATH_MSG_ERROR("Unable to register folder " << folderName);
352  return(StatusCode::FAILURE);
353  }
354  else {
355  ATH_MSG_DEBUG("IOVMetaDataContainer for folder " << folderName << " has been registered ");
356  }
357 
358  return StatusCode::SUCCESS;
359 }

◆ unlock_shared()

virtual void IOVDbMetaDataTool::unlock_shared ( ) const
inlinefinaloverridevirtual

Definition at line 93 of file IOVDbMetaDataTool.h.

93 { m_mutex.unlock_shared(); }

Member Data Documentation

◆ m_attributesToBeRemoved

StringArrayProperty IOVDbMetaDataTool::m_attributesToBeRemoved {this, "AttributesToBeRemoved", {"RandomSeedOffset"}}
private

Definition at line 136 of file IOVDbMetaDataTool.h.

◆ m_condStore

StoreGateSvc_t IOVDbMetaDataTool::m_condStore
private

Definition at line 116 of file IOVDbMetaDataTool.h.

◆ m_filesProcessed

std::set<std::string> IOVDbMetaDataTool::m_filesProcessed
private

Definition at line 132 of file IOVDbMetaDataTool.h.

◆ m_foldersToBeModified

StringArrayProperty IOVDbMetaDataTool::m_foldersToBeModified {this, "FoldersToBeModified", {"/Simulation/Parameters"}}
private

Definition at line 135 of file IOVDbMetaDataTool.h.

◆ m_inputStore

StoreGateSvc_t IOVDbMetaDataTool::m_inputStore
private

Definition at line 115 of file IOVDbMetaDataTool.h.

◆ m_maxRunNumber

unsigned int IOVDbMetaDataTool::m_maxRunNumber
private

Definition at line 129 of file IOVDbMetaDataTool.h.

◆ m_metaDataStore

StoreGateSvc_t IOVDbMetaDataTool::m_metaDataStore
private

Definition at line 114 of file IOVDbMetaDataTool.h.

◆ m_minMaxRunNumbers

UnsignedIntegerArrayProperty IOVDbMetaDataTool::m_minMaxRunNumbers {this, "MinMaxRunNumbers", {}, "Min/max run numbers for overriding meta data IOV"}
private

Definition at line 134 of file IOVDbMetaDataTool.h.

◆ m_minRunNumber

unsigned int IOVDbMetaDataTool::m_minRunNumber
private

Definition at line 128 of file IOVDbMetaDataTool.h.

◆ m_modifyFolders

bool IOVDbMetaDataTool::m_modifyFolders
private

Definition at line 137 of file IOVDbMetaDataTool.h.

◆ m_mutex

std::shared_mutex IOVDbMetaDataTool::m_mutex
mutableprivate

Definition at line 146 of file IOVDbMetaDataTool.h.

◆ m_newRunNumber

unsigned int IOVDbMetaDataTool::m_newRunNumber
private

Definition at line 125 of file IOVDbMetaDataTool.h.

◆ m_oldRunNumber

unsigned int IOVDbMetaDataTool::m_oldRunNumber
private

Definition at line 126 of file IOVDbMetaDataTool.h.

◆ m_overrideMinMaxRunNumber

bool IOVDbMetaDataTool::m_overrideMinMaxRunNumber
private

Definition at line 122 of file IOVDbMetaDataTool.h.

◆ m_overrideRunNumber

bool IOVDbMetaDataTool::m_overrideRunNumber
private

Definition at line 121 of file IOVDbMetaDataTool.h.

◆ m_payloads

Gaudi::Property<std::map<std::string, std::string> > IOVDbMetaDataTool::m_payloads
private
Initial value:
{
this, "Payloads", {}, "Direct payload registration (format: {folder:key: value})"}

Definition at line 142 of file IOVDbMetaDataTool.h.


The documentation for this class was generated from the following files:
CondAttrListCollection::resetMinRange
void resetMinRange()
Reset minRange according to the IOVs of the contained channels.
Definition: CondAttrListCollection.h:528
CondAttrListCollection::minRange
const IOVRange & minRange() const
Current minimal IOVRange.
Definition: CondAttrListCollection.h:437
IOVMetaDataContainer::payloadContainer
const IOVPayloadContainer * payloadContainer() const
Access to payload container.
Definition: IOVMetaDataContainer.h:141
python.PoolAttributeHelper.attrs
list attrs
Definition: PoolAttributeHelper.py:89
CondAttrListCollection::iov_size
iov_size_type iov_size() const
number of Chan/IOV pairs
Definition: CondAttrListCollection.h:349
IOVMetaDataContainer
This class is a container for conditions data. It is intended to be used to store conditions data fro...
Definition: IOVMetaDataContainer.h:37
IOVRange
Validity Range object. Holds two IOVTimes (start and stop)
Definition: IOVRange.h:30
IOVDbMetaDataTool::getMetaDataContainer
IOVMetaDataContainer * getMetaDataContainer(const std::string &folderName, const std::string &folderDescription) const
return meta data container from the meta data store
Definition: IOVDbMetaDataTool.cxx:513
IOVTime::MAXRUN
static constexpr uint32_t MAXRUN
Definition: IOVTime.h:48
IOVDbMetaDataTool::m_metaDataStore
StoreGateSvc_t m_metaDataStore
Definition: IOVDbMetaDataTool.h:114
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
IOVDbMetaDataTool::m_attributesToBeRemoved
StringArrayProperty m_attributesToBeRemoved
Definition: IOVDbMetaDataTool.h:136
IOVTime::event
uint32_t event() const noexcept
Definition: IOVTime.h:106
IOVMetaDataContainer::folderName
const std::string & folderName() const
Folder name.
Definition: IOVMetaDataContainer.h:127
CondContainer::CondContFactory::Instance
static CondContFactory & Instance()
Definition: CondContFactory.cxx:14
CondContainer::CondContFactory::Create
SG::DataObjectSharedPtr< DataObject > Create(Athena::IRCUSvc &rcusvc, const CLID &clid, const std::string &key) const
Definition: CondContFactory.cxx:28
CaloCondBlobAlgs_fillNoiseFromASCII.spec
spec
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:46
CondAttrListCollection::addNewStop
void addNewStop(const IOVTime &stop)
Add new stop time to minRange - make sure that stop is <= to new stop
Definition: CondAttrListCollection.h:517
SG::detail::IteratorBase::key
const std::string & key() const
Get the key string with which the current object was stored.
Definition: SGIterator.cxx:155
IOVMetaDataContainer::merge
bool merge(CondAttrListCollection *payload)
Add in new payload.
Definition: IOVMetaDataContainer.cxx:14
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:13
defineDB.ichan
ichan
Definition: JetTagCalibration/share/defineDB.py:28
IOVRange::start
const IOVTime & start() const
Definition: IOVRange.h:38
IOVRange::isInRange
bool isInRange(const IOVTime &t) const
Definition: IOVRange.h:41
IOVDbMetaDataTool::m_minRunNumber
unsigned int m_minRunNumber
Definition: IOVDbMetaDataTool.h:128
IOVDbMetaDataTool::m_condStore
StoreGateSvc_t m_condStore
Definition: IOVDbMetaDataTool.h:116
IOVDbMetaDataTool::m_modifyFolders
bool m_modifyFolders
Definition: IOVDbMetaDataTool.h:137
CondAttrListCollection::begin
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
Definition: CondAttrListCollection.h:308
athena.value
value
Definition: athena.py:124
CondAttrListCollection::addNewStart
void addNewStart(const IOVTime &start)
Add new start time to minRange - make sure that start is >= to new start.
Definition: CondAttrListCollection.h:507
CxxUtils::RefCountedPtr
Simple smart pointer for Gaudi-style refcounted objects.
Definition: RefCountedPtr.h:39
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:51
IOVDbMetaDataTool::addPayload
virtual StatusCode addPayload(const std::string &folderName, CondAttrListCollection *payload) const override
Add an IOV and Payload for a particular folder - replaces payloads if there is an IOV overlap.
Definition: IOVDbMetaDataTool.cxx:363
IOVDbMetaDataTool::overrideIOV
StatusCode overrideIOV(CondAttrListCollection *&coll) const
override IOV with new run number
Definition: IOVDbMetaDataTool.cxx:817
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
IOVPayloadContainer::size
size_type size() const
size of payload vector
Definition: IOVPayloadContainer.h:121
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
IOVDbMetaDataTool::m_minMaxRunNumbers
UnsignedIntegerArrayProperty m_minMaxRunNumbers
Definition: IOVDbMetaDataTool.h:134
IOVRange::stop
const IOVTime & stop() const
Definition: IOVRange.h:39
IOVPayloadContainer::begin
const_iterator begin() const
Begin of payload vector.
Definition: IOVPayloadContainer.h:107
IOVTime
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
Definition: IOVTime.h:33
CondAttrListCollection::dump
void dump() const
Dump our contents to std::cout.
Definition: CondAttrListCollection.h:556
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
IOVDbMetaDataTool::m_overrideMinMaxRunNumber
bool m_overrideMinMaxRunNumber
Definition: IOVDbMetaDataTool.h:122
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
IOVDbMetaDataTool::m_payloads
Gaudi::Property< std::map< std::string, std::string > > m_payloads
Definition: IOVDbMetaDataTool.h:142
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:37
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AnalysisUtils::copy_if
Out copy_if(In first, const In &last, Out res, const Pred &p)
Definition: IFilterUtils.h:30
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CondAttrListCollection::chanNum
ChanNum chanNum(unsigned int index) const
channel number for index: (index = 0 to size-1)
Definition: CondAttrListCollection.h:383
IOVDbMetaDataTool::modifyPayload
StatusCode modifyPayload(const std::string &folderName, CondAttrListCollection *&payload) const
Modify a Payload for a particular folder - replaces one of the internal attributes.
Definition: IOVDbMetaDataTool.cxx:417
IOVDbMetaDataTool::m_maxRunNumber
unsigned int m_maxRunNumber
Definition: IOVDbMetaDataTool.h:129
IOVDbMetaDataTool::m_foldersToBeModified
StringArrayProperty m_foldersToBeModified
Definition: IOVDbMetaDataTool.h:135
CondAttrListCollection::ChanNum
unsigned int ChanNum
Definition: CondAttrListCollection.h:54
IOVPayloadContainer
This class is a container for the payload of conditions data. It is intended to be used to store cond...
Definition: IOVPayloadContainer.h:35
IOVDbMetaDataTool::m_newRunNumber
unsigned int m_newRunNumber
Definition: IOVDbMetaDataTool.h:125
IOVTime::MAXEVENT
static constexpr uint32_t MAXEVENT
Definition: IOVTime.h:51
lumiFormat.array
array
Definition: lumiFormat.py:91
IOVDbMetaDataTool::m_oldRunNumber
unsigned int m_oldRunNumber
Definition: IOVDbMetaDataTool.h:126
CaloCellTimeCorrFiller.folderName
string folderName
Definition: CaloCellTimeCorrFiller.py:19
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
IOVTime::run
uint32_t run() const noexcept
Definition: IOVTime.h:105
IOVDbMetaDataTool::m_mutex
std::shared_mutex m_mutex
Definition: IOVDbMetaDataTool.h:146
CondAttrListCollection::size
size_type size() const
number of Chan/AttributeList pairs
Definition: CondAttrListCollection.h:321
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
IOVDbMetaDataTool::m_inputStore
StoreGateSvc_t m_inputStore
Definition: IOVDbMetaDataTool.h:115
WriteLumiToCool.folderDescr
folderDescr
Definition: WriteLumiToCool.py:163
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
CondCont< AthenaAttributeList >
IOVDbMetaDataTool::checkOverrideRunNumber
void checkOverrideRunNumber()
check if we should override the run number in the incoming meta data
Definition: IOVDbMetaDataTool.cxx:249
makeDTCalibBlob_pickPhase.folders
folders
Definition: makeDTCalibBlob_pickPhase.py:346
IOVPayloadContainer::const_iterator
payloadVec::const_iterator const_iterator
Definition: IOVPayloadContainer.h:39
IOVDbMetaDataTool::registerFolder
virtual StatusCode registerFolder(const std::string &folderName, const std::string &folderDescription) const override
Register folder in the IOV Db MetaData - done once at initialize.
Definition: IOVDbMetaDataTool.cxx:342
DEBUG
#define DEBUG
Definition: page_access.h:11
IOVPayloadContainer::end
const_iterator end() const
End of payload vector.
Definition: IOVPayloadContainer.h:114
LArNewCalib_DelayDump_OFC_Cali.eventSelector
eventSelector
Definition: LArNewCalib_DelayDump_OFC_Cali.py:112
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
IOVDbMetaDataTool::m_filesProcessed
std::set< std::string > m_filesProcessed
Definition: IOVDbMetaDataTool.h:132
IOVDbMetaDataTool::m_overrideRunNumber
bool m_overrideRunNumber
Definition: IOVDbMetaDataTool.h:121
CondAttrListCollection::AttributeList
coral::AttributeList AttributeList
Definition: CondAttrListCollection.h:55
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
jobOptions.fileName
fileName
Definition: jobOptions.SuperChic_ALP2.py:39
SG::ObjectWithVersion
associate a data object with its VersionedKey The object is held by a ReadHandle to delay its retriev...
Definition: SGVersionedKey.h:17
python.PyAthena.obj
obj
Definition: PyAthena.py:132
CondAttrListCollection::add
bool add(ChanNum chanNum, const AttributeList &attributeList)
Adding in chan/attrList pairs.
Definition: CondAttrListCollection.h:451
SG::ConstIterator
Definition: SGIterator.h:164
python.handimod.cc
int cc
Definition: handimod.py:522
IOVDbMetaDataTool::processInputFileMetaData
virtual StatusCode processInputFileMetaData(const std::string &fileName) override
Explicit call to process IOV meta data from the input meta data store, transferring it to the main me...
Definition: IOVDbMetaDataTool.cxx:546
ServiceHandle< IIncidentSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37