ATLAS Offline Software
List of all members
xAODMaker::FileMetaDataCreatorTool Class Reference

Tool creating xAOD::FileMetaData information. More...

#include <FileMetaDataCreatorTool.h>

Inheritance diagram for xAODMaker::FileMetaDataCreatorTool:
Collaboration diagram for xAODMaker::FileMetaDataCreatorTool:

Public Member Functions

AlgTool Methods
StatusCode initialize () override
 
StatusCode finalize () override
 Called at the end of AthenaOutputStream::finalize() (via release()). More...
 
Methods inherited by IAthenaOutputTool

Called at the end of AthenaOutputStream::initialize().

StatusCode postInitialize () override
 
StatusCode preExecute () override
 Called at the beginning of AthenaOutputStream::execute(). More...
 
StatusCode preStream () override
 Called before actually streaming objects. More...
 
StatusCode postExecute () override
 Fill the FileMetaData with event information. More...
 
StatusCode preFinalize () override
 Write the FileMetaData object to the MetaDataStore via the MetaDataSvc. More...
 

IIncidentListener methods

Gaudi::Property< std::string > m_key
 output key for produced xAOD::FileMetaData in MetaDataStore More...
 
Gaudi::Property< std::string > m_tagInfoKey
 Read tag information. More...
 
Gaudi::Property< std::string > m_simInfoKey
 Read simulation parameters. More...
 
Gaudi::Property< std::string > m_eventInfoKey
 Key for xAOD::EventInfo to update MC channel number. More...
 
Gaudi::Property< std::string > m_dataHeaderKey
 Key for DataHeader in StoreGateSvc. More...
 
ServiceHandle< StoreGateSvcm_eventStore {"StoreGateSvc", name()}
 DataHeader is produced by another OutputTool, so need StoreGateSvc. More...
 
ServiceHandle< IAthMetaDataSvcm_metaDataSvc {"MetaDataSvc", name()}
 Use MetaDataSvc store interface to support output in EventService. More...
 
ServiceHandle< StoreGateSvcm_inputMetaDataStore
 Access to the input metadata store. More...
 
ServiceHandle< ITagInfoMgrm_tagInfoMgr
 Access to TagInfoMgr for tags. More...
 
std::unique_ptr< xAOD::FileMetaDatam_info
 The object created for this output stream. More...
 
std::unique_ptr< xAOD::FileMetaDataAuxInfom_aux
 The auxiliary containing the created object. More...
 
bool m_filledNonEvent {false}
 FileMetaData has been filled with non-event info. More...
 
bool m_filledEvent {false}
 FileMetaData has been filled with event information. More...
 
std::mutex m_toolMutex
 creation of FileMetaData should happen on a single thread More...
 
void handle (const Incident &) override
 Handle BeginInputFile incident after MetaDataSvc. More...
 
StatusCode updateFromNonEvent ()
 Update from Simulation Parameters and TagInfo. More...
 
void set (const xAOD::FileMetaData::MetaDataType, bool)
 helper method to update FileMetaDataProperty with some checks More...
 
void set (const xAOD::FileMetaData::MetaDataType, uint32_t)
 
void set (const xAOD::FileMetaData::MetaDataType, float)
 
void set (const xAOD::FileMetaData::MetaDataType, const std::string &)
 
void addUniqueValue (const std::string &type, uint32_t value)
 helper function to add values to lists More...
 

Detailed Description

Tool creating xAOD::FileMetaData information.

This Athena-only tool can be used to create xAOD::FileMetaData information out of the non-ROOT-readable metadata available in the input. The FileMetaDataTool may have copied a xAOD::FileMetaData object to the MetaDataStore. If such a xAOD::FileMetaData object is found it is updated to reflect the current data type and MC channel number.

Author
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
Frank Berghaus fberg.nosp@m.haus.nosp@m.@anl..nosp@m.gov

Definition at line 44 of file FileMetaDataCreatorTool.h.

Member Function Documentation

◆ addUniqueValue()

void xAODMaker::FileMetaDataCreatorTool::addUniqueValue ( const std::string &  type,
uint32_t  value 
)
private

helper function to add values to lists

Definition at line 407 of file FileMetaDataCreatorTool.cxx.

