ATLAS Offline Software
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
MetaDataSvc Class Reference

Manages the content of the metadata stores. More...

#include <MetaDataSvc.h>

Inheritance diagram for MetaDataSvc:
Collaboration diagram for MetaDataSvc:

Classes

class  ToolLockGuard
 

Public Member Functions

 MetaDataSvc (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Service Constructor. More...
 
virtual ~MetaDataSvc ()
 Destructor. More...
 
virtual StatusCode prepareOutput ()
 Makes the metadata store ready for output. More...
 
StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface) override
 Provide access to the interfaces implemented by this service. More...
 
virtual void handle (const Incident &incident) override
 react to file incidents. More...
 
StatusCode transitionMetaDataFile (const std::string &outputConn, bool disconnect)
 Transition output metadata file - fire MeteDataStop incident to transition OutputStream and disconnect now if requested. More...
 
virtual StatusCode io_reinit () override
 Implements IIoComponent interface sets m_outputPrepared to false and prints some information. More...
 
StatusCode rootOpenAction (FILEMGR_CALLBACK_ARGS)
 
virtual StoreGateSvcoutputDataStore () const override final
 
virtual const std::string currentRangeID () const override final
 
CLID remapMetaContCLID (const CLID &item_id) const
 
void lockTools () const
 
void unlockTools () const
 
void recordHook (const std::type_info &) override
 
void removeHook (const std::type_info &) override
 
