ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected 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
 Lock the tool. More...
 
virtual void unlock_shared () const override final
 Unlock the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Retrieve interface ID. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

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...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

StoreGateSvc_t m_metaDataStore
 
StoreGateSvc_t m_inputStore
 
bool m_processedFirstInputFileIncident
 
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
 
StringArrayProperty m_foldersToBeModified
 
StringArrayProperty m_attributesToBeRemoved
 
bool m_modifyFolders
 
std::shared_mutex m_mutex
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

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 114 of file IOVDbMetaDataTool.h.

Constructor & Destructor Documentation

◆ IOVDbMetaDataTool()

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

Definition at line 25 of file IOVDbMetaDataTool.cxx.

29  , m_metaDataStore ("StoreGateSvc/MetaDataStore", name)
30  , m_inputStore ("StoreGateSvc/InputMetaDataStore", name)
32  , m_overrideRunNumber(false)
34  , m_newRunNumber(0)
35  , m_oldRunNumber(0)
36  , m_minRunNumber(0)
37  , m_maxRunNumber(0)
38  , m_modifyFolders(false)
39 {
40  // Declare additional interface
41  declareInterface<IIOVDbMetaDataTool>(this);
42  declareInterface<IMetaDataTool>(this);
43 
44  // Declare properties
45  declareProperty("MinMaxRunNumbers", m_minMaxRunNumbers);
46 
47  // Folders and attributes to be deleted
48  declareProperty("FoldersToBeModified"
49  , m_foldersToBeModified = std::vector<std::string>(1, "/Simulation/Parameters"));
50  declareProperty("AttributesToBeRemoved"
51  , m_attributesToBeRemoved = std::vector<std::string>(1, "RandomSeedOffset"));
52 
53 }

◆ ~IOVDbMetaDataTool()

IOVDbMetaDataTool::~IOVDbMetaDataTool ( )
virtual

Definition at line 56 of file IOVDbMetaDataTool.cxx.

57 {}

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.

Implements IIOVDbMetaDataTool.

Definition at line 248 of file IOVDbMetaDataTool.cxx.

250 {
251  // lock the tool while it is modifying the folder
252  std::scoped_lock guard( m_mutex );
253 
254  ATH_MSG_DEBUG("begin addPayload ");
255 
256  // Check if the folder has already been found
258  if(cont) {
259  ATH_MSG_DEBUG("Retrieved IOVMetaDataContainer from MetaDataStore for folder "
260  << folderName);
261  }
262  else {
263  ATH_MSG_ERROR("addPayload: Could not find IOVMetaDataContainer in MetaDataStore for folder "
264  << folderName
265  << ". One must have previously called registerFolder. ");
266  return StatusCode::FAILURE;
267  }
268 
269  // Override run number if requested
272  }
273 
274  // Add payload to container
275  bool success = cont->merge(payload);
276  if (success) {
277  ATH_MSG_DEBUG("Added new payload for folder " << folderName);
278  }
279  else {
280  ATH_MSG_DEBUG("Could not add new payload for folder "
281  << folderName
282  << " (may be duplicate payload).");
283 
284  // To Do: the function implicitly assumes ownership on the payload pointer
285  delete payload;
286  payload = nullptr;
287  }
288 
289  // Debug printout
290  if(payload && msgLvl(MSG::DEBUG)) {
291  std::ostringstream stream;
292  payload->dump(stream);
293  ATH_MSG_DEBUG(stream.str());
294  }
295 
296  return StatusCode::SUCCESS;
297 }

◆ beginInputFile()

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

Function called when a new input file is opened.

Implements IMetaDataTool.

Definition at line 108 of file IOVDbMetaDataTool.cxx.

109 {
111  // We skip the first BeginInputFile incident following the FirstInputFile - both are fired for the first file
113  ATH_MSG_DEBUG("The first BeginInputFile incident is fired along with the FirstInputFile incident so we skip the processing of the Input File MetaData ");
114  return StatusCode::SUCCESS;
115  }
116  else {
117  return processInputFileMetaData(sid);
118  }
119 }

◆ checkOverrideRunNumber()

void IOVDbMetaDataTool::checkOverrideRunNumber ( )
private

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

Definition at line 134 of file IOVDbMetaDataTool.cxx.

135 {
136  ATH_MSG_DEBUG("begin checkOverrideRunNumber");
137 
138  // Check if override run numbers have been set by properties or by
139  // the EventSelector
140 
141  if (m_minMaxRunNumbers.value().size() > 0) {
143  m_minRunNumber = m_minMaxRunNumbers.value()[0];
144  if (m_minMaxRunNumbers.value().size() > 1) m_maxRunNumber = m_minMaxRunNumbers.value()[1];
146 
148 
149  ATH_MSG_INFO("checkOverrideRunNumber: overriding IOV for range - min: " << m_minRunNumber
150  << " max: " << m_maxRunNumber);
151  return;
152  }
153 
154  ATH_MSG_DEBUG("checkOverrideRunNumber: check if tag is set in jobOpts");
155 
156  // Get name of event selector from the application manager to
157  // make sure we get the one for MC signal events
158  SmartIF<IProperty> appMgr{serviceLocator()->service("ApplicationMgr")};
159  if (!appMgr) {
160  ATH_MSG_ERROR("checkOverrideRunNumber: Cannot get ApplicationMgr ");
161  return;
162  }
163  StringProperty property("EvtSel", "");
164  StatusCode sc = appMgr->getProperty(&property);
165  if (!sc.isSuccess()) {
166  ATH_MSG_ERROR("checkOverrideRunNumber: unable to get EvtSel: found " << property.value());
167  return;
168  }
169  // Get EventSelector for ApplicationMgr
170  const std::string eventSelector = property.value();
171  SmartIF<IProperty> evtSel{serviceLocator()->service(eventSelector)};
172  if (!evtSel) {
173  ATH_MSG_ERROR("checkOverrideRunNumber: Cannot get EventSelector " << eventSelector);
174  return;
175  }
176 
177  // Is flag set to override the run number?
178  BooleanProperty overrideRunNumber = IntegerProperty("OverrideRunNumberFromInput", false);
179  sc = evtSel->getProperty(&overrideRunNumber);
180  if (!sc.isSuccess()) {
181  // Not all EventSelectors have this property, so we must be tolerant
182  ATH_MSG_DEBUG("resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector ");
183  return;
184  }
185  m_overrideRunNumber = overrideRunNumber.value();
186  if (m_overrideRunNumber) {
187  // New run number
188  IntegerProperty runNumber = IntegerProperty("RunNumber", 0);
189  sc = evtSel->getProperty(&runNumber);
190  if (!sc.isSuccess()) {
191  ATH_MSG_ERROR("checkOverrideRunNumber: unable to get RunNumber from EventSelector: found "
192  << runNumber.value());
193  return;
194  }
195  m_newRunNumber = runNumber.value();
196  // Old run number
197  runNumber = IntegerProperty("OldRunNumber", 0);
198  sc = evtSel->getProperty(&runNumber);
199  if (!sc.isSuccess()) {
200  ATH_MSG_ERROR("checkOverrideRunNumber: unable to get OldRunNumber from EventSelector: found "
201  << runNumber.value());
202  return;
203  }
204  m_oldRunNumber = runNumber.value();
205 
206  ATH_MSG_DEBUG("checkOverrideRunNumber: Changing old to new run number: " << m_oldRunNumber
207  << " " << m_newRunNumber << " obtained from " << eventSelector);
208  }
209  else ATH_MSG_DEBUG("checkOverrideRunNumber: OverrideRunNumberFromInput not set for " << eventSelector);
210 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ endInputFile()

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

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

Implements IMetaDataTool.

Definition at line 121 of file IOVDbMetaDataTool.cxx.

122 {
123  return StatusCode::SUCCESS;
124 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode IOVDbMetaDataTool::finalize ( )
overridevirtual

Finalize AlgTool.

Definition at line 85 of file IOVDbMetaDataTool.cxx.

86 {
87  return StatusCode::SUCCESS;
88 }

◆ findMetaDataContainer()

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

Implements IIOVDbMetaDataTool.

Definition at line 389 of file IOVDbMetaDataTool.cxx.

390 {
391  // lock the tool before this call
392  // Return the folder if it is in the meta data store
393  return m_metaDataStore->tryRetrieve<IOVMetaDataContainer>(folderName);
394 }

◆ 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 398 of file IOVDbMetaDataTool.cxx.

400 {
401  // protected by locks in addPayload() and registerFolder()
402  ATH_MSG_DEBUG("begin getMetaDataContainer ");
403 
404  IOVMetaDataContainer* cont{nullptr};
405  // See if it is in the meta data store
407  // Container not found, add in new one
408  cont = new IOVMetaDataContainer(folderName, folderDescription);
409  ATH_MSG_DEBUG("No IOVMetaDataContainer in MetaDataStore for folder " << folderName
410  << ". Created a new instance");
411  StatusCode sc = m_metaDataStore->record(cont, folderName);
412  if (!sc.isSuccess()) {
413  ATH_MSG_ERROR("Could not record IOVMetaDataContainer in MetaDataStore for folder " << folderName);
414  delete cont;
415  cont = nullptr;
416  }
417  }
418  else {
419  ATH_MSG_DEBUG("IOVMetaDataContainer already in MetaDataStore for folder " << folderName);
420  StatusCode sc = m_metaDataStore->retrieve(cont, folderName);
421  if (!sc.isSuccess()) {
422  ATH_MSG_ERROR("Could not retrieve IOVMetaDataContainer in MetaDataStore for folder " << folderName);
423  cont = nullptr;
424  }
425  }
426  return cont;
427 }

◆ handle()

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

Incident service handle listening for BeginInputFile and EndInputFile.

Definition at line 92 of file IOVDbMetaDataTool.cxx.

93 {
94  const FileIncident* fileInc = dynamic_cast<const FileIncident*>(&inc);
95  if(!fileInc) throw std::runtime_error("Unable to get FileName from FirstInputFile incident");
96 
97  const std::string fileName = fileInc->fileName();
98  ATH_MSG_DEBUG("handle() " << inc.type() << " for " << fileName);
99 
101  // Check if we need to override run number - only needed for simulation
103 
105  if(!sc.isSuccess()) throw std::runtime_error("Could not process input file meta data");
106 }

◆ initialize()

StatusCode IOVDbMetaDataTool::initialize ( )
overridevirtual

Initialize AlgTool.

Definition at line 62 of file IOVDbMetaDataTool.cxx.

63 {
64  ATH_MSG_DEBUG("in initialize()");
65 
66  // Set to be listener for FirstInputFile
67  ServiceHandle<IIncidentSvc> incSvc("IncidentSvc", this->name());
68  ATH_CHECK(incSvc.retrieve());
69  incSvc->addListener(this, "FirstInputFile", 60); // pri has to be < 100 to be after MetaDataSvc.
70 
71  // locate the meta data stores
72  ATH_CHECK(m_metaDataStore.retrieve());
73  ATH_CHECK(m_inputStore.retrieve());
74 
75  // Check whether folders need to be modified
76  m_modifyFolders = (m_foldersToBeModified.value().size()>0);
77  ATH_MSG_DEBUG("initialize(): " << (m_modifyFolders ? "" : "No ") << "need to modify folders");
78 
79  return(StatusCode::SUCCESS);
80 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& IIOVDbMetaDataTool::interfaceID ( )
inlinestaticinherited

Retrieve interface ID.

Definition at line 49 of file IIOVDbMetaDataTool.h.

49  {
50  static const InterfaceID IID_IIOVDbMetaDataTool("IIOVDbMetadataTool", 1 , 0);
51  return IID_IIOVDbMetaDataTool; }

◆ lock_shared()

virtual void IOVDbMetaDataTool::lock_shared ( ) const
inlinefinaloverridevirtual

Lock the tool.

Implements ILockableTool.

Definition at line 93 of file IOVDbMetaDataTool.h.

93 { m_mutex.lock_shared(); }

◆ metaDataStop()

StatusCode IOVDbMetaDataTool::metaDataStop ( )
overridevirtual

Function called when the tool should write out its metadata.

Implements IMetaDataTool.

Definition at line 126 of file IOVDbMetaDataTool.cxx.

127 {
128  return StatusCode::SUCCESS;
129 }

◆ 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 302 of file IOVDbMetaDataTool.cxx.

304 {
305  // protected by lock in processInputFileMetaData()
306 
309  ATH_MSG_DEBUG("begin modifyPayload for folder " << folderName);
310 
311  // check if this folder needs to be modified
312  bool modifyAttr = false;
313  std::string attributeName;
314  const std::vector<std::string>& folders = m_foldersToBeModified.value();
315  const std::vector<std::string>& attrs = m_attributesToBeRemoved.value();
316  for (unsigned int i = 0; i < folders.size(); ++i) {
317  if (folderName == folders[i]) {
318  if (attrs.size() > i) {
319  attributeName = attrs[i];
320  modifyAttr = true;
321  ATH_MSG_DEBUG("modifyPayload: remove attribute " << attributeName);
322  break;
323  }
324  }
325  }
326 
327  if (!modifyAttr) {
328  ATH_MSG_DEBUG("modifyPayload: folder " << folderName << " OK ");
329  return StatusCode::SUCCESS;
330  }
331 
332  bool iovSizeIsZero = coll->iov_size() == 0;
333  IOVRange testIOV = coll->minRange();
334  IOVTime start = testIOV.start();
335  IOVTime stop = testIOV.stop();
336  // Set the IOV
338  if (iovSizeIsZero) {
339  // Only add in overall range if channels do not have
340  // IOVs - otherwise this is automatically calculated
341  coll1->addNewStart(start);
342  coll1->addNewStop (stop);
343  }
344  // Add in channels
345  unsigned int nchans = coll->size();
346  bool hasChanNames = (coll->name_size() == nchans);
347  for (unsigned int ichan = 0; ichan < nchans; ++ichan) {
348  CondAttrListCollection::ChanNum chan = coll->chanNum(ichan);
349  // Now filter out the unwanted attribute
351  const CondAttrListCollection::AttributeList& oldAttrList = coll->attributeList(chan);
352  for (unsigned int iatt = 0; iatt < oldAttrList.size(); ++iatt) {
353  // skip the unwanted attribute
354  if (attributeName == oldAttrList[iatt].specification().name()) {
355  ATH_MSG_DEBUG("modifyPayload: skipping attribute name " << oldAttrList[iatt].specification().name());
356  continue;
357  }
358 
359  // copy the rest
360  newAttrList.extend(oldAttrList[iatt].specification().name(),
361  oldAttrList[iatt].specification().type());
362  const coral::Attribute& oldAttr = oldAttrList[iatt];
363  coral::Attribute& newAttr = newAttrList[oldAttrList[iatt].specification().name()];
364  newAttr = oldAttr;
365  // newAttr.setValue(oldAttr.data());
366  ATH_MSG_DEBUG("modifyPayload: copying attr name "
367  << oldAttrList[iatt].specification().name() << " "
368  /*<< newAttr*/);
369  }
370  coll1->add(chan, newAttrList);
371  if (!iovSizeIsZero) coll1->add(chan, coll->iovRange(chan));
372  if(hasChanNames)coll1->add(chan, coll->chanName(chan));
373  ATH_MSG_DEBUG("modifyPayload: copied attribute list for channel " << chan);
374  }
375  delete coll;
376  coll = coll1;
377  if (msgLvl(MSG::DEBUG)) {
378  std::ostringstream stream;
379  coll->dump(stream);
380  ATH_MSG_DEBUG(stream.str());
381  }
382 
383  return StatusCode::SUCCESS;
384 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ overrideIOV()

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

override IOV with new run number

Definition at line 610 of file IOVDbMetaDataTool.cxx.

611 {
612  ATH_MSG_DEBUG("overrideIOV ");
613 
614  // Override the IOV for run/event IOVs
615 
616  // (ONLY TRUE FOR OVERRIDE COMING IN VIA EVENTSELECTOR:)
617  // NOTE: we require that the old run number falls within the
618  // IOVRange of the incoming collection. We override ALL IOVs for
619  // ALL channels forcing the IOVRange to be (newRunNumber,1) to
620  // (newRunNumber+1,1)
621 
622  bool iovSizeIsZero = coll->iov_size() == 0;
623  IOVRange testIOV = coll->minRange();
624  IOVTime start = testIOV.start();
625  IOVTime stop = testIOV.stop();
626  IOVTime oldRun(m_oldRunNumber, 0);
627  if (start.isRunEvent() && stop.isRunEvent()) { // only for run/event
628  IOVRange newRange;
629  // Two ways of resetting
631  else if (m_overrideRunNumber) newRange = IOVRange(IOVTime(m_newRunNumber, 0), IOVTime(m_newRunNumber + 1, 0));
632 
633  if (m_overrideRunNumber && !testIOV.isInRange(oldRun)) {
634  // old run must be in the range
635  ATH_MSG_ERROR("overrideIOV: old run number does not match. Old run number " << m_oldRunNumber << " IOVRange: " << testIOV);
636  return StatusCode::SUCCESS;
637  }
638 
639  ATH_MSG_DEBUG("overrideIOV: overrideMinMaxRunNumber: " << (int)m_overrideMinMaxRunNumber
640  << " overrideRunNumber " << (int)m_overrideRunNumber
641  << " iovSizeIsZero: " << (int)iovSizeIsZero
642  << " newRange " << newRange);
643 
644  // Now over ride IOVs - two cases: 1) single IOV for full collection, 2) IOVs for individual channels.
645  // Must treat the reset of collection IOV differently
646  if (iovSizeIsZero) {
647  // Only add in overall range if channels do not have
648  // IOVs - otherwise this is automatically calculated
649  coll->resetMinRange(); // must first reset to 'full range' and then reduce the IOVRange accordingly
650  coll->addNewStart(newRange.start());
651  coll->addNewStop (newRange.stop());
652  }
653  else {
654  // Add in channels
655  unsigned int nchans = coll->size();
656  ATH_MSG_DEBUG("overrideIOV: nchans " << nchans);
657  for (unsigned int ichan = 0; ichan < nchans; ++ichan) {
658  // FIXME: O(N^2)!
660  coll->add(chan, newRange);
661  ATH_MSG_DEBUG("overrideIOV: overriding the IOV of collection chan " << chan);
662  }
663  // must reset the collection range AFTER the channels, because the collection range will be
664  // 'narrowed' to that of the channels
665  coll->resetMinRange();
666  }
667  if (msgLvl(MSG::DEBUG)) {
668  ATH_MSG_DEBUG("overrideIOV: after overriding the IOV of collection");
669  std::ostringstream stream;
670  coll->dump(stream);
671  ATH_MSG_DEBUG(stream.str());
672  }
673  }
674  else ATH_MSG_DEBUG("overrideIOV: IOV is not run/event ");
675 
676  return StatusCode::SUCCESS;
677 }

◆ 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.

Implements IIOVDbMetaDataTool.

Definition at line 431 of file IOVDbMetaDataTool.cxx.

432 {
433  // lock the tool while it is processing input metadata
434  std::scoped_lock guard( m_mutex );
435 
436  ATH_MSG_DEBUG("processInputFileMetaData: file name " << fileName);
437 
438  // Retrieve all meta data containers from InputMetaDataStore
441 
442  StatusCode sc = m_inputStore->retrieve(cont, contEnd);
443  if (!sc.isSuccess()) {
444  ATH_MSG_DEBUG("processInputFileMetaData: Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data");
445  return StatusCode::SUCCESS;
446  }
447 
448  ATH_MSG_DEBUG("processInputFileMetaData: Retrieved from IOVMetaDataContainer(s) from InputMetaDataStore");
449 
450  // For each container, merge its contents into the MetaDataStore
451  unsigned int ncolls = 0;
452  unsigned int ndupColls = 0;
453  for (; cont != contEnd; ++cont) {
454  IOVMetaDataContainer* contMaster = getMetaDataContainer(cont->folderName()
455  , cont->folderDescription());
456 
457  // We assume that the folder is the same for all versions, and
458  // now we loop over versions for the payloads
459  std::list<SG::ObjectWithVersion<IOVMetaDataContainer> > allVersions;
460  sc = m_inputStore->retrieveAllVersions(allVersions, cont.key());
461  if (!sc.isSuccess()) {
462  ATH_MSG_ERROR("Could not retrieve all versions for " << cont.key());
463  return sc;
464  }
465 
466  for (SG::ObjectWithVersion<IOVMetaDataContainer>& obj : allVersions) {
467  const IOVPayloadContainer* payload = obj.dataObject->payloadContainer();
468 
469  ATH_MSG_DEBUG("processInputFileMetaData: New container: payload size " << payload->size() << " version key " << obj.versionedKey);
470 
471  // detailed printout before merge
472  if (msgLvl(MSG::VERBOSE)) {
473  const IOVPayloadContainer* payloadMaster = contMaster->payloadContainer();
474  ATH_MSG_VERBOSE("Before merge, payload minRange for folder " << cont->folderName());
475  if (payloadMaster && payloadMaster->size()) {
476  // Loop over AttrColls and print out minRange
477  IOVPayloadContainer::const_iterator itColl = payloadMaster->begin();
478  IOVPayloadContainer::const_iterator itCollEnd = payloadMaster->end();
479  unsigned int iPayload = 0;
480  for (; itColl != itCollEnd; ++itColl, ++iPayload) {
481  ATH_MSG_VERBOSE(iPayload << " " << (*itColl)->minRange() << " "
482  << (*itColl)->size());
483  }
484  }
485  else {
486  ATH_MSG_VERBOSE(" no payloads yet!");
487  }
488  }
489  }
490 
491  // Detailed printout
492  if (msgLvl(MSG::DEBUG)) {
493  ATH_MSG_DEBUG("processInputFileMetaData: Current payload before merge " << contMaster->folderName());
495  IOVPayloadContainer::const_iterator itCollEnd1 = contMaster->payloadContainer()->end();
496  std::ostringstream stream;
497  for (; itColl1 != itCollEnd1; ++itColl1) (*itColl1)->dump(stream);
498  ATH_MSG_DEBUG(stream.str());
499  }
500 
501  //
502  // Loop over CondAttrListCollections and do merge
503  //
504  for (SG::ObjectWithVersion<IOVMetaDataContainer>& obj : allVersions) {
505  const IOVPayloadContainer* payload = obj.dataObject->payloadContainer();
507  IOVPayloadContainer::const_iterator itCollEnd = payload->end();
508  for (; itColl != itCollEnd; ++itColl) {
509 
510  // Make a copy of the collection and merge it into
511  // master container in meta data store
512  CondAttrListCollection* coll = new CondAttrListCollection(**itColl);
513  // Override run number if requested
515  ATH_CHECK( overrideIOV(coll) );
516  }
517 
518  // first check if we need to modify the incoming payload
519  if (!modifyPayload (contMaster->folderName(), coll).isSuccess()) {
520  ATH_MSG_ERROR("processInputFileMetaData: Could not modify the payload for folder " << contMaster->folderName());
521  return StatusCode::FAILURE;
522  }
523 
524  ATH_MSG_VERBOSE("processInputFileMetaData: merge minRange: " << coll->minRange());
525  if (!contMaster->merge(coll)) {
526  // Did not merge it in - was a duplicate, so we need to delete it
527  delete coll;
528  ++ndupColls;
529  ATH_MSG_VERBOSE(" => not merged ");
530  }
531  else {
532  ++ncolls;
533  ATH_MSG_VERBOSE(" => merged ");
534  }
535 
536  }
537  ATH_MSG_DEBUG("processInputFileMetaData: Merged together containers for folder " << cont->folderName() << " ncoll/ndup "
538  << ncolls << " " << ndupColls);
539 
540  // Check for consistency after merge
541  const IOVPayloadContainer* payloadMaster = contMaster->payloadContainer();
542  if (payloadMaster && payloadMaster->size()) {
543  // Loop over AttrColls and print out minRange
544  IOVPayloadContainer::const_iterator itColl = payloadMaster->begin();
545  IOVPayloadContainer::const_iterator itCollEnd = payloadMaster->end();
546  IOVTime lastStop;
547  if ((*itColl)->minRange().start().isTimestamp()) lastStop = IOVTime(0);
548  else lastStop = IOVTime(0,0);
549  bool hasError = false;
550  for (; itColl != itCollEnd; ++itColl) {
551  if ((*itColl)->minRange().start() < lastStop) hasError = true;
552  lastStop = (*itColl)->minRange().stop();
553  }
554  if (hasError) {
555  ATH_MSG_ERROR("processInputFileMetaData: error after merge of file meta data. " );
556  ATH_MSG_ERROR("processInputFileMetaData: Filename " << fileName);
557  ATH_MSG_ERROR("processInputFileMetaData: folder " << contMaster->folderName());
558  ATH_MSG_ERROR("processInputFileMetaData: MinRange for meta data folders ");
559  unsigned int iPayload = 0;
560  itColl = payloadMaster->begin();
561  for (; itColl != itCollEnd; ++itColl, ++iPayload) {
562  ATH_MSG_ERROR(iPayload << " " << (*itColl)->minRange() << " " << (*itColl)->size());
563  }
564  }
565  }
566 
567  // detailed printout after merge
568  if (msgLvl(MSG::VERBOSE)) {
569  const IOVPayloadContainer* payloadMaster = contMaster->payloadContainer();
570  ATH_MSG_VERBOSE("processInputFileMetaData: After merge, payload minRange ");
571  if (payloadMaster) {
572  // Loop over AttrColls and print out minRange
573  IOVPayloadContainer::const_iterator itColl = payloadMaster->begin();
574  IOVPayloadContainer::const_iterator itCollEnd = payloadMaster->end();
575  unsigned int iPayload = 0;
576  for (; itColl != itCollEnd; ++itColl, ++iPayload) {
577  ATH_MSG_VERBOSE(iPayload << " " << (*itColl)->minRange() << " "
578  << (*itColl)->size());
579  }
580  }
581  else { ATH_MSG_ERROR(" no payloads yet!"); }
582  }
583 
584  // Detailed printout
585  if (msgLvl(MSG::DEBUG)) {
586  ATH_MSG_DEBUG("processInputFileMetaData: Input payload " << cont->folderName());
587  std::ostringstream streamInp;
588  itColl = payload->begin();
589  itCollEnd = payload->end();
590  for (; itColl != itCollEnd; ++itColl) (*itColl)->dump(streamInp);
591  ATH_MSG_DEBUG(streamInp.str());
592  ATH_MSG_DEBUG("processInputFileMetaData: Output payload " << contMaster->folderName());
593  std::ostringstream streamOut;
594  itColl = contMaster->payloadContainer()->begin();
595  itCollEnd = contMaster->payloadContainer()->end();
596  for (; itColl != itCollEnd; ++itColl) (*itColl)->dump(streamOut);
597  ATH_MSG_DEBUG(streamOut.str());
598  }
599  }
600  }
601 
602  ATH_MSG_DEBUG("processInputFileMetaData: Total number of attribute collections merged together " << ncolls
603  << " Number of duplicate collections " << ndupColls);
604  return StatusCode::SUCCESS;
605 }

◆ 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.

Implements IIOVDbMetaDataTool.

Definition at line 215 of file IOVDbMetaDataTool.cxx.

216 {
217  // Set the default folder description for a CondAttrListCollection
218  // which will be read back via IOVDbSvc
219  std::string folderDescr = "<timeStamp>run-event</timeStamp><addrHeader><address_header service_type=\"256\" clid=\"1238547719\" /> </addrHeader><typeName>CondAttrListCollection</typeName>" ;
220 
221  return registerFolder(folderName, folderDescr);
222 }

◆ 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.

Implements IIOVDbMetaDataTool.

Definition at line 227 of file IOVDbMetaDataTool.cxx.

229 {
230  // lock the tool before getMetaDataContainer() call
231  std::scoped_lock guard( m_mutex );
232 
233  ATH_MSG_DEBUG("begin registerFolder ");
234 
235  if( ! getMetaDataContainer(folderName, folderDescription) ) {
236  ATH_MSG_ERROR("Unable to register folder " << folderName);
237  return(StatusCode::FAILURE);
238  }
239  else {
240  ATH_MSG_DEBUG("IOVMetaDataContainer for folder " << folderName << " has been registered ");
241  }
242 
243  return StatusCode::SUCCESS;
244 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ unlock_shared()

virtual void IOVDbMetaDataTool::unlock_shared ( ) const
inlinefinaloverridevirtual

Unlock the tool.

Implements ILockableTool.

Definition at line 94 of file IOVDbMetaDataTool.h.

94 { m_mutex.unlock_shared(); }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_attributesToBeRemoved

StringArrayProperty IOVDbMetaDataTool::m_attributesToBeRemoved
private

Definition at line 143 of file IOVDbMetaDataTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_filesProcessed

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

Definition at line 136 of file IOVDbMetaDataTool.h.

◆ m_foldersToBeModified

StringArrayProperty IOVDbMetaDataTool::m_foldersToBeModified
private

Definition at line 142 of file IOVDbMetaDataTool.h.

◆ m_inputStore

StoreGateSvc_t IOVDbMetaDataTool::m_inputStore
private

Definition at line 116 of file IOVDbMetaDataTool.h.

◆ m_maxRunNumber

unsigned int IOVDbMetaDataTool::m_maxRunNumber
private

Definition at line 133 of file IOVDbMetaDataTool.h.

◆ m_metaDataStore

StoreGateSvc_t IOVDbMetaDataTool::m_metaDataStore
private

Definition at line 115 of file IOVDbMetaDataTool.h.

◆ m_minMaxRunNumbers

UnsignedIntegerArrayProperty IOVDbMetaDataTool::m_minMaxRunNumbers
private

Definition at line 139 of file IOVDbMetaDataTool.h.

◆ m_minRunNumber

unsigned int IOVDbMetaDataTool::m_minRunNumber
private

Definition at line 132 of file IOVDbMetaDataTool.h.

◆ m_modifyFolders

bool IOVDbMetaDataTool::m_modifyFolders
private

Definition at line 144 of file IOVDbMetaDataTool.h.

◆ m_mutex

std::shared_mutex IOVDbMetaDataTool::m_mutex
mutableprivate

Definition at line 147 of file IOVDbMetaDataTool.h.

◆ m_newRunNumber

unsigned int IOVDbMetaDataTool::m_newRunNumber
private

Definition at line 129 of file IOVDbMetaDataTool.h.

◆ m_oldRunNumber

unsigned int IOVDbMetaDataTool::m_oldRunNumber
private

Definition at line 130 of file IOVDbMetaDataTool.h.

◆ m_overrideMinMaxRunNumber

bool IOVDbMetaDataTool::m_overrideMinMaxRunNumber
private

Definition at line 126 of file IOVDbMetaDataTool.h.

◆ m_overrideRunNumber

bool IOVDbMetaDataTool::m_overrideRunNumber
private

Definition at line 125 of file IOVDbMetaDataTool.h.

◆ m_processedFirstInputFileIncident

bool IOVDbMetaDataTool::m_processedFirstInputFileIncident
private

Definition at line 120 of file IOVDbMetaDataTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.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:529
CondAttrListCollection::minRange
const IOVRange & minRange() const
Current minimal IOVRange.
Definition: CondAttrListCollection.h:438
IOVMetaDataContainer::payloadContainer
const IOVPayloadContainer * payloadContainer() const
Access to payload container.
Definition: IOVMetaDataContainer.h:141
IOVDbMetaDataTool::m_processedFirstInputFileIncident
bool m_processedFirstInputFileIncident
Definition: IOVDbMetaDataTool.h:120
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:350
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:398
IOVTime::MAXRUN
static constexpr uint32_t MAXRUN
Definition: IOVTime.h:48
IOVDbMetaDataTool::m_metaDataStore
StoreGateSvc_t m_metaDataStore
Definition: IOVDbMetaDataTool.h:115
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
IOVDbMetaDataTool::m_attributesToBeRemoved
StringArrayProperty m_attributesToBeRemoved
Definition: IOVDbMetaDataTool.h:143
IOVMetaDataContainer::folderName
const std::string & folderName() const
Folder name.
Definition: IOVMetaDataContainer.h:127
CondAttrListCollection::addNewStop
void addNewStop(const IOVTime &stop)
Add new stop time to minRange - make sure that stop is <= to new stop
Definition: CondAttrListCollection.h:518
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
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:14
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:132
IOVDbMetaDataTool::m_modifyFolders
bool m_modifyFolders
Definition: IOVDbMetaDataTool.h:144
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
CondAttrListCollection::addNewStart
void addNewStart(const IOVTime &start)
Add new start time to minRange - make sure that start is >= to new start.
Definition: CondAttrListCollection.h:508
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
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:52
IOVDbMetaDataTool::overrideIOV
StatusCode overrideIOV(CondAttrListCollection *&coll) const
override IOV with new run number
Definition: IOVDbMetaDataTool.cxx:610
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
IOVPayloadContainer::size
size_type size() const
size of payload vector
Definition: IOVPayloadContainer.h:121
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
IOVDbMetaDataTool::m_minMaxRunNumbers
UnsignedIntegerArrayProperty m_minMaxRunNumbers
Definition: IOVDbMetaDataTool.h:139
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:557
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
AthCommonDataStore
Definition: AthCommonDataStore.h:52
IOVDbMetaDataTool::m_overrideMinMaxRunNumber
bool m_overrideMinMaxRunNumber
Definition: IOVDbMetaDataTool.h:126
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
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
test_pyathena.parent
parent
Definition: test_pyathena.py:15
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:384
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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:302
IOVDbMetaDataTool::m_maxRunNumber
unsigned int m_maxRunNumber
Definition: IOVDbMetaDataTool.h:133
IOVDbMetaDataTool::m_foldersToBeModified
StringArrayProperty m_foldersToBeModified
Definition: IOVDbMetaDataTool.h:142
CondAttrListCollection::ChanNum
unsigned int ChanNum
Definition: CondAttrListCollection.h:55
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:129
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
IOVTime::MAXEVENT
static constexpr uint32_t MAXEVENT
Definition: IOVTime.h:51
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
IOVDbMetaDataTool::m_oldRunNumber
unsigned int m_oldRunNumber
Definition: IOVDbMetaDataTool.h:130
CaloCellTimeCorrFiller.folderName
string folderName
Definition: CaloCellTimeCorrFiller.py:20
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
defineDB.ichan
int ichan
Definition: JetTagCalibration/share/defineDB.py:28
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
IOVDbMetaDataTool::m_mutex
std::shared_mutex m_mutex
Definition: IOVDbMetaDataTool.h:147
CondAttrListCollection::size
size_type size() const
number of Chan/AttributeList pairs
Definition: CondAttrListCollection.h:322
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
IOVDbMetaDataTool::m_inputStore
StoreGateSvc_t m_inputStore
Definition: IOVDbMetaDataTool.h:116
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
a
TList * a
Definition: liststreamerinfos.cxx:10
h
IOVDbMetaDataTool::checkOverrideRunNumber
void checkOverrideRunNumber()
check if we should override the run number in the incoming meta data
Definition: IOVDbMetaDataTool.cxx:134
makeDTCalibBlob_pickPhase.folders
folders
Definition: makeDTCalibBlob_pickPhase.py:346
IOVPayloadContainer::const_iterator
payloadVec::const_iterator const_iterator
Definition: IOVPayloadContainer.h:39
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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:227
DEBUG
#define DEBUG
Definition: page_access.h:11
IOVPayloadContainer::end
const_iterator end() const
End of payload vector.
Definition: IOVPayloadContainer.h:114
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
LArNewCalib_DelayDump_OFC_Cali.eventSelector
eventSelector
Definition: LArNewCalib_DelayDump_OFC_Cali.py:112
IOVDbMetaDataTool::m_overrideRunNumber
bool m_overrideRunNumber
Definition: IOVDbMetaDataTool.h:125
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
CondAttrListCollection::AttributeList
coral::AttributeList AttributeList
Definition: CondAttrListCollection.h:56
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
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:452
SG::ConstIterator
Definition: SGIterator.h:163
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
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:431
ServiceHandle< IIncidentSvc >