408  {
409  try {
410  std::vector<uint32_t> list;
411  if (m_info->value(type, list)) {
412  ATH_MSG_DEBUG("retrieved existing list of " << type);
413  } else {
414  ATH_MSG_DEBUG("adding new list for " << type);
415  }
416  // we want a sorted list of unique values (without using std::set)
417  std::sort(list.begin(), list.end());
418  auto it = std::lower_bound(list.begin(), list.end(), value);
419  if (it == list.end() || (*it) != value) {
420  list.insert(it, value);
421  ATH_MSG_DEBUG("added " << value << " to list of " << type);
422  }
423  if (!m_info->setValue(type, list)) {
424  ATH_MSG_WARNING("error updating list for " + type);
425  }
426  } catch (std::exception& e) {
427  // Processing generated events not data
428  ATH_MSG_WARNING(e.what());
429  }
430 }

◆ finalize()

StatusCode xAODMaker::FileMetaDataCreatorTool::finalize ( )
override

Called at the end of AthenaOutputStream::finalize() (via release()).

Definition at line 141 of file FileMetaDataCreatorTool.cxx.

141  {
142  return StatusCode::SUCCESS;
143  }

◆ handle()

void xAODMaker::FileMetaDataCreatorTool::handle ( const Incident &  inc)
override

Handle BeginInputFile incident after MetaDataSvc.

Calls updateFromNonEvent on BeginInputFile

Definition at line 62 of file FileMetaDataCreatorTool.cxx.

62  {
63  // gracefully ignore unexpected incident types
64  if (inc.type() == "EndInputFile") {
65  // Lock the tool while we work on the FileMetaData
66  std::lock_guard lock(m_toolMutex);
67  if (!updateFromNonEvent().isSuccess())
68  ATH_MSG_DEBUG("Failed to fill FileMetaData with non-event info");
69  }
70  }

◆ initialize()

StatusCode xAODMaker::FileMetaDataCreatorTool::initialize ( )
override

Definition at line 28 of file FileMetaDataCreatorTool.cxx.

28  {
29  ATH_CHECK(m_eventStore.retrieve());
30  ATH_CHECK(m_metaDataSvc.retrieve());
31  ATH_CHECK(m_inputMetaDataStore.retrieve());
32  ATH_CHECK(m_tagInfoMgr.retrieve());
33 
34  // If DataHeader key not specified, try determining it
35  if (m_dataHeaderKey.empty()) {
36  const auto *parentAlg = dynamic_cast< const INamedInterface* >(parent());
37  if (parentAlg)
38  m_dataHeaderKey = parentAlg->name();
39  }
40 
41  // Listen for the begin of an input file. Act after MetaDataSvc (prio 80) and
42  // TagInfoMgr (prio 50). That means the FileMetaDataTool be called first
43  ServiceHandle< IIncidentSvc > incidentSvc("IncidentSvc", name());
44  ATH_CHECK(incidentSvc.retrieve());
45  incidentSvc->addListener(this, "EndInputFile", 40);
46 
47  // Create a fresh object to fill
48  ATH_MSG_DEBUG("Creating new xAOD::FileMetaData object to fill");
49  m_info = std::make_unique< xAOD::FileMetaData >();
50  m_aux = std::make_unique< xAOD::FileMetaDataAuxInfo >();
51  m_info->setStore(m_aux.get());
52 
53  // FileMetaData has no content
54  m_filledNonEvent = false;
55  m_filledEvent = false;
56 
57  // Return gracefully:
58  return StatusCode::SUCCESS;
59  }

◆ postExecute()

StatusCode xAODMaker::FileMetaDataCreatorTool::postExecute ( )
override

Fill the FileMetaData with event information.

Use information from xAOD::EventInfo to fill xAOD::FileMetaData::mcProcID and DataHeader to set xAOD::FileMetaData::dataType

Definition at line 146 of file FileMetaDataCreatorTool.cxx.