std::string removeStreamFromKey (std::string &key)
 check if the metadata object key contains Stream name (added by SharedWriter in MetaDataSvc) remove stream part from the key (i.e. More...
 
virtual std::set< std::string > getPerStreamKeysFor (const std::string &key) const override final
 Get all per-stream Key variants created for in-file metadata object with original key If no stream-specific keys are found, it returns the original key. More...
 
virtual StatusCode initialize () override
 initialize the metadata service at the beginning of the job More...
 
virtual StatusCode stop () override
 stop the metadata service More...
 
virtual StatusCode finalize () override
 finalize the metadata service at the end of the job More...
 
virtual StatusCode newMetadataSource (const Incident &)
 Fills the input metadata store with the content of the new input file. More...
 
virtual StatusCode retireMetadataSource (const Incident &)
 Allows metadata tools to act before an input file is closed. More...
 
virtual StatusCode prepareOutput (const std::string &outputName)
 Makes the metadata store ready for output with SharedWriter Calls the metaDataStop method of all MetaDataTool interfaces in m_metaDataTool. More...
 
virtual StatusCode shmProxy (const std::string &filename) override
 Loads file metadata from memory shared between streams in SharedWriter This function clears the input and output metadata stores. More...
 
StatusCode preLoadAddresses (StoreID::type, IAddressProvider::tadList &) override
 does nothing. More...
 
StatusCode loadAddresses (StoreID::type storeID, IAddressProvider::tadList &tads) override
 loads addresses of versioned metadata object. More...
 
StatusCode updateAddress (StoreID::type, SG::TransientAddress *, const EventContext &) override
 always fails More...
 

Static Public Member Functions

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

Private Member Functions

StatusCode addProxyToInputMetaDataStore (const std::string &tokenStr)
 
StatusCode initInputMetaDataStore (const std::string &fileName)
 Initialize input metadata store - can be called directly or via BeginInputFile incident. More...
 

Private Attributes

ServiceHandle< StoreGateSvcm_inputDataStore
 
ServiceHandle< StoreGateSvcm_outputDataStore
 
ServiceHandle< IAddressCreator > m_addrCrtr
 
ServiceHandle< IFileMgr > m_fileMgr
 
ServiceHandle< IIncidentSvc > m_incSvc
 
ServiceHandle< OutputStreamSequencerSvcm_outSeqSvc
 
ServiceHandle< IClassIDSvc > m_classIDSvc {"ClassIDSvc", name()}
 
long m_storageType
 
bool m_clearedInputDataStore
 
bool m_clearedOutputDataStore
 
bool m_allowMetaDataStop
 
bool m_outputPrepared
 
std::map< std::string, CLIDm_persToClid
 
std::map< CLID, std::string > m_toolForClid
 
std::set< CLIDm_handledClasses
 
const std::string m_streamInKeyMark = "__STREAM["
 marker string for embedding stream name in MetaData object keys for SharedWriter server More...
 
std::map< std::string, std::set< std::string > > m_streamKeys
 
StringProperty m_metaDataCont
 MetaDataContainer, POOL container name for MetaData. More...
 
ToolHandleArray< IMetaDataToolm_metaDataTools
 MetaDataTools, vector with the MetaData tools. More...
 

Friends

class SvcFactory< MetaDataSvc >
 

Detailed Description

Manages the content of the metadata stores.

This service orchestrates the reading of metadata from input files and its propagation to the output with the help of the IMetaDataTool interfaces in m_metaDataTools. The MetaDataSvc reacts to BeginInputFile and EndInputFile incidents. It relies on the AthenaPoolCnvSvc (or whatever persistency service) to call the the appropriate prepareOutput method when committing the MetaDataStore content to the output file.

On BeginInputFile it clears the InputMetaDataStore and populates it with content from the new input file. The beginInputFile methods of all tools are called to allow required actions on the metadata objects.

On EndInputFile the MetaDataSvc calls the endInputFile methods of all the interfaces in m_metaDataTools .

In jobs with multiple parallel output streams (SharedWriter) the metadata content from multiple streams is put into the output MetaDataStore. To do this the The MetaDataSvc accesses the memory shared with the output streams, and adds the content of their MetaDataStore to the shared InputMetaDataStore. This is done by the client calling shmProxy for each object to be added to the MetaDataStore. Afterwards the client must also fire BeginInputFile and EndInputFile incidents to allow the MetaDataTools to move their objects from the InputMetaDataStore to the MetaDataStore taking care of possible merges.

Example configuration:

ca.addService(CompFactory.StoreGateSvc("MetaDataStore"))
ca.addService(CompFactory.StoreGateSvc("InputMetaDataStore"))
metaDataSvc = CompFactory.MetaDataSvc("MetaDataSvc")
ca.addService(
CompFactory.ProxyProviderSvc(ProviderNames=["MetaDataSvc"]))
metaDataSvc.MetaDataTools += [someMetaDataTool]
See also
IMetaDataTool
AthenaPoolCnvSvc

Definition at line 90 of file MetaDataSvc.h.

Constructor & Destructor Documentation

◆ MetaDataSvc()

MetaDataSvc::MetaDataSvc ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Standard Service Constructor.

Definition at line 52 of file MetaDataSvc.cxx.

52  : base_class(name, pSvcLocator),
53  m_inputDataStore("StoreGateSvc/InputMetaDataStore", name),
54  m_outputDataStore("StoreGateSvc/MetaDataStore", name),
55  m_addrCrtr("AthenaPoolCnvSvc", name),
56  m_fileMgr("FileMgr", name),
57  m_incSvc("IncidentSvc", name),
58  m_outSeqSvc("OutputStreamSequencerSvc", name),
59  m_storageType(0L),
62  m_allowMetaDataStop(false),
63  m_outputPrepared(false),
64  m_persToClid(),
65  m_toolForClid() {
66  // declare properties
67  declareProperty("MetaDataContainer", m_metaDataCont = "");
68  declareProperty("MetaDataTools", m_metaDataTools);
69  declareProperty("CnvSvc", m_addrCrtr = ServiceHandle<IAddressCreator>("AthenaPoolCnvSvc", name));
70  // persistent class name to transient CLID map
71  m_persToClid.insert(std::pair<std::string, CLID>("DataHeader_p5", 222376821));
72  m_persToClid.insert(std::pair<std::string, CLID>("EventStreamInfo_p3", 167728019));
73  m_persToClid.insert(std::pair<std::string, CLID>("ByteStreamMetadataContainer_p1", 1076128893));
74  m_persToClid.insert(std::pair<std::string, CLID>("IOVMetaDataContainer_p1", 1316383046));
75  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::EventFormat_v1", 243004407));
76  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::CutBookkeeperContainer_v1", 1234982351));
77  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::CutBookkeeperAuxContainer_v1", 1147935274));
78  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::TriggerMenuContainer_v1", 1107011239));
79  m_persToClid.insert(std::pair<std::string, CLID>("DataVector<xAOD::TriggerMenu_v1>", 1107011239));
80  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::TriggerMenuAuxContainer_v1", 1212409402));
81  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::TriggerMenuJsonContainer_v1", 1221262614));
82  m_persToClid.insert(std::pair<std::string, CLID>("DataVector<xAOD::TriggerMenuJson_v1>", 1221262614));
83  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::TriggerMenuJsonAuxContainer_v1", 373045213));
84  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::LumiBlockRangeContainer_v1", 1115934851));
85  m_persToClid.insert(std::pair<std::string, CLID>("DataVector<xAOD::LumiBlockRange_v1>", 1115934851));
86  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::LumiBlockRangeAuxContainer_v1", 1251061086));
87  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::FileMetaData_v1", 178309087));
88  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::FileMetaDataAuxInfo_v1", 73252552));
89  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::RingSetConfContainer_v1", 1157997427));
90  m_persToClid.insert(std::pair<std::string, CLID>("DataVector<xAOD::RingSetConf_v1>", 1157997427));
91  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::RingSetConfAuxContainer_v1", 1307745126));
92  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::TruthMetaDataContainer_v1", 1188015687));
93  m_persToClid.insert(std::pair<std::string, CLID>("DataVector<xAOD::TruthMetaData_v1>", 1188015687));
94  m_persToClid.insert(std::pair<std::string, CLID>("xAOD::TruthMetaDataAuxContainer_v1", 1094306618));
95  // some classes need to have new/different tools added for metadata propagation
96  m_toolForClid.insert(std::pair<CLID, std::string>(167728019, "CopyEventStreamInfo"));
97  m_toolForClid.insert(std::pair<CLID, std::string>(243004407, "xAODMaker::EventFormatMetaDataTool"));
98  m_toolForClid.insert(std::pair<CLID, std::string>(1234982351, "BookkeeperTool"));
99  m_toolForClid.insert(std::pair<CLID, std::string>(1107011239, "xAODMaker::TriggerMenuMetaDataTool"));
100  m_toolForClid.insert(std::pair<CLID, std::string>(1221262614, "xAODMaker::TriggerMenuMetaDataTool"));
101  m_toolForClid.insert(std::pair<CLID, std::string>(1115934851, "LumiBlockMetaDataTool"));
102  m_toolForClid.insert(std::pair<CLID, std::string>(178309087, "xAODMaker::FileMetaDataTool"));
103  m_toolForClid.insert(std::pair<CLID, std::string>(1188015687, "xAODMaker::TruthMetaDataTool"));
104 }

◆ ~MetaDataSvc()

MetaDataSvc::~MetaDataSvc ( )
virtual

Destructor.

Definition at line 106 of file MetaDataSvc.cxx.

106  {
107 }

Member Function Documentation

◆ addProxyToInputMetaDataStore()

StatusCode MetaDataSvc::addProxyToInputMetaDataStore ( const std::string &  tokenStr)
private

Definition at line 453 of file MetaDataSvc.cxx.

453  {
454  std::string fileName = tokenStr.substr(tokenStr.find("[FILE=") + 6);
455  leftString(fileName, ']');
456  std::string className = tokenStr.substr(tokenStr.find("[PNAME=") + 7);
457  leftString(className, ']');
458  std::string contName = tokenStr.substr(tokenStr.find("[CONT=") + 6);
459  leftString(contName,']');
460  std::size_t pos1 = contName.find('(');
461  std::string keyName = contName.substr(pos1 + 1, contName.size() - pos1 - 2);
462  std::size_t pos2 = keyName.find('/');
463  if (pos2 != std::string::npos) keyName = keyName.substr(pos2 + 1);
464  std::string numName = tokenStr.substr(tokenStr.find("[NUM=") + 5);
465  leftString(numName,']');
466  unsigned long num = 0;
467  std::istringstream iss(numName);
468  iss >> num;
469  CLID clid = m_persToClid[className];
470  if (clid == 167728019) { // EventStreamInfo, will change tool to combine input metadata, clearing things before...
471  bool foundTool = false;
472  for (auto iter = m_metaDataTools.begin(), iterEnd = m_metaDataTools.end(); iter != iterEnd; iter++) {
473  if ((*iter)->name() == "ToolSvc.CopyEventStreamInfo") foundTool = true;
474  }
475  if (!foundTool) {
476  if (serviceLocator()->existsService("CutFlowSvc")) {
477  ServiceHandle<IIncidentListener> cfSvc("CutFlowSvc", this->name()); // Disable CutFlowSvc by stopping its incidents.
478  if (cfSvc.retrieve().isSuccess()) {
479  ATH_MSG_INFO("Disabling incidents for: " << cfSvc.name());
480  m_incSvc->removeListener(cfSvc.get(), IncidentType::BeginInputFile);
481  m_incSvc->removeListener(cfSvc.get(), "MetaDataStop");
482  cfSvc.release().ignore();
483  }
484  }
485  if (serviceLocator()->existsService("xAODConfigSvc")) {
486  ServiceHandle<IIncidentListener> xcSvc("xAODConfigSvc", this->name()); // Disable xAODConfigSvc, fails for merging
487  if (xcSvc.retrieve().isSuccess()) {
488  ATH_MSG_INFO("Disabling incidents for: " << xcSvc.name());
489  m_incSvc->removeListener(xcSvc.get(), IncidentType::BeginInputFile);
490  m_incSvc->removeListener(xcSvc.get(), IncidentType::BeginEvent);
491  xcSvc.release().ignore();
492  }
493  }
494  }
495  }
496  const std::string toolName = m_toolForClid[clid];
497  if (!toolName.empty()) {
498  std::string toolInstName;
499  std::size_t pos = toolName.find("::");
500  if (pos != std::string::npos) {
501  toolInstName = toolName.substr(pos + 2);
502  } else {
503  toolInstName = toolName;
504  }
505  bool foundTool = false;
506  for (auto iter = m_metaDataTools.begin(), iterEnd = m_metaDataTools.end(); iter != iterEnd; iter++) {
507  if ((*iter)->name() == "ToolSvc." + toolInstName) foundTool = true;
508  }
509  if (!foundTool) {
510  if (toolInstName != toolName) {
511  toolInstName = toolName + "/" + toolInstName;
512  }
513  ToolHandle<IMetaDataTool> metadataTool(toolInstName);
514  m_metaDataTools.push_back(metadataTool);
515  ATH_MSG_DEBUG("Added new MetaDataTool: " << metadataTool->name());
516  if (!metadataTool.retrieve().isSuccess()) {
517  ATH_MSG_FATAL("Cannot get " << toolInstName);
518  return(StatusCode::FAILURE);
519  }
520  }
521  }
522  // make stream-unique keys for infile metadata objects
523  // AthenaOutputStream will use this to distribute objects to the right stream (and restore the original key)
524  if( clid == 178309087 ) { // FileMetaData
525  std::string newName = keyName + m_streamInKeyMark + fileName + "]";
526  ATH_MSG_DEBUG("Recording " << keyName << " as " << newName);
527  m_streamKeys[keyName].insert(newName);
528  keyName = std::move(newName);
529  }
530  if( clid == 73252552 ) { // FileMetaDataAuxInfo
531  std::string newName = keyName.substr(0, keyName.find(RootAuxDynIO::AUX_POSTFIX)) + m_streamInKeyMark
533  ATH_MSG_DEBUG("Recording " << keyName << " as " << newName);
534  m_streamKeys[keyName].insert(newName);
535  keyName = std::move(newName);
536  }
537  const std::string par[3] = { "SHM" , keyName , className };
538  const unsigned long ipar[2] = { num , 0 };
539  IOpaqueAddress* opqAddr = nullptr;
540  SG::DataProxy* dp = m_inputDataStore->proxy(clid, keyName);
541  if (dp != nullptr) {
542  ATH_MSG_DEBUG("Resetting duplicate proxy for: " << clid << "#" << keyName << " from file: " << fileName);
543  dp->reset();
544  }
545  if (!m_addrCrtr->createAddress(m_storageType, clid, par, ipar, opqAddr).isSuccess()) {
546  ATH_MSG_FATAL("addProxyToInputMetaDataStore: Cannot create address for " << tokenStr);
547  return(StatusCode::FAILURE);
548  }
549  if (m_inputDataStore->recordAddress(keyName, opqAddr).isFailure()) {
550  delete opqAddr; opqAddr = nullptr;
551  ATH_MSG_FATAL("addProxyToInputMetaDataStore: Cannot create proxy for " << tokenStr);
552  return(StatusCode::FAILURE);
553  }
554  if (m_inputDataStore->accessData(clid, keyName) == nullptr) {
555  ATH_MSG_FATAL("addProxyToInputMetaDataStore: Cannot access data for " << tokenStr);
556  return(StatusCode::FAILURE);
557  }
558  if (keyName.find(RootAuxDynIO::AUX_POSTFIX) != std::string::npos
559  && m_inputDataStore->symLink(clid, keyName, 187169987).isFailure()) {
560  ATH_MSG_WARNING("addProxyToInputMetaDataStore: Cannot symlink to AuxStore for " << tokenStr);
561  }
562  return(StatusCode::SUCCESS);
563 }

◆ currentRangeID()

const std::string MetaDataSvc::currentRangeID ( ) const
finaloverridevirtual

Definition at line 632 of file MetaDataSvc.cxx.

633 {
634  return m_outSeqSvc.isValid()? m_outSeqSvc->currentRangeID() : "";
635 }

◆ finalize()

StatusCode MetaDataSvc::finalize ( )
overridevirtual

finalize the metadata service at the end of the job

Definition at line 161 of file MetaDataSvc.cxx.

161  {
162  // Release IncidentService
163  if (!m_incSvc.release().isSuccess()) {
164  ATH_MSG_WARNING("Cannot release IncidentService.");
165  }
166  // Release FileMgr
167  if (!m_fileMgr.release().isSuccess()) {
168  ATH_MSG_WARNING("Cannot release FileMgr.");
169  }
170  // Release AddressCreator
171  if (!m_addrCrtr.release().isSuccess()) {
172  ATH_MSG_WARNING("Cannot release AddressCreator.");
173  }
174  // Release OutputMetaDataStore
175  if (!m_outputDataStore.release().isSuccess()) {
176  ATH_MSG_WARNING("Cannot release OutputMetaDataStore.");
177  }
178  // Release InputMetaDataStore
179  if (!m_inputDataStore.release().isSuccess()) {
180  ATH_MSG_WARNING("Cannot release InputMetaDataStore.");
181  }
182  return(StatusCode::SUCCESS);
183 }

◆ getPerStreamKeysFor()

std::set< std::string > MetaDataSvc::getPerStreamKeysFor ( const std::string &  key) const
finaloverridevirtual

Get all per-stream Key variants created for in-file metadata object with original key If no stream-specific keys are found, it returns the original key.

Definition at line 445 of file MetaDataSvc.cxx.

445  {
446  auto iter = m_streamKeys.find( key );
447  if( iter == m_streamKeys.end() ) {
448  return std::set<std::string>( {key} );
449  }
450  return iter->second;
451 }

◆ handle()

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

react to file incidents.

calls newMetadataSource on BeginInputFile and retireMetadataSource on EndInputFile. Does

Parameters
incidentis expected to be BeginInputFile or EndInputFile

Definition at line 357 of file MetaDataSvc.cxx.

357  {
358  const FileIncident* fileInc = dynamic_cast<const FileIncident*>(&inc);
359  if (fileInc == nullptr) {
360  ATH_MSG_ERROR("Unable to get FileName from EndInputFile incident");
361  return;
362  }
363  const std::string fileName = fileInc->fileName();
364  ATH_MSG_DEBUG("handle() " << inc.type() << " for " << fileName);
365 
366  if (inc.type() == "FirstInputFile") {
367  // Register open/close callback actions
368  using namespace boost::placeholders;
369  Io::bfcn_action_t boa = boost::bind(&MetaDataSvc::rootOpenAction, this, _1,_2);
370  if (m_fileMgr->regAction(boa, Io::OPEN).isFailure()) {
371  ATH_MSG_FATAL("Cannot register ROOT file open action with FileMgr.");
372  }
373  if (!initInputMetaDataStore(fileName).isSuccess()) {
374  ATH_MSG_WARNING("Unable to initialize InputMetaDataStore");
375  }
376  } else if (inc.type() == "BeginInputFile") {
377  if(newMetadataSource(inc).isFailure()) {
378  ATH_MSG_ERROR("Could not process new metadata source " << fileName);
379  }
380  } else if (inc.type() == "EndInputFile") {
381  if(retireMetadataSource(inc).isFailure()) {
382  ATH_MSG_ERROR("Could not retire metadata source " << fileName);
383  }
384  }
385 }

◆ initialize()

StatusCode MetaDataSvc::initialize ( )
overridevirtual

initialize the metadata service at the beginning of the job

Definition at line 109 of file MetaDataSvc.cxx.

109  {
110  ATH_MSG_INFO("Initializing " << name());
111 
112  // Retrieve InputMetaDataStore
113  ATH_CHECK( m_inputDataStore.retrieve() );
114  // Retrieve OutputMetaDataStore
115  ATH_CHECK( m_outputDataStore.retrieve() );
116  // Retrieve AddressCreator
117  ATH_CHECK( m_addrCrtr.retrieve() );
118 
119  AthCnvSvc* cnvSvc = dynamic_cast<AthCnvSvc*>(m_addrCrtr.operator->());
120  if (cnvSvc) {
121  m_storageType = cnvSvc->repSvcType();
122  } else {
123  ATH_MSG_WARNING("Cannot get ConversionSvc Interface.");
124  }
125  // Get FileMgr
126  ATH_CHECK( m_fileMgr.retrieve() );
127 
128  // Set to be listener for end of event
129  ATH_CHECK( m_incSvc.retrieve() );
130 
131  ATH_CHECK( m_metaDataTools.retrieve() );
132  ATH_MSG_INFO("Found " << m_metaDataTools);
133 
134  m_incSvc->addListener(this, "FirstInputFile", 80, true);
135  m_incSvc->addListener(this, "BeginInputFile", 80, true);
136  m_incSvc->addListener(this, "EndInputFile", 10, true);
137 
138  // Register this service for 'I/O' events
139  ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", this->name());
140  ATH_CHECK( iomgr.retrieve() );
141  ATH_CHECK( iomgr->io_register(this) );
142 
143  ServiceHandle<Gaudi::Interfaces::IOptionsSvc> joSvc("JobOptionsSvc", name());
144  if (!joSvc.retrieve().isSuccess()) {
145  ATH_MSG_WARNING("Cannot get JobOptionsSvc.");
146  } else {
147  if (joSvc->has("EventSelector.InputCollections")) {
148  // Get EventSelector to force in-time initialization and FirstInputFile incident
149  ServiceHandle<IEvtSelector> evtsel("EventSelector", this->name());
150  if (!evtsel.retrieve().isSuccess()) {
151  ATH_MSG_WARNING("Cannot get EventSelector.");
152  }
153  }
154  }
155  // retrieve the output sequences service (EventService) if available
156  m_outSeqSvc.retrieve().ignore();
157 
158  return(StatusCode::SUCCESS);
159 }

◆ initInputMetaDataStore()

StatusCode MetaDataSvc::initInputMetaDataStore ( const std::string &  fileName)
private

Initialize input metadata store - can be called directly or via BeginInputFile incident.

Definition at line 565 of file MetaDataSvc.cxx.

565  {
566  ATH_MSG_DEBUG("initInputMetaDataStore: file name " << fileName);
567  m_clearedInputDataStore = false;
568  // Load proxies for InputMetaDataStore
569  if (m_metaDataCont.value().empty()) {
570  ATH_MSG_DEBUG("MetaDataSvc called without MetaDataContainer set.");
571  return(StatusCode::SUCCESS);
572  }
573  if (fileName.starts_with( "BSF:")) {
574  ATH_MSG_DEBUG("MetaDataSvc called for non ROOT file.");
575  } else if (fileName.compare(0, 3, "SHM")==0) {
576  ATH_MSG_DEBUG("MetaDataSvc called for shared memory.");
577  } else {
578  const std::string par[2] = { fileName, m_metaDataCont.value() + "(DataHeader)" };
579  const std::string parOld[2] = { fileName, m_metaDataCont.value() + "DataHeader" };
580  for (int verNumber = 0; verNumber < 100; verNumber++) {
581  SG::VersionedKey myVersKey(name(), verNumber);
582  if (m_inputDataStore->contains<DataHeader>(myVersKey)) {
583  ATH_MSG_DEBUG("initInputMetaDataStore: MetaData Store already contains DataHeader, key = " << myVersKey);
584  } else {
585  const unsigned long ipar[2] = { (unsigned long)verNumber , 0 };
586  IOpaqueAddress* opqAddr = nullptr;
587  if (!m_addrCrtr->createAddress(m_storageType, ClassID_traits<DataHeader>::ID(), par, ipar, opqAddr).isSuccess()) {
588  if (!m_addrCrtr->createAddress(m_storageType, ClassID_traits<DataHeader>::ID(), parOld, ipar, opqAddr).isSuccess()) {
589  break;
590  }
591  }
592  if (m_inputDataStore->recordAddress(myVersKey, opqAddr).isFailure()) {
593  delete opqAddr; opqAddr = nullptr;
594  ATH_MSG_WARNING("initInputMetaDataStore: Cannot create proxy for DataHeader, key = " << myVersKey);
595  }
596  }
597  }
598  std::list<SG::TransientAddress*> tList;
599  if (!loadAddresses(StoreID::METADATA_STORE, tList).isSuccess()) {
600  ATH_MSG_ERROR("Unable to load MetaData Proxies");
601  return StatusCode::FAILURE;
602  }
603  for (SG::TransientAddress* tad : tList) {
604  CLID clid = tad->clID();
605  ATH_MSG_VERBOSE("initInputMetaDataStore: add proxy for clid = " << clid << ", key = " << tad->name());
606  if (m_inputDataStore->contains(tad->clID(), tad->name())) {
607  ATH_MSG_DEBUG("initInputMetaDataStore: MetaData Store already contains clid = " << clid << ", key = " << tad->name());
608  } else {
609  if (!m_inputDataStore->recordAddress(tad->name(), tad->address())) {
610  ATH_MSG_ERROR("initInputMetaDataStore: Cannot create proxy for clid = " << clid << ", key = " << tad->name());
611  return StatusCode::FAILURE;
612  }
613  }
614 
615  for (CLID tclid : tad->transientID()) {
616  if (tclid != clid) {
617  if (m_inputDataStore->symLink (clid, tad->name(), tclid).isFailure()) {
618  ATH_MSG_WARNING("Cannot make autosymlink from " <<
619  clid << "/" << tad->name() << " to " << tclid);
620  }
621  }
622  }
623  delete tad;
624  }
625  tList.clear();
626  }
627  ATH_MSG_DEBUG("Loaded input meta data store proxies");
628  return(StatusCode::SUCCESS);
629 }

◆ interfaceID()

static const InterfaceID& MetaDataSvc::interfaceID ( )
inlinestatic

Retrieve interface ID.

Definition at line 106 of file MetaDataSvc.h.

106 { return IID_MetaDataSvc; }

◆ io_reinit()

StatusCode MetaDataSvc::io_reinit ( )
overridevirtual

Implements IIoComponent interface sets m_outputPrepared to false and prints some information.

Returns
SUCCESS
See also
IIoComponent

Definition at line 416 of file MetaDataSvc.cxx.

416  {
417  ATH_MSG_INFO("I/O reinitialization...");
418  ATH_MSG_INFO("Dumping InputMetaDataStore: " << m_inputDataStore->dump());
419  ATH_MSG_INFO("Dumping OutputMetaDataStore: " << m_outputDataStore->dump());
420  for (auto iter = m_metaDataTools.begin(),
421  last = m_metaDataTools.end(); iter != last; iter++) {
422  ATH_MSG_INFO("Attached MetaDataTool: " << (*iter)->name());
423  }
424  m_outputPrepared = false;
425  return(StatusCode::SUCCESS);
426 }

◆ loadAddresses()

StatusCode MetaDataSvc::loadAddresses ( StoreID::type  storeID,
IAddressProvider::tadList tads 
)
override

loads addresses of versioned metadata object.

loops over all versions of the DataHeader and adds addresses of objects from DataHeaderElements to the tads with a version corresponding to version number of the DataHeader that contained them.

See also
ObjectWithVersion
DataHeader
Parameters
storeID[IN] the identity of the store
tads[OUT] list of addresses to objects from versions keys
Returns
FAILURE the DataHeader could not be retrieved, else SUCCESS

Definition at line 206 of file MetaDataSvc.cxx.

206  {
207  if (storeID != StoreID::METADATA_STORE) { // should this (also) run in the INPUT_METADATA_STORE?
208  return(StatusCode::SUCCESS);
209  }
210  // Put Additional MetaData objects into Input MetaData Store using VersionedKey
211  std::list<SG::ObjectWithVersion<DataHeader> > allVersions;
212  StatusCode sc = m_inputDataStore->retrieveAllVersions(allVersions, name());
213  if (!sc.isSuccess()) {
214  ATH_MSG_WARNING("Could not retrieve all versions for DataHeader, will not read Metadata");
215  } else {
216  int verNumber = -1;
217  for (SG::ObjectWithVersion<DataHeader>& obj : allVersions) {
218  ++verNumber;
219  const DataHeader* dataHeader = obj.dataObject.cptr();
220  if (dataHeader == nullptr) {
221  ATH_MSG_ERROR("Could not get DataHeader, will not read Metadata");
222  return(StatusCode::FAILURE);
223  }
224  for (const DataHeaderElement& dhe : *dataHeader) {
225  const CLID clid = dhe.getPrimaryClassID();
226  if (clid != ClassID_traits<DataHeader>::ID()) {
227  SG::VersionedKey myVersObjKey(dhe.getKey(), verNumber);
228  std::string key = dhe.getKey();
229  if (verNumber != 0) key = myVersObjKey;
230  tads.push_back(dhe.getAddress(key));
231  }
232  }
233  }
234  }
235  return(StatusCode::SUCCESS);
236 }

◆ lockTools()

void MetaDataSvc::lockTools ( ) const

Definition at line 685 of file MetaDataSvc.cxx.

686 {
687  ATH_MSG_DEBUG("Locking metadata tools");
688  for(auto tool : m_metaDataTools ) {
689  ILockableTool *lockable = dynamic_cast<ILockableTool*>( tool.get() );
690  if( lockable ) lockable->lock_shared();
691  }
692 }

◆ newMetadataSource()

StatusCode MetaDataSvc::newMetadataSource ( const Incident &  inc)
virtual

Fills the input metadata store with the content of the new input file.

Once the GUID and name of the input file are determined from the incident this function blocks stopping the MetaDataSvc by setting m_allowMetaDataStop to false. Then attempts first to clear the input metadata store and prepare it for the metadata tools by calling initInputMetaDataStore. The loops over all MetaDataTool interfaces in m_metaDataTools and calls their beginInputFile implementations.

See also
initInputMetaDataStore()
m_metaDataTools
Parameters
incThe BeginInputFile incident fired on opening a new file
Returns
FAILURE when inc is not a file incident, the input metadata store cannot be set up, or a MetaDataTool fails. Otherwise SUCCESS.

Definition at line 238 of file MetaDataSvc.cxx.

239 {
240  const FileIncident* fileInc = dynamic_cast<const FileIncident*>(&inc);
241  if (fileInc == nullptr) {
242  ATH_MSG_ERROR("Unable to get FileName from EndInputFile incident");
243  return StatusCode::FAILURE;
244  }
245  const std::string guid = fileInc->fileGuid();
246  const std::string fileName = fileInc->fileName();
247  m_allowMetaDataStop = false;
248  if (!fileName.starts_with( "BSF:")) {
249  // the input file is _not_ bytestream
251  if (!m_inputDataStore->clearStore().isSuccess()) {
252  ATH_MSG_WARNING("Unable to clear input MetaData Proxies");
253  }
255  }
256  if (!initInputMetaDataStore(fileName).isSuccess()) {
257  ATH_MSG_ERROR("Unable to initialize InputMetaDataStore");
258  return StatusCode::FAILURE;
259  }
260  }
261  StatusCode rc(StatusCode::SUCCESS);
262  for (auto it = m_metaDataTools.begin(); it != m_metaDataTools.end(); ++it) {
263  ATH_MSG_DEBUG(" calling beginInputFile on " << (*it)->name() << " for GUID \"" << guid << "\"");
264  if ( (*it)->beginInputFile(guid).isFailure() ) {
265  ATH_MSG_ERROR("Unable to call beginInputFile for " << (*it)->name());
266  rc = StatusCode::FAILURE;
267  }
268  }
269  return rc;
270 }

