ATLAS Offline Software
Loading...
Searching...
No Matches
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

Called by AthenaOutputStream::initialize() (via ToolSvc retrieve()).

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

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

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

IIncidentListener methods

Gaudi::Property< std::string > m_key
 output key for produced xAOD::FileMetaData in MetaDataStore
Gaudi::Property< std::string > m_tagInfoKey
 Read tag information.
Gaudi::Property< std::string > m_simInfoKey
 Read simulation parameters.
Gaudi::Property< std::string > m_eventInfoKey
 Key for xAOD::EventInfo to update MC channel number.
Gaudi::Property< std::string > m_dataHeaderKey
 Key for DataHeader in StoreGateSvc.
ServiceHandle< StoreGateSvc > m_eventStore {"StoreGateSvc", name()}
 DataHeader is produced by another OutputTool, so need StoreGateSvc.
ServiceHandle< IAthMetaDataSvc > m_metaDataSvc {"MetaDataSvc", name()}
 Use MetaDataSvc store interface to support output in EventService.
ServiceHandle< StoreGateSvc > m_inputMetaDataStore
 Access to the input metadata store.
ServiceHandle< StoreGateSvc > m_metaDataStore
ServiceHandle< ITagInfoMgr > m_tagInfoMgr
 Access to TagInfoMgr for tags.
std::unique_ptr< xAOD::FileMetaData > m_info
 The object created for this output stream.
std::unique_ptr< xAOD::FileMetaDataAuxInfo > m_aux
 The auxiliary containing the created object.
bool m_filledNonEvent {false}
 FileMetaData has been filled with non-event info.
bool m_filledEvent {false}
 FileMetaData has been filled with event information.
bool m_hasInputFile {false}
 Input file incident check.
std::mutex m_toolMutex
 creation of FileMetaData should happen on a single thread
void handle (const Incident &) override
 Handle BeginInputFile incident after MetaDataSvc.
StatusCode updateFromNonEvent ()
 Update from Simulation Parameters and TagInfo.
void set (const xAOD::FileMetaData::MetaDataType, bool)
 helper method to update FileMetaDataProperty with some checks
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

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 433 of file FileMetaDataCreatorTool.cxx.

434 {
435 try {
436 std::vector<uint32_t> list;
437 if (m_info->value(type, list)) {
438 ATH_MSG_DEBUG("retrieved existing list of " << type);
439 } else {
440 ATH_MSG_DEBUG("adding new list for " << type);
441 }
442 // we want a sorted list of unique values (without using std::set)
443 std::sort(list.begin(), list.end());
444 auto it = std::lower_bound(list.begin(), list.end(), value);
445 if (it == list.end() || (*it) != value) {
446 list.insert(it, value);
447 ATH_MSG_DEBUG("added " << value << " to list of " << type);
448 }
449 if (!m_info->setValue(type, list)) {
450 ATH_MSG_WARNING("error updating list for " + type);
451 }
452 } catch (std::exception& e) {
453 // Processing generated events not data
454 ATH_MSG_WARNING(e.what());
455 }
456}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_WARNING(x,...)
std::unique_ptr< xAOD::FileMetaData > m_info
The object created for this output stream.
list(name, path='/')
Definition histSizes.py:38
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ finalize()

StatusCode xAODMaker::FileMetaDataCreatorTool::finalize ( )
override

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

Definition at line 143 of file FileMetaDataCreatorTool.cxx.

143 {
144 return StatusCode::SUCCESS;
145 }

◆ handle()

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

Handle BeginInputFile incident after MetaDataSvc.

Calls updateFromNonEvent on BeginInputFile

Definition at line 63 of file FileMetaDataCreatorTool.cxx.

63 {
64 // gracefully ignore unexpected incident types
65 if (inc.type() == "EndInputFile") {
66 // Lock the tool while we work on the FileMetaData
67 std::lock_guard lock(m_toolMutex);
68 m_hasInputFile = true;
69 if (!updateFromNonEvent().isSuccess())
70 ATH_MSG_DEBUG("Failed to fill FileMetaData with non-event info");
71 }
72 }
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
StatusCode updateFromNonEvent()
Update from Simulation Parameters and TagInfo.
std::mutex m_toolMutex
creation of FileMetaData should happen on a single thread
bool m_hasInputFile
Input file incident check.