146  {
147  // Lock the tool while working with FileMetaData
148  std::lock_guard lock(m_toolMutex);
149 
150  // Fill information from TagInfo and Simulation Parameters
151  if (!updateFromNonEvent().isSuccess())
152  ATH_MSG_DEBUG("Failed to fill FileMetaData with non-event info");
153 
154  // Sanity check
155  if (!(m_info && m_aux)) {
156  ATH_MSG_DEBUG("No xAOD::FileMetaData object to fill");
157  return StatusCode::SUCCESS;
158  }
159 
160  { // MC channel, run and/or lumi block numbers
161  const xAOD::EventInfo* eventInfo = nullptr;
162  StatusCode sc = StatusCode::FAILURE;
163 
164  if (m_eventStore->contains< xAOD::EventInfo >(m_eventInfoKey))
165  sc = m_eventStore->retrieve(eventInfo, m_eventInfoKey);
166  else if (m_eventStore->contains< xAOD::EventInfo >("Mc" + m_eventInfoKey))
167  sc = m_eventStore->retrieve(eventInfo, "Mc" + m_eventInfoKey);
168 
169  if (eventInfo && sc.isSuccess()) {
170  addUniqueValue("runNumbers", eventInfo->runNumber());
171  addUniqueValue("lumiBlocks", eventInfo->lumiBlock());
172  // Return if object has already been filled
173  if (m_filledEvent) return StatusCode::SUCCESS;
174 
175  try {
176  ATH_MSG_DEBUG("Retrieved " << m_eventInfoKey);
177 
179  const float id = static_cast< float >(eventInfo->mcChannelNumber());
180 
181  if (m_info->setValue(type, id))
182  ATH_MSG_DEBUG("setting " << type << " to " << id);
183  else
184  ATH_MSG_DEBUG("error setting " << type << " to " << id);
185  } catch (std::exception&) {
186  // Processing data not generated events
187  ATH_MSG_DEBUG("Failed to set " << xAOD::FileMetaData::mcProcID);
188  }
189  } else {
191  "Failed to retrieve " << m_eventInfoKey << " => cannot set "
193  << ", runNumbers, or lumiBlockNumbers");
194  }
195  }
196 
197  m_filledEvent = true;
198 
199  return StatusCode::SUCCESS;
200  }

◆ postInitialize()

StatusCode xAODMaker::FileMetaDataCreatorTool::postInitialize ( )
override

Definition at line 73 of file FileMetaDataCreatorTool.cxx.

73  {
74  return StatusCode::SUCCESS;
75  }

◆ preExecute()

StatusCode xAODMaker::FileMetaDataCreatorTool::preExecute ( )
override

Called at the beginning of AthenaOutputStream::execute().

Definition at line 78 of file FileMetaDataCreatorTool.cxx.

78  {
79  return StatusCode::SUCCESS;
80  }

◆ preFinalize()

StatusCode xAODMaker::FileMetaDataCreatorTool::preFinalize ( )
override

Write the FileMetaData object to the MetaDataStore via the MetaDataSvc.

Definition at line 88 of file FileMetaDataCreatorTool.cxx.

88  {
89  std::lock_guard lock(m_toolMutex);
90 
91  if (!m_filledNonEvent) {
92  ATH_MSG_DEBUG("Not writing empty or incomplete FileMetaData object");
93  return StatusCode::SUCCESS;
94  }
95 
96  // Set metadata with content created for given stream
97  for (const std::string& key : m_metaDataSvc->getPerStreamKeysFor(m_key)) {
98  // Remove any existing objects with this key
99  if (!m_metaDataSvc->contains<xAOD::FileMetaData>(key)) {
100  auto info = std::make_unique<xAOD::FileMetaData>();
101  auto aux = std::make_unique<xAOD::FileMetaDataAuxInfo>();
102  info->setStore(aux.get());
103  ATH_CHECK(m_metaDataSvc->record(std::move(info), key));
104  ATH_CHECK(m_metaDataSvc->record(std::move(aux), key + "Aux."));
105  }
106 
107  auto* output = m_metaDataSvc->tryRetrieve<xAOD::FileMetaData>(key);
108  if (output) {
109  // save event info that we've already had
110  float orig_mcProcID = -1;
111  std::vector<uint32_t> orig_runNumbers, orig_lumiBlocks;
112  if (!output->value(xAOD::FileMetaData::mcProcID, orig_mcProcID))
113  ATH_MSG_DEBUG("Could not get mcProcID");
114  if (!output->value("runNumbers", orig_runNumbers))
115  ATH_MSG_DEBUG("Could not get runNumbers");
116  if (!output->value("lumiBlocks", orig_lumiBlocks))
117  ATH_MSG_DEBUG("Could not get lumiBlocks");
118 
119  // Replace content in store with content created for this stream
120  *output = *m_info;
121  ATH_MSG_DEBUG("FileMetaData payload replaced in store with content created for this stream");
122  if (!m_filledEvent) {
123  // restore original event info if it was not filled for this stream
124  ATH_MSG_DEBUG("Event information was not filled, restoring what we had");
125  if (!output->setValue(xAOD::FileMetaData::mcProcID, orig_mcProcID))
126  ATH_MSG_DEBUG("Could not set " << xAOD::FileMetaData::mcProcID << " to " << orig_mcProcID);
127  if (!output->setValue("runNumbers", orig_runNumbers))
128  ATH_MSG_DEBUG("Could not restore runNumbers");
129  if (!output->setValue("lumiBlocks", orig_lumiBlocks))
130  ATH_MSG_DEBUG("Could not restore lumiBlocks");
131  }
132  } else {
133  ATH_MSG_DEBUG("cannot copy FileMetaData payload to output");
134  }
135  }
136 
137  return StatusCode::SUCCESS;
138 }

◆ preStream()

StatusCode xAODMaker::FileMetaDataCreatorTool::preStream ( )
override

Called before actually streaming objects.

Definition at line 83 of file FileMetaDataCreatorTool.cxx.

83  {
84  return StatusCode::SUCCESS;
85  }

◆ set() [1/4]

void xAODMaker::FileMetaDataCreatorTool::set ( const xAOD::FileMetaData::MetaDataType  key,
bool  value 
)
private

helper method to update FileMetaDataProperty with some checks

Definition at line 346 of file FileMetaDataCreatorTool.cxx.

348  {
349  try {
350  if (m_info->setValue(key, value))
351  ATH_MSG_DEBUG("setting " << key << " to " << value);
352  else
353  ATH_MSG_DEBUG("error setting " << key << " to " << std::boolalpha << value
354  << std::noboolalpha);
355  } catch (std::exception&) {
356  // Processing data not generated events
357  ATH_MSG_DEBUG("Failed to set " << key);
358  }
359  }

◆ set() [2/4]

void xAODMaker::FileMetaDataCreatorTool::set ( const xAOD::FileMetaData::MetaDataType  key,
const std::string &  value 
)
private

Definition at line 392 of file FileMetaDataCreatorTool.cxx.

394  {
395  if (value.empty()) return;
396  try {
397  if (m_info->setValue(key, value))
398  ATH_MSG_DEBUG("setting " << key << " to " << value);
399  else
400  ATH_MSG_DEBUG("error setting " << key << " to " << value);
401  } catch (std::exception&) {
402  // Processing data not generated events
403  ATH_MSG_DEBUG("Failed to set " << key);
404  }
405  }

◆ set() [3/4]

void xAODMaker::FileMetaDataCreatorTool::set ( const xAOD::FileMetaData::MetaDataType  key,
float  value 
)
private

Definition at line 377 of file FileMetaDataCreatorTool.cxx.

379  {
380  try {
381  if (m_info->setValue(key, value))
382  ATH_MSG_DEBUG("setting " << key << " to " << value);
383  else
384  ATH_MSG_DEBUG("error setting " << key << " to " << value);
385  } catch (std::exception&) {
386  // Processing data not generated events
387  ATH_MSG_DEBUG("Failed to set " << key);
388  }
389  }

◆ set() [4/4]

void xAODMaker::FileMetaDataCreatorTool::set ( const xAOD::FileMetaData::MetaDataType  key,
uint32_t  value 
)
private

Definition at line 362 of file FileMetaDataCreatorTool.cxx.

364  {
365  try {
366  if (m_info->setValue(key, value))
367  ATH_MSG_DEBUG("setting " << key << " to " << value);
368  else
369  ATH_MSG_DEBUG("error setting " << key << " to " << value);
370  } catch (std::exception&) {
371  // Processing data not generated events
372  ATH_MSG_DEBUG("Failed to set " << key);
373  }
374  }

◆ updateFromNonEvent()

StatusCode xAODMaker::FileMetaDataCreatorTool::updateFromNonEvent ( )
private

Update from Simulation Parameters and TagInfo.

Definition at line 203 of file FileMetaDataCreatorTool.cxx.

203  {
204 
205  // Have we already done this?
206  if (m_filledNonEvent) return StatusCode::SUCCESS;
207 
208  // Sanity check
209  if (!(m_info && m_aux)) {
210  ATH_MSG_DEBUG("No xAOD::FileMetaData object to fill");
211  return StatusCode::SUCCESS;
212  }
213 
215  m_tagInfoMgr->findTag("AtlasRelease"));
216 
217  set(xAOD::FileMetaData::amiTag, m_tagInfoMgr->findTag("AMITag"));
218 
220 
222  m_tagInfoMgr->findTag("IOVDbGlobalTag"));
223 
224  set(xAOD::FileMetaData::beamType, m_tagInfoMgr->findTag("beam_type"));
225 
226  set(xAOD::FileMetaData::mcCampaign, m_tagInfoMgr->findTag("mc_campaign"));
227 
228  set(xAOD::FileMetaData::generatorsInfo, m_tagInfoMgr->findTag("generators"));
229 
230  std::string beamEnergy = m_tagInfoMgr->findTag("beam_energy");
231  try {
233  std::stof(beamEnergy));
234  } catch (std::invalid_argument& e) {
235  ATH_MSG_DEBUG("beam energy \"" << beamEnergy << "\" tag could not be converted to float");
236  } catch (std::out_of_range& e) {
237  ATH_MSG_DEBUG("converted beam energy value (\"" << beamEnergy << "\") outside float range");
238  }
239 
240  std::string dataYear = m_tagInfoMgr->findTag("data_year");
241  if (!dataYear.empty()) {
242  try {
244  static_cast<uint32_t>(std::stoul(dataYear)));
245  } catch (std::invalid_argument& e) {
246  ATH_MSG_DEBUG("data year \"" << dataYear << "\" tag could not be converted to unsigned long");
247  } catch (std::out_of_range& e) {
248  ATH_MSG_DEBUG("converted data year value (\"" << dataYear << "\") outside unsigned long range");
249  }
250  }
251 
252  // Read simulation parameters
253  const IOVMetaDataContainer * simInfo = nullptr;
254  StatusCode sc = StatusCode::FAILURE;
256  sc = m_inputMetaDataStore->retrieve(simInfo, m_simInfoKey);
257  const coral::AttributeList * attrList = nullptr;
258  if (simInfo && sc.isSuccess())
259  for (const CondAttrListCollection* payload : *simInfo->payloadContainer())
260  for (const auto& itr : *payload)
261  attrList = &(itr.second);
262  if (attrList) {
263  { // set simulation flavor
264  std::string key = "SimulationFlavour";
265  std::string value = "none";
266  if (attrList->exists(key))
267  value = (*attrList)[key].data< std::string >();
268 
269  // remap simulation flavor "default" to "FullSim"
270  if (value == "default")
271  value = "FullSim";
272 
274  }
275 
276  { // set whether this is overlay
277  std::string key = "IsEventOverlayInputSim";
278  std::string attr = "False";
279  if (attrList->exists(key))
280  attr = (*attrList)[key].data< std::string >();
281  set(xAOD::FileMetaData::isDataOverlay, attr == "True");
282  }
283 
284  } else {
286  "Failed to retrieve " << m_simInfoKey << " => cannot set: "
287  << xAOD::FileMetaData::simFlavour << ", and "
289  << ". Trying to get them from input metadata store." );
290 
291  for (const std::string& key : m_metaDataSvc->getPerStreamKeysFor(m_key)) {
292  const xAOD::FileMetaData* input = nullptr;
293  input = m_inputMetaDataStore->tryConstRetrieve< xAOD::FileMetaData >(key);
294  if (input) {
295  std::string orig_simFlavour = "none";
296  if (!input->value(xAOD::FileMetaData::simFlavour, orig_simFlavour)) {
298  "Could not get xAOD::FileMetaData::simFlavour "
299  "from input metadata "
300  "store");
301  } else {
302  ATH_MSG_DEBUG("Retrieved from input metadata store: "
304  << orig_simFlavour);
305  set(xAOD::FileMetaData::simFlavour, orig_simFlavour);
306  }
307 
308  bool orig_isDataOverlay = false;
309  if (!input->value(xAOD::FileMetaData::isDataOverlay, orig_isDataOverlay)) {
311  "Could not get "
312  "xAOD::FileMetaData::isDataOverlay from input "
313  "metadata store");
314  } else {
315  ATH_MSG_DEBUG("Retrieved from input metadata store: "
317  << orig_isDataOverlay);
318  set(xAOD::FileMetaData::isDataOverlay, orig_isDataOverlay);
319  }
320  }
321  }
322  }
323 
324  if (m_filledNonEvent) return StatusCode::SUCCESS;
325 
326  { // get dataType
328  try {
329  if (m_info->setValue(type, m_dataHeaderKey.value()))
330  ATH_MSG_DEBUG("set " << type << " to " << m_dataHeaderKey.value());
331  else
332  ATH_MSG_DEBUG("error setting " << type << " to " << m_dataHeaderKey.value());
333  } catch (std::exception&) {
334  // This is unexpected
335  ATH_MSG_DEBUG("Failed to set " << xAOD::FileMetaData::dataType);
336  }
337  }
338 
339  // FileMetaData object has been filled with non event info
340  m_filledNonEvent = true;
341 
342  return StatusCode::SUCCESS;
343  }

Member Data Documentation

◆ m_aux

std::unique_ptr< xAOD::FileMetaDataAuxInfo > xAODMaker::FileMetaDataCreatorTool::m_aux
private

The auxiliary containing the created object.

Definition at line 159 of file FileMetaDataCreatorTool.h.

◆ m_dataHeaderKey

Gaudi::Property< std::string > xAODMaker::FileMetaDataCreatorTool::m_dataHeaderKey
private
Initial value:
{
this,
"StreamName",
"",
"Key to read data header from event store"
}

Key for DataHeader in StoreGateSvc.

Definition at line 122 of file FileMetaDataCreatorTool.h.

◆ m_eventInfoKey

Gaudi::Property< std::string > xAODMaker::FileMetaDataCreatorTool::m_eventInfoKey
private
Initial value:
{
this,
"EventInfoKey",
"EventInfo",
"Key to read xAOD::EventInfo from EventStore"
}

Key for xAOD::EventInfo to update MC channel number.

Definition at line 114 of file FileMetaDataCreatorTool.h.

◆ m_eventStore

ServiceHandle< StoreGateSvc > xAODMaker::FileMetaDataCreatorTool::m_eventStore {"StoreGateSvc", name()}
private

DataHeader is produced by another OutputTool, so need StoreGateSvc.

Definition at line 130 of file FileMetaDataCreatorTool.h.

◆ m_filledEvent

bool xAODMaker::FileMetaDataCreatorTool::m_filledEvent {false}
private

FileMetaData has been filled with event information.

Definition at line 165 of file FileMetaDataCreatorTool.h.

◆ m_filledNonEvent

bool xAODMaker::FileMetaDataCreatorTool::m_filledNonEvent {false}
private

FileMetaData has been filled with non-event info.

Definition at line 162 of file FileMetaDataCreatorTool.h.

◆ m_info

std::unique_ptr< xAOD::FileMetaData > xAODMaker::FileMetaDataCreatorTool::m_info
private

The object created for this output stream.

Definition at line 156 of file FileMetaDataCreatorTool.h.

◆ m_inputMetaDataStore

ServiceHandle< StoreGateSvc > xAODMaker::FileMetaDataCreatorTool::m_inputMetaDataStore
private
Initial value:
{
"InputMetaDataStore", name()}

Access to the input metadata store.

Definition at line 136 of file FileMetaDataCreatorTool.h.

◆ m_key

Gaudi::Property< std::string > xAODMaker::FileMetaDataCreatorTool::m_key
private
Initial value:
{
this,
"OutputKey",
"FileMetaData",
"Key used to write FileMetaData into MetaDataStore"
}

output key for produced xAOD::FileMetaData in MetaDataStore

Definition at line 90 of file FileMetaDataCreatorTool.h.

◆ m_metaDataSvc

ServiceHandle< IAthMetaDataSvc > xAODMaker::FileMetaDataCreatorTool::m_metaDataSvc {"MetaDataSvc", name()}
private

Use MetaDataSvc store interface to support output in EventService.

Definition at line 133 of file FileMetaDataCreatorTool.h.

◆ m_simInfoKey

Gaudi::Property< std::string > xAODMaker::FileMetaDataCreatorTool::m_simInfoKey
private
Initial value:
{
this,
"SimInfoKey",
"/Simulation/Parameters",
"Key to look up simulation parameters from InputMetaDataStore"
}

Read simulation parameters.

Definition at line 106 of file FileMetaDataCreatorTool.h.

◆ m_tagInfoKey

Gaudi::Property< std::string > xAODMaker::FileMetaDataCreatorTool::m_tagInfoKey
private
Initial value:
{
this,
"TagInfoKey",
"/TagInfo",
"Key to look up tags from InputMetaDataStore"
}

Read tag information.

Definition at line 98 of file FileMetaDataCreatorTool.h.

◆ m_tagInfoMgr

ServiceHandle< ITagInfoMgr > xAODMaker::FileMetaDataCreatorTool::m_tagInfoMgr
private
Initial value:
{
"TagInfoMgr", name()}

Access to TagInfoMgr for tags.

Definition at line 140 of file FileMetaDataCreatorTool.h.

◆ m_toolMutex

std::mutex xAODMaker::FileMetaDataCreatorTool::m_toolMutex
private

creation of FileMetaData should happen on a single thread

Definition at line 168 of file FileMetaDataCreatorTool.h.


The documentation for this class was generated from the following files:
grepfile.info
info
Definition: grepfile.py:38
IOVMetaDataContainer::payloadContainer
const IOVPayloadContainer * payloadContainer() const
Access to payload container.
Definition: IOVMetaDataContainer.h:141
xAODMaker::FileMetaDataCreatorTool::m_toolMutex
std::mutex m_toolMutex
creation of FileMetaData should happen on a single thread
Definition: FileMetaDataCreatorTool.h:168
xAODMaker::FileMetaDataCreatorTool::m_eventStore
ServiceHandle< StoreGateSvc > m_eventStore
DataHeader is produced by another OutputTool, so need StoreGateSvc.
Definition: FileMetaDataCreatorTool.h:130
xAODMaker::FileMetaDataCreatorTool::m_aux
std::unique_ptr< xAOD::FileMetaDataAuxInfo > m_aux
The auxiliary containing the created object.
Definition: FileMetaDataCreatorTool.h:159
IOVMetaDataContainer
This class is a container for conditions data. It is intended to be used to store conditions data fro...
Definition: IOVMetaDataContainer.h:37
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
xAODMaker::FileMetaDataCreatorTool::m_key
Gaudi::Property< std::string > m_key
output key for produced xAOD::FileMetaData in MetaDataStore
Definition: FileMetaDataCreatorTool.h:90
skel.it
it
Definition: skel.GENtoEVGEN.py:423
athena.value
value
Definition: athena.py:122
xAOD::FileMetaData_v1::beamEnergy
@ beamEnergy
Beam energy [float].
Definition: FileMetaData_v1.h:70
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
xAODMaker::FileMetaDataCreatorTool::m_simInfoKey
Gaudi::Property< std::string > m_simInfoKey
Read simulation parameters.
Definition: FileMetaDataCreatorTool.h:106
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
xAODMaker::FileMetaDataCreatorTool::m_info
std::unique_ptr< xAOD::FileMetaData > m_info
The object created for this output stream.
Definition: FileMetaDataCreatorTool.h:156
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
xAOD::FileMetaData_v1::simFlavour
@ simFlavour
Fast or Full sim [string].
Definition: FileMetaData_v1.h:76
xAOD::EventInfo_v1::mcChannelNumber
uint32_t mcChannelNumber() const
The MC generator's channel number.
xAODMaker::FileMetaDataCreatorTool::m_eventInfoKey
Gaudi::Property< std::string > m_eventInfoKey
Key for xAOD::EventInfo to update MC channel number.
Definition: FileMetaDataCreatorTool.h:114
xAOD::FileMetaData_v1::mcCampaign
@ mcCampaign
MC campaign [string].
Definition: FileMetaData_v1.h:80
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAODMaker::FileMetaDataCreatorTool::updateFromNonEvent
StatusCode updateFromNonEvent()
Update from Simulation Parameters and TagInfo.
Definition: FileMetaDataCreatorTool.cxx:203
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
xAODMaker::FileMetaDataCreatorTool::m_inputMetaDataStore
ServiceHandle< StoreGateSvc > m_inputMetaDataStore
Access to the input metadata store.
Definition: FileMetaDataCreatorTool.h:136
calibdata.exception
exception
Definition: calibdata.py:496
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAODMaker::FileMetaDataCreatorTool::m_metaDataSvc
ServiceHandle< IAthMetaDataSvc > m_metaDataSvc
Use MetaDataSvc store interface to support output in EventService.
Definition: FileMetaDataCreatorTool.h:133
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
xAOD::FileMetaData_v1::mcProcID
@ mcProcID
Same as mc_channel_number [float].
Definition: FileMetaData_v1.h:74
xAOD::FileMetaData_v1::MetaDataType
MetaDataType
Pre-defined metadata value types.
Definition: FileMetaData_v1.h:54
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
xAOD::FileMetaData_v1
Class holding file-level metadata about an xAOD file.
Definition: FileMetaData_v1.h:34
xAODMaker::FileMetaDataCreatorTool::m_dataHeaderKey
Gaudi::Property< std::string > m_dataHeaderKey
Key for DataHeader in StoreGateSvc.
Definition: FileMetaDataCreatorTool.h:122
merge.output
output
Definition: merge.py:17
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
xAOD::FileMetaData_v1::amiTag
@ amiTag
AMI tag used to process the file the last time [string].
Definition: FileMetaData_v1.h:58
RunTileTBMonitoring.beamEnergy
beamEnergy
Definition: RunTileTBMonitoring.py:248
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
xAOD::FileMetaData_v1::geometryVersion
@ geometryVersion
Geometry version [string].
Definition: FileMetaData_v1.h:66
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
xAODMaker::FileMetaDataCreatorTool::m_filledNonEvent
bool m_filledNonEvent
FileMetaData has been filled with non-event info.
Definition: FileMetaDataCreatorTool.h:162
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAOD::FileMetaData_v1::generatorsInfo
@ generatorsInfo
Generators information [string].
Definition: FileMetaData_v1.h:82
xAOD::FileMetaData_v1::beamType
@ beamType
Beam type [string].
Definition: FileMetaData_v1.h:72
xAOD::FileMetaData_v1::dataYear
@ dataYear
Data year [uint32_t].
Definition: FileMetaData_v1.h:84
xAODMaker::FileMetaDataCreatorTool::m_tagInfoMgr
ServiceHandle< ITagInfoMgr > m_tagInfoMgr
Access to TagInfoMgr for tags.
Definition: FileMetaDataCreatorTool.h:140
xAOD::FileMetaData_v1::isDataOverlay
@ isDataOverlay
Used data overlay for backgrounds [bool].
Definition: FileMetaData_v1.h:78
xAOD::FileMetaData_v1::conditionsTag
@ conditionsTag
Conditions version used for simulation/reconstruction [string].
Definition: FileMetaData_v1.h:68
xAOD::FileMetaData_v1::dataType
@ dataType
Data type that's in the file [string].
Definition: FileMetaData_v1.h:64
xAOD::FileMetaData_v1::productionRelease
@ productionRelease
Release that was used to make the file [string].
Definition: FileMetaData_v1.h:56
xAODMaker::FileMetaDataCreatorTool::m_filledEvent
bool m_filledEvent
FileMetaData has been filled with event information.
Definition: FileMetaDataCreatorTool.h:165
xAODMaker::FileMetaDataCreatorTool::set
void set(const xAOD::FileMetaData::MetaDataType, bool)
helper method to update FileMetaDataProperty with some checks
Definition: FileMetaDataCreatorTool.cxx:346
ServiceHandle< IIncidentSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
xAODMaker::FileMetaDataCreatorTool::addUniqueValue
void addUniqueValue(const std::string &type, uint32_t value)
helper function to add values to lists
Definition: FileMetaDataCreatorTool.cxx:407