◆ outputDataStore()

virtual StoreGateSvc* MetaDataSvc::outputDataStore ( ) const
inlinefinaloverridevirtual

Definition at line 249 of file MetaDataSvc.h.

249  {
250  return &*m_outputDataStore;
251  }

◆ preLoadAddresses()

StatusCode MetaDataSvc::preLoadAddresses ( StoreID::type  ,
IAddressProvider::tadList  
)
inlineoverride

does nothing.

Parameters
storeID[IN] store ID, this function only preloads detector store addresses.
tads[OUT] list of the transient addresses which were preloaded.
Returns
SUCCESS

Definition at line 198 of file MetaDataSvc.h.

199  {
200  return StatusCode::SUCCESS;
201  }

◆ prepareOutput()

StatusCode MetaDataSvc::prepareOutput ( )
virtual

Makes the metadata store ready for output.

Calls the metaDataStop method of all MetaDataTool interfaces in m_metaDataTool. Then release the metadata tools. This implementation assumes SharedWriter is not being used.

Returns
SUCCESS unless a MetaDataTool fails, then FAILURE

Definition at line 292 of file MetaDataSvc.cxx.

293 {
294  StatusCode rc(StatusCode::SUCCESS);
295  // Check if already called
296  if (!m_outputPrepared) {
297  for (auto it = m_metaDataTools.begin(); it != m_metaDataTools.end(); ++it) {
298  ATH_MSG_DEBUG(" calling metaDataStop for " << (*it)->name());
299  if ( (*it)->metaDataStop().isFailure() ) {
300  ATH_MSG_ERROR("Unable to call metaDataStop for " << (*it)->name());
301  rc = StatusCode::FAILURE;
302  }
303  }
304  if (!m_metaDataTools.release().isSuccess()) {
305  ATH_MSG_WARNING("Cannot release " << m_metaDataTools);
306  }
307  }
308  m_outputPrepared=true;
309  return rc;
310 }