◆ 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());
32 ATH_CHECK(m_metaDataStore.retrieve());
33 ATH_CHECK(m_tagInfoMgr.retrieve());
34
35 // If DataHeader key not specified, try determining it
36 if (m_dataHeaderKey.empty()) {
37 const auto *parentAlg = dynamic_cast< const INamedInterface* >(parent());
38 if (parentAlg)
39 m_dataHeaderKey = parentAlg->name();
40 }
41
42 // Listen for the begin of an input file. Act after MetaDataSvc (prio 80) and
43 // TagInfoMgr (prio 50). That means the FileMetaDataTool be called first
44 ServiceHandle< IIncidentSvc > incidentSvc("IncidentSvc", name());
45 ATH_CHECK(incidentSvc.retrieve());
46 incidentSvc->addListener(this, "EndInputFile", 40);
47
48 // Create a fresh object to fill
49 ATH_MSG_DEBUG("Creating new xAOD::FileMetaData object to fill");
50 m_info = std::make_unique< xAOD::FileMetaData >();
51 m_aux = std::make_unique< xAOD::FileMetaDataAuxInfo >();
52 m_info->setStore(m_aux.get());
53
54 // FileMetaData has no content
55 m_filledNonEvent = false;
56 m_filledEvent = false;
57
58 // Return gracefully:
59 return StatusCode::SUCCESS;
60 }
#define ATH_CHECK
Evaluate an expression and check for errors.
ServiceHandle< ITagInfoMgr > m_tagInfoMgr
Access to TagInfoMgr for tags.
bool m_filledEvent
FileMetaData has been filled with event information.
ServiceHandle< IAthMetaDataSvc > m_metaDataSvc
Use MetaDataSvc store interface to support output in EventService.
ServiceHandle< StoreGateSvc > m_metaDataStore
ServiceHandle< StoreGateSvc > m_eventStore
DataHeader is produced by another OutputTool, so need StoreGateSvc.
ServiceHandle< StoreGateSvc > m_inputMetaDataStore
Access to the input metadata store.
bool m_filledNonEvent
FileMetaData has been filled with non-event info.
Gaudi::Property< std::string > m_dataHeaderKey
Key for DataHeader in StoreGateSvc.
std::unique_ptr< xAOD::FileMetaDataAuxInfo > m_aux
The auxiliary containing the created object.

◆ 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 148 of file FileMetaDataCreatorTool.cxx.

148 {
149 // Lock the tool while working with FileMetaData
150 std::lock_guard lock(m_toolMutex);
151
152 // Fill information from TagInfo and Simulation Parameters
153 if (!updateFromNonEvent().isSuccess())
154 ATH_MSG_DEBUG("Failed to fill FileMetaData with non-event info");
155
156 // Sanity check
157 if (!(m_info && m_aux)) {
158 ATH_MSG_DEBUG("No xAOD::FileMetaData object to fill");
159 return StatusCode::SUCCESS;
160 }
161
162 { // MC channel, run and/or lumi block numbers
163 const xAOD::EventInfo* eventInfo = nullptr;
164 StatusCode sc = StatusCode::FAILURE;
165
167 sc = m_eventStore->retrieve(eventInfo, m_eventInfoKey);
168 else if (m_eventStore->contains< xAOD::EventInfo >("Mc" + m_eventInfoKey))
169 sc = m_eventStore->retrieve(eventInfo, "Mc" + m_eventInfoKey);
170
171 if (eventInfo && sc.isSuccess()) {
172 addUniqueValue("runNumbers", eventInfo->runNumber());
173 addUniqueValue("lumiBlocks", eventInfo->lumiBlock());
174 // Return if object has already been filled
175 if (m_filledEvent) return StatusCode::SUCCESS;
176
177 try {
178 ATH_MSG_DEBUG("Retrieved " << m_eventInfoKey);
179
181 const float id = static_cast< float >(eventInfo->mcChannelNumber());
182
183 if (m_info->setValue(type, id))
184 ATH_MSG_DEBUG("setting " << type << " to " << id);
185 else
186 ATH_MSG_DEBUG("error setting " << type << " to " << id);
187 } catch (std::exception&) {
188 // Processing data not generated events
189 ATH_MSG_DEBUG("Failed to set " << xAOD::FileMetaData::mcProcID);
190 }
191 } else {
193 "Failed to retrieve " << m_eventInfoKey << " => cannot set "
195 << ", runNumbers, or lumiBlockNumbers");
196 }
197 }
198
199 m_filledEvent = true;
200
201 return StatusCode::SUCCESS;
202 }
static Double_t sc
void addUniqueValue(const std::string &type, uint32_t value)
helper function to add values to lists
Gaudi::Property< std::string > m_eventInfoKey
Key for xAOD::EventInfo to update MC channel number.
uint32_t lumiBlock() const
The current event's luminosity block number.
uint32_t runNumber() const
The current event's run number.
uint32_t mcChannelNumber() const
The MC generator's channel number.
MetaDataType
Pre-defined metadata value types.
@ mcProcID
Same as mc_channel_number [float].
::StatusCode StatusCode
StatusCode definition for legacy code.
EventInfo_v1 EventInfo
Definition of the latest event info version.

