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

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

◆ 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  IProperty* propertyServer(0);
159  StatusCode sc = serviceLocator()->service("ApplicationMgr", propertyServer);
160  if (sc != StatusCode::SUCCESS ) {
161  ATH_MSG_ERROR("checkOverrideRunNumber: Cannot get ApplicationMgr ");
162  return;
163  }
164  StringProperty property("EvtSel", "");
165  sc = propertyServer->getProperty(&property);
166  if (!sc.isSuccess()) {
167  ATH_MSG_ERROR("checkOverrideRunNumber: unable to get EvtSel: found " << property.value());
168  return;
169  }
170  // Get EventSelector for ApplicationMgr
171  std::string eventSelector = property.value();
172  sc = serviceLocator()->service(eventSelector, propertyServer);
173  if (sc != StatusCode::SUCCESS ) {
174  ATH_MSG_ERROR("checkOverrideRunNumber: Cannot get EventSelector " << eventSelector);
175  return;
176  }
177 
178  // Is flag set to override the run number?
179  BooleanProperty overrideRunNumber = IntegerProperty("OverrideRunNumberFromInput", false);
180  sc = propertyServer->getProperty(&overrideRunNumber);
181  if (!sc.isSuccess()) {
182  // Not all EventSelectors have this property, so we must be tolerant
183  ATH_MSG_DEBUG("resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector ");
184  return;
185  }
186  m_overrideRunNumber = overrideRunNumber.value();
187  if (m_overrideRunNumber) {
188  // New run number
189  IntegerProperty runNumber = IntegerProperty("RunNumber", 0);
190  sc = propertyServer->getProperty(&runNumber);
191  if (!sc.isSuccess()) {
192  ATH_MSG_ERROR("checkOverrideRunNumber: unable to get RunNumber from EventSelector: found "
193  << runNumber.value());
194  return;
195  }
196  m_newRunNumber = runNumber.value();
197  // Old run number
198  runNumber = IntegerProperty("OldRunNumber", 0);
199  sc = propertyServer->getProperty(&runNumber);
200  if (!sc.isSuccess()) {
201  ATH_MSG_ERROR("checkOverrideRunNumber: unable to get OldRunNumber from EventSelector: found "
202  << runNumber.value());
203  return;
204  }
205  m_oldRunNumber = runNumber.value();
206 
207  ATH_MSG_DEBUG("checkOverrideRunNumber: Changing old to new run number: " << m_oldRunNumber
208  << " " << m_newRunNumber << " obtained from " << eventSelector);
209  }
210  else ATH_MSG_DEBUG("checkOverrideRunNumber: OverrideRunNumberFromInput not set for " << eventSelector);
211 }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

◆ 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
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
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
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:399
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::minRange
IOVRange minRange() const
Current minimal IOVRange.
Definition: CondAttrListCollection.h:438
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:611
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
IOVDbMetaDataTool::m_minMaxRunNumbers
UnsignedIntegerArrayProperty m_minMaxRunNumbers
Definition: IOVDbMetaDataTool.h:139
IOVRange::stop
const IOVTime & stop() const
Definition: IOVRange.h:39
defineDB.folders
list folders
Definition: JetTagCalibration/share/defineDB.py:26
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
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:92
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:303
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:192
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
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:228
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:616
LArNewCalib_DelayDump_OFC_Cali.eventSelector
eventSelector
Definition: LArNewCalib_DelayDump_OFC_Cali.py:112
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
IOVDbMetaDataTool::m_overrideRunNumber
bool m_overrideRunNumber
Definition: IOVDbMetaDataTool.h:125
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
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:135
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:432
ServiceHandle< IIncidentSvc >