◆ queryInterface()

StatusCode MetaDataSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
)
override

Provide access to the interfaces implemented by this service.

Definition at line 195 of file MetaDataSvc.cxx.

195  {
196  if (riid == this->interfaceID()) {
197  *ppvInterface = this;
198  } else {
199  // Interface is not directly available: try out a base class
200  return(base_class::queryInterface(riid, ppvInterface));
201  }
202  addRef();
203  return(StatusCode::SUCCESS);
204 }

◆ recordHook()

void MetaDataSvc::recordHook ( const std::type_info &  typeInfo)
override

Definition at line 659 of file MetaDataSvc.cxx.

659  {
660  const std::string& typeName = System::typeinfoName(typeInfo);
661  ATH_MSG_VERBOSE("Handling record event of type " << typeName);
662 
663  CLID itemID = 0;
664  if (m_classIDSvc->getIDOfTypeInfoName(typeName, itemID).isSuccess()) {
665  auto result = m_handledClasses.insert(itemID);
666  if (result.second)
667  ATH_MSG_DEBUG("MetaDataSvc will handle " << typeName
668  << " ClassID: " << itemID);
669  }
670 }

◆ remapMetaContCLID()

CLID MetaDataSvc::remapMetaContCLID ( const CLID item_id) const

Definition at line 638 of file MetaDataSvc.cxx.

639 {
640  auto it = m_handledClasses.find(itemID);
641  if (it == m_handledClasses.end()) {
642  ATH_MSG_DEBUG("Not translating metadata item ID #" << itemID);
643  return itemID;
644  }
645 
646  std::string itemName;
647  CLID contID = 0;
648  if (m_classIDSvc->getTypeNameOfID(itemID, itemName).isSuccess()) {
649  const std::string contName = "MetaCont<" + itemName + ">";
650  ATH_MSG_DEBUG("Transforming " << contName << " to " << itemName
651  << " for output");
652  if (m_classIDSvc->getIDOfTypeName(contName, contID).isSuccess())
653  return contID;
654  }
655 
656  return itemID;
657 }

◆ removeHook()

void MetaDataSvc::removeHook ( const std::type_info &  typeInfo)
override

Definition at line 672 of file MetaDataSvc.cxx.

672  {
673  const std::string& typeName = System::typeinfoName(typeInfo);
674  ATH_MSG_VERBOSE("Handling removal event of type " << typeName);
675 
676  CLID itemID = 0;
677  if (m_classIDSvc->getIDOfTypeInfoName(typeName, itemID).isSuccess()) {
678  if (0 < m_handledClasses.erase(itemID))
679  ATH_MSG_DEBUG("MetaDataSvc will no longer handle " << typeName
680  << " ClassID: " << itemID);
681  }
682 }

◆ removeStreamFromKey()

std::string MetaDataSvc::removeStreamFromKey ( std::string &  key)

check if the metadata object key contains Stream name (added by SharedWriter in MetaDataSvc) remove stream part from the key (i.e.

modify the parameter) and return it

Definition at line 434 of file MetaDataSvc.cxx.

434  {
435  size_t pos = key.find(m_streamInKeyMark);
436  if( pos==std::string::npos ) return "";
437  size_t epos = key.find(']', pos);
438  size_t spos = pos + m_streamInKeyMark.size();
439  std::string stream = key.substr( spos, epos - spos );
440  //cppcheck-suppress uselessCallsSubstr
441  key = key.substr(0, pos) + key.substr(epos+1);
442  return stream;
443 }

◆ retireMetadataSource()

StatusCode MetaDataSvc::retireMetadataSource ( const Incident &  inc)
virtual

Allows metadata tools to act before an input file is closed.

Grabs the file GUID then calls the the endInputFile method of all metadata tools in m_metaDataTools providing the GUID as argument.

Parameters
incis a file incident fired before closing an input file
Returns
SUCCESS unless a MetaDataTool fails, then FAILURE

Definition at line 272 of file MetaDataSvc.cxx.

273 {
274  const FileIncident* fileInc = dynamic_cast<const FileIncident*>(&inc);
275  if (fileInc == nullptr) {
276  ATH_MSG_ERROR("Unable to get FileName from EndInputFile incident");
277  return StatusCode::FAILURE;
278  }
279  const std::string guid = fileInc->fileGuid();
280  ATH_MSG_DEBUG("retireMetadataSource: " << fileInc->fileName());
281  for (auto it = m_metaDataTools.begin(); it != m_metaDataTools.end(); ++it) {
282  ATH_MSG_DEBUG(" calling endInputFile on " << (*it)->name() << " for GUID \"" << guid << "\"");
283  if ( (*it)->endInputFile(guid).isFailure() ) {
284  ATH_MSG_ERROR("Unable to call endInputFile for " << (*it)->name());
285  return StatusCode::FAILURE;
286  }
287  }
288  m_allowMetaDataStop = true;
289  return StatusCode::SUCCESS;
290 }

◆ rootOpenAction()

StatusCode MetaDataSvc::rootOpenAction ( FILEMGR_CALLBACK_ARGS  )

Definition at line 428 of file MetaDataSvc.cxx.

428  {
429  return(StatusCode::SUCCESS);
430 }

◆ stop()

StatusCode MetaDataSvc::stop ( )
overridevirtual

stop the metadata service

Definition at line 186 of file MetaDataSvc.cxx.

186  {
187  ATH_MSG_DEBUG("MetaDataSvc::stop()");
188  // Fire metaDataStopIncident
189  Incident metaDataStopIncident(name(), "MetaDataStop");
190  m_incSvc->fireIncident(metaDataStopIncident);
191  return(StatusCode::SUCCESS);
192 }

◆ transitionMetaDataFile()

StatusCode MetaDataSvc::transitionMetaDataFile ( const std::string &  outputConn,
bool  disconnect 
)

Transition output metadata file - fire MeteDataStop incident to transition OutputStream and disconnect now if requested.

Definition at line 389 of file MetaDataSvc.cxx.

390 {
391  ATH_MSG_DEBUG("transitionMetaDataFile: " << outputConn );
392 
393  // this is normally called through EndInputFile inc, simulate it for EvSvc
394  FileIncident inc("transitionMetaDataFile", "EndInputFile", "dummyMetaInputFileName", "");
396 
397  // Reset flag to allow calling prepareOutput again at next transition
398  m_outputPrepared = false;
399 
400  Incident metaDataStopIncident(name(), "MetaDataStop");
401  m_incSvc->fireIncident(metaDataStopIncident);
402 
403  if( disconnect ) {
404  AthCnvSvc* cnvSvc = dynamic_cast<AthCnvSvc*>(m_addrCrtr.operator->());
405  if (cnvSvc) {
406  if (!cnvSvc->disconnectOutput(outputConn).isSuccess()) {
407  ATH_MSG_WARNING("Cannot get disconnect Output Files");
408  }
409  }
410  }
411 
412  return(StatusCode::SUCCESS);
413 }

◆ unlockTools()

void MetaDataSvc::unlockTools ( ) const

Definition at line 695 of file MetaDataSvc.cxx.

696 {
697  ATH_MSG_DEBUG("Unlocking metadata tools");
698  for(auto tool : m_metaDataTools ) {
699  ILockableTool *lockable = dynamic_cast<ILockableTool*>( tool.get() );
700  if( lockable ) lockable->unlock_shared();
701  }
702 }

◆ updateAddress()

StatusCode MetaDataSvc::updateAddress ( StoreID::type  ,
SG::TransientAddress ,
const EventContext &   
)
inlineoverride

always fails

Parameters
storeID[IN] the identity of the store
tad[IN] transient address to be updated
ctx[IN] current event's context information
Returns
FAILURE

Definition at line 222 of file MetaDataSvc.h.

224  {
225  return StatusCode::FAILURE;
226  }

Friends And Related Function Documentation

◆ SvcFactory< MetaDataSvc >

friend class SvcFactory< MetaDataSvc >
friend

Definition at line 40 of file MetaDataSvc.h.

Member Data Documentation

◆ m_addrCrtr

ServiceHandle<IAddressCreator> MetaDataSvc::m_addrCrtr
private

Definition at line 314 of file MetaDataSvc.h.

◆ m_allowMetaDataStop

bool MetaDataSvc::m_allowMetaDataStop
private

Definition at line 323 of file MetaDataSvc.h.

◆ m_classIDSvc

ServiceHandle<IClassIDSvc> MetaDataSvc::m_classIDSvc {"ClassIDSvc", name()}
private

Definition at line 318 of file MetaDataSvc.h.

◆ m_clearedInputDataStore

bool MetaDataSvc::m_clearedInputDataStore
private

Definition at line 321 of file MetaDataSvc.h.

◆ m_clearedOutputDataStore

bool MetaDataSvc::m_clearedOutputDataStore
private

Definition at line 322 of file MetaDataSvc.h.

◆ m_fileMgr

ServiceHandle<IFileMgr> MetaDataSvc::m_fileMgr
private

Definition at line 315 of file MetaDataSvc.h.

◆ m_handledClasses

std::set<CLID> MetaDataSvc::m_handledClasses
private

Definition at line 328 of file MetaDataSvc.h.

◆ m_incSvc

ServiceHandle<IIncidentSvc> MetaDataSvc::m_incSvc
private

Definition at line 316 of file MetaDataSvc.h.

◆ m_inputDataStore

ServiceHandle<StoreGateSvc> MetaDataSvc::m_inputDataStore
private

Definition at line 312 of file MetaDataSvc.h.

◆ m_metaDataCont

StringProperty MetaDataSvc::m_metaDataCont
private

MetaDataContainer, POOL container name for MetaData.

Definition at line 336 of file MetaDataSvc.h.

◆ m_metaDataTools

ToolHandleArray<IMetaDataTool> MetaDataSvc::m_metaDataTools
private

MetaDataTools, vector with the MetaData tools.

Definition at line 338 of file MetaDataSvc.h.

◆ m_outputDataStore

ServiceHandle<StoreGateSvc> MetaDataSvc::m_outputDataStore
private

Definition at line 313 of file MetaDataSvc.h.

◆ m_outputPrepared

bool MetaDataSvc::m_outputPrepared
private

Definition at line 324 of file MetaDataSvc.h.

◆ m_outSeqSvc

ServiceHandle<OutputStreamSequencerSvc> MetaDataSvc::m_outSeqSvc
private

Definition at line 317 of file MetaDataSvc.h.

◆ m_persToClid

std::map<std::string, CLID> MetaDataSvc::m_persToClid
private

Definition at line 325 of file MetaDataSvc.h.

◆ m_storageType

long MetaDataSvc::m_storageType
private

Definition at line 320 of file MetaDataSvc.h.

◆ m_streamInKeyMark

const std::string MetaDataSvc::m_streamInKeyMark = "__STREAM["
private

marker string for embedding stream name in MetaData object keys for SharedWriter server

Definition at line 330 of file MetaDataSvc.h.

◆ m_streamKeys

std::map< std::string, std::set<std::string> > MetaDataSvc::m_streamKeys
private

Definition at line 332 of file MetaDataSvc.h.

◆ m_toolForClid