◆ postInitialize()

StatusCode xAODMaker::FileMetaDataCreatorTool::postInitialize ( )
override

Definition at line 75 of file FileMetaDataCreatorTool.cxx.

75 {
76 return StatusCode::SUCCESS;
77 }

◆ preExecute()

StatusCode xAODMaker::FileMetaDataCreatorTool::preExecute ( )
override

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

Definition at line 80 of file FileMetaDataCreatorTool.cxx.

80 {
81 return StatusCode::SUCCESS;
82 }

◆ preFinalize()

StatusCode xAODMaker::FileMetaDataCreatorTool::preFinalize ( )
override

Write the FileMetaData object to the MetaDataStore via the MetaDataSvc.

Definition at line 90 of file FileMetaDataCreatorTool.cxx.

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

◆ preStream()

StatusCode xAODMaker::FileMetaDataCreatorTool::preStream ( )
override

Called before actually streaming objects.

Definition at line 85 of file FileMetaDataCreatorTool.cxx.

85 {
86 return StatusCode::SUCCESS;
87 }

◆ 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 372 of file FileMetaDataCreatorTool.cxx.

374 {
375 try {
376 if (m_info->setValue(key, value))
377 ATH_MSG_DEBUG("setting " << key << " to " << value);
378 else
379 ATH_MSG_DEBUG("error setting " << key << " to " << std::boolalpha << value
380 << std::noboolalpha);
381 } catch (std::exception&) {
382 // Processing data not generated events
383 ATH_MSG_DEBUG("Failed to set " << key);
384 }
385 }

◆ set() [2/4]

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

Definition at line 418 of file FileMetaDataCreatorTool.cxx.

420 {
421 if (value.empty()) return;
422 try {
423 if (m_info->setValue(key, value))
424 ATH_MSG_DEBUG("setting " << key << " to " << value);
425 else
426 ATH_MSG_DEBUG("error setting " << key << " to " << value);
427 } catch (std::exception&) {
428 // Processing data not generated events
429 ATH_MSG_DEBUG("Failed to set " << key);
430 }
431 }

◆ set() [3/4]

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

Definition at line 403 of file FileMetaDataCreatorTool.cxx.

405 {
406 try {
407 if (m_info->setValue(key, value))
408 ATH_MSG_DEBUG("setting " << key << " to " << value);
409 else
410 ATH_MSG_DEBUG("error setting " << key << " to " << value);
411 } catch (std::exception&) {
412 // Processing data not generated events
413 ATH_MSG_DEBUG("Failed to set " << key);
414 }
415 }

◆ set() [4/4]

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

Definition at line 388 of file FileMetaDataCreatorTool.cxx.

390 {
391 try {
392 if (m_info->setValue(key, value))
393 ATH_MSG_DEBUG("setting " << key << " to " << value);
394 else
395 ATH_MSG_DEBUG("error setting " << key << " to " << value);
396 } catch (std::exception&) {
397 // Processing data not generated events
398 ATH_MSG_DEBUG("Failed to set " << key);
399 }
400 }

◆ updateFromNonEvent()

StatusCode xAODMaker::FileMetaDataCreatorTool::updateFromNonEvent ( )
private

Update from Simulation Parameters and TagInfo.

Definition at line 205 of file FileMetaDataCreatorTool.cxx.