std::map<CLID, std::string> MetaDataSvc::m_toolForClid
private

Definition at line 326 of file MetaDataSvc.h.


The documentation for this class was generated from the following files:
TileDCSDataPlotter.dp
dp
Definition: TileDCSDataPlotter.py:840
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MetaDataSvc::interfaceID
static const InterfaceID & interfaceID()
Retrieve interface ID.
Definition: MetaDataSvc.h:106
get_generator_info.result
result
Definition: get_generator_info.py:21
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
RootAuxDynIO::AUX_POSTFIX
constexpr char AUX_POSTFIX[]
Common post-fix for the names of auxiliary containers in StoreGate.
Definition: RootAuxDynDefs.h:10
MetaDataSvc::m_storageType
long m_storageType
Definition: MetaDataSvc.h:320
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
MetaDataSvc::m_metaDataTools
ToolHandleArray< IMetaDataTool > m_metaDataTools
MetaDataTools, vector with the MetaData tools.
Definition: MetaDataSvc.h:338
MetaDataSvc::m_clearedInputDataStore
bool m_clearedInputDataStore
Definition: MetaDataSvc.h:321
MetaDataSvc::m_clearedOutputDataStore
bool m_clearedOutputDataStore
Definition: MetaDataSvc.h:322
skel.it
it
Definition: skel.GENtoEVGEN.py:423
SG::TransientAddress
Definition: TransientAddress.h:32
ILockableTool::lock_shared
virtual void lock_shared() const =0
Lock the tool.
MetaDataSvc::m_inputDataStore
ServiceHandle< StoreGateSvc > m_inputDataStore
Definition: MetaDataSvc.h:312
MetaDataSvc::m_metaDataCont
StringProperty m_metaDataCont
MetaDataContainer, POOL container name for MetaData.
Definition: MetaDataSvc.h:336
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
JetTagCalibConfig.className
string className
Definition: JetTagCalibConfig.py:31
DataHeaderElement
This class provides a persistent form for the TransientAddress.
Definition: DataHeader.h:36
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MetaDataSvc::m_outputPrepared
bool m_outputPrepared
Definition: MetaDataSvc.h:324
ILockableTool::unlock_shared
virtual void unlock_shared() const =0
Unlock the tool.
MetaDataSvc::newMetadataSource
virtual StatusCode newMetadataSource(const Incident &)
Fills the input metadata store with the content of the new input file.
Definition: MetaDataSvc.cxx:238
DataHeader
This class provides the layout for summary information stored for data written to POOL.
Definition: DataHeader.h:124
MetaDataSvc::m_addrCrtr
ServiceHandle< IAddressCreator > m_addrCrtr
Definition: MetaDataSvc.h:314
MetaDataSvc::initInputMetaDataStore
StatusCode initInputMetaDataStore(const std::string &fileName)
Initialize input metadata store - can be called directly or via BeginInputFile incident.
Definition: MetaDataSvc.cxx:565
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MetaDataSvc::m_outputDataStore
ServiceHandle< StoreGateSvc > m_outputDataStore
Definition: MetaDataSvc.h:313
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
SG::VersionedKey
a StoreGateSvc key with a version number. Notice that StoreGate does not order multiple instances of ...
Definition: SGVersionedKey.h:31
MetaDataSvc::m_allowMetaDataStop
bool m_allowMetaDataStop
Definition: MetaDataSvc.h:323
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
MetaDataSvc::m_streamKeys
std::map< std::string, std::set< std::string > > m_streamKeys
Definition: MetaDataSvc.h:332
ILockableTool
Provide an interface for locking and unlocking a tool externally.
Definition: ILockableTool.h:25
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MetaDataSvc::m_fileMgr
ServiceHandle< IFileMgr > m_fileMgr
Definition: MetaDataSvc.h:315
MetaDataSvc::retireMetadataSource
virtual StatusCode retireMetadataSource(const Incident &)
Allows metadata tools to act before an input file is closed.
Definition: MetaDataSvc.cxx:272
StoreID::METADATA_STORE
@ METADATA_STORE
Definition: StoreID.h:29
plotmaker.keyName
keyName
Definition: plotmaker.py:145
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
pool_uuid.guid
guid
Definition: pool_uuid.py:112
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
MetaDataSvc::m_incSvc
ServiceHandle< IIncidentSvc > m_incSvc
Definition: MetaDataSvc.h:316
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
MakeNewFileFromOldAndSubstitution.newName
dictionary newName
Definition: ICHEP2016/MakeNewFileFromOldAndSubstitution.py:95
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
jobOptions.epos
epos
Definition: jobOptions.crmc.py:50
MetaDataSvc::rootOpenAction
StatusCode rootOpenAction(FILEMGR_CALLBACK_ARGS)
Definition: MetaDataSvc.cxx:428
MetaDataSvc::m_persToClid
std::map< std::string, CLID > m_persToClid
Definition: MetaDataSvc.h:325
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
AthCnvSvc::disconnectOutput
virtual StatusCode disconnectOutput(const std::string &output)
Disconnect output files from the service.
Definition: AthCnvSvc.cxx:437
SG::ObjectWithVersion
associate a data object with its VersionedKey The object is held by a ReadHandle to delay its retriev...
Definition: SGVersionedKey.h:17
MetaDataSvc::m_streamInKeyMark
const std::string m_streamInKeyMark
marker string for embedding stream name in MetaData object keys for SharedWriter server
Definition: MetaDataSvc.h:330
python.PyAthena.obj
obj
Definition: PyAthena.py:135
SG::DataProxy
Definition: DataProxy.h:44
MetaDataSvc::m_toolForClid
std::map< CLID, std::string > m_toolForClid
Definition: MetaDataSvc.h:326
AthCnvSvc::repSvcType
virtual long repSvcType() const
Retrieve the class type of the data store the converter uses.
Definition: AthCnvSvc.cxx:172
AthCnvSvc
Definition: AthCnvSvc.h:67
MetaDataSvc::loadAddresses
StatusCode loadAddresses(StoreID::type storeID, IAddressProvider::tadList &tads) override
loads addresses of versioned metadata object.
Definition: MetaDataSvc.cxx:206
MetaDataSvc::m_classIDSvc
ServiceHandle< IClassIDSvc > m_classIDSvc
Definition: MetaDataSvc.h:318
python.trfValidateRootFile.rc
rc
Definition: trfValidateRootFile.py:350
ServiceHandle< IAddressCreator >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
MetaDataSvc::m_handledClasses
std::set< CLID > m_handledClasses
Definition: MetaDataSvc.h:328
MetaDataSvc::m_outSeqSvc
ServiceHandle< OutputStreamSequencerSvc > m_outSeqSvc
Definition: MetaDataSvc.h:317