205 {
206
207 // Have we already done this?
208 if (m_filledNonEvent) return StatusCode::SUCCESS;
209
210 // Sanity check
211 if (!(m_info && m_aux)) {
212 ATH_MSG_DEBUG("No xAOD::FileMetaData object to fill");
213 return StatusCode::SUCCESS;
214 }
215
216 if (m_hasInputFile && m_tagInfoMgr->getInputTags().empty()) {
217 ATH_MSG_DEBUG("Deferring non-event fill due to eventless-input");
218 return StatusCode::SUCCESS;
219 }
220
222 m_tagInfoMgr->findTag("AtlasRelease"));
223
225 m_tagInfoMgr->findTag("AODFixVersion"));
226
227 set(xAOD::FileMetaData::amiTag, m_tagInfoMgr->findTag("AMITag"));
228
230
232 m_tagInfoMgr->findTag("IOVDbGlobalTag"));
233
234 set(xAOD::FileMetaData::beamType, m_tagInfoMgr->findTag("beam_type"));
235
236 set(xAOD::FileMetaData::mcCampaign, m_tagInfoMgr->findTag("mc_campaign"));
237
238 set(xAOD::FileMetaData::generatorsInfo, m_tagInfoMgr->findTag("generators"));
239
240 std::string beamEnergy = m_tagInfoMgr->findTag("beam_energy");
241 try {
243 std::stof(beamEnergy));
244 } catch (std::invalid_argument& e) {
245 ATH_MSG_DEBUG("beam energy \"" << beamEnergy << "\" tag could not be converted to float");
246 } catch (std::out_of_range& e) {
247 ATH_MSG_DEBUG("converted beam energy value (\"" << beamEnergy << "\") outside float range");
248 }
249
250 std::string dataYear = m_tagInfoMgr->findTag("data_year");
251 if (!dataYear.empty()) {
252 try {
254 static_cast<uint32_t>(std::stoul(dataYear)));
255 } catch (std::invalid_argument& e) {
256 ATH_MSG_DEBUG("data year \"" << dataYear << "\" tag could not be converted to unsigned long");
257 } catch (std::out_of_range& e) {
258 ATH_MSG_DEBUG("converted data year value (\"" << dataYear << "\") outside unsigned long range");
259 }
260 }
261
262 // Read simulation parameters
263 const IOVMetaDataContainer * simInfo = nullptr;
264 StatusCode sc = StatusCode::FAILURE;
265 if (m_inputMetaDataStore->contains< IOVMetaDataContainer >(m_simInfoKey)) {
266 sc = m_inputMetaDataStore->retrieve(simInfo, m_simInfoKey);
267 } else if (m_metaDataStore->contains< IOVMetaDataContainer >(m_simInfoKey)) {
268 sc = m_metaDataStore->retrieve(simInfo, m_simInfoKey);
269 }
270 const coral::AttributeList * attrList = nullptr;
271 if (simInfo && sc.isSuccess()) {
272 for (const CondAttrListCollection* payload : *simInfo->payloadContainer()) {
273 for (const auto& itr : *payload) {
274 attrList = &(itr.second);
275 }
276 }
277 }
278
279 bool simFlavourSet{};
280 bool isDataOverlaySet{};
281 if (attrList) {
282 { // set simulation flavor
283 std::string key = "SimulationFlavour";
284 if (attrList->exists(key)) {
285 std::string value = (*attrList)[key].data< std::string >();
286
287 // remap simulation flavor "default" to "FullSim"
288 if (value == "default")
289 value = "FullSim";
290
292 simFlavourSet = true;
293 }
294 }
295
296 { // set whether this is overlay
297 std::string key = "IsDataOverlay";
298 if (attrList->exists(key)) {
299 std::string attr = (*attrList)[key].data< std::string >();
300 set(xAOD::FileMetaData::isDataOverlay, attr == "True");
301 isDataOverlaySet = true;
302 }
303 }
304 }
305
306 if (!simFlavourSet || !isDataOverlaySet) {
308 "Failed to set "
311 << ". Trying to get them from input metadata store." );
312
313 for (const std::string& key : m_metaDataSvc->getPerStreamKeysFor(m_key)) {
314 const xAOD::FileMetaData* input = nullptr;
315 input = m_inputMetaDataStore->tryConstRetrieve< xAOD::FileMetaData >(key);
316 if (input) {
317 if (!simFlavourSet) {
318 std::string orig_simFlavour = "none";
319 if (!input->value(xAOD::FileMetaData::simFlavour, orig_simFlavour)) {
321 "Could not get xAOD::FileMetaData::simFlavour "
322 "from input metadata "
323 "store");
324 } else {
325 ATH_MSG_DEBUG("Retrieved from input metadata store: "
327 << orig_simFlavour);
328 set(xAOD::FileMetaData::simFlavour, orig_simFlavour);
329 }
330 }
331
332 if (!isDataOverlaySet) {
333 bool orig_isDataOverlay = false;
334 if (!input->value(xAOD::FileMetaData::isDataOverlay, orig_isDataOverlay)) {
336 "Could not get "
337 "xAOD::FileMetaData::isDataOverlay from input "
338 "metadata store");
339 } else {
340 ATH_MSG_DEBUG("Retrieved from input metadata store: "
342 << orig_isDataOverlay);
343 set(xAOD::FileMetaData::isDataOverlay, orig_isDataOverlay);
344 }
345 }
346 }
347 }
348 }
349
350 if (m_filledNonEvent) return StatusCode::SUCCESS;
351
352 { // get dataType
354 try {
355 if (m_info->setValue(type, m_dataHeaderKey.value()))
356 ATH_MSG_DEBUG("set " << type << " to " << m_dataHeaderKey.value());
357 else
358 ATH_MSG_DEBUG("error setting " << type << " to " << m_dataHeaderKey.value());
359 } catch (std::exception&) {
360 // This is unexpected
361 ATH_MSG_DEBUG("Failed to set " << xAOD::FileMetaData::dataType);
362 }
363 }
364
365 // FileMetaData object has been filled with non event info
366 m_filledNonEvent = true;
367
368 return StatusCode::SUCCESS;
369 }
const IOVPayloadContainer * payloadContainer() const
Access to payload container.
void set(const xAOD::FileMetaData::MetaDataType, bool)
helper method to update FileMetaDataProperty with some checks
Gaudi::Property< std::string > m_simInfoKey
Read simulation parameters.
@ beamEnergy
Beam energy [float].
@ conditionsTag
Conditions version used for simulation/reconstruction [string].
@ dataType
Data type that's in the file [string].
@ generatorsInfo
Generators information [string].
@ AODFixVersion
Version of AODFix that was used on the file last [string].
@ mcCampaign
MC campaign [string].
@ amiTag
AMI tag used to process the file the last time [string].
@ dataYear
Data year [uint32_t].
@ beamType
Beam type [string].
@ simFlavour
Fast or Full sim [string].
@ productionRelease
Release that was used to make the file [string].
@ isDataOverlay
Used data overlay for backgrounds [bool].
@ geometryVersion
Geometry version [string].
setEventNumber uint32_t

Member Data Documentation

◆ m_aux

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

The auxiliary containing the created object.

Definition at line 162 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.

122 {
123 this,
124 "StreamName",
125 "",
126 "Key to read data header from event store"
127 };

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

114 {
115 this,
116 "EventInfoKey",
117 "EventInfo",
118 "Key to read xAOD::EventInfo from EventStore"
119 };

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

130{"StoreGateSvc", name()};

◆ m_filledEvent

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

FileMetaData has been filled with event information.

Definition at line 168 of file FileMetaDataCreatorTool.h.

168{false};

◆ m_filledNonEvent

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

FileMetaData has been filled with non-event info.

Definition at line 165 of file FileMetaDataCreatorTool.h.

165{false};

◆ m_hasInputFile

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

Input file incident check.

Definition at line 171 of file FileMetaDataCreatorTool.h.

171{false};

◆ m_info

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

The object created for this output stream.

Definition at line 159 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.

136 {
137 "InputMetaDataStore", name()};

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

90 {
91 this,
92 "OutputKey",
93 "FileMetaData",
94 "Key used to write FileMetaData into MetaDataStore"
95 };

◆ m_metaDataStore

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

Definition at line 139 of file FileMetaDataCreatorTool.h.

139 {
140 "MetaDataStore", name()};

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

133{"MetaDataSvc", name()};

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

106 {
107 this,
108 "SimInfoKey",
109 "/Simulation/Parameters",
110 "Key to look up simulation parameters from InputMetaDataStore"
111 };

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

98 {
99 this,
100 "TagInfoKey",
101 "/TagInfo",
102 "Key to look up tags from InputMetaDataStore"
103 };

◆ m_tagInfoMgr

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

Access to TagInfoMgr for tags.

Definition at line 143 of file FileMetaDataCreatorTool.h.

143 {
144 "TagInfoMgr", name()};

◆ m_toolMutex

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

creation of FileMetaData should happen on a single thread

Definition at line 174 of file FileMetaDataCreatorTool.h.


The documentation for this class was generated from the following files: