|
ATLAS Offline Software
|
Go to the documentation of this file.
36 const auto *parentAlg =
dynamic_cast< const INamedInterface*
>(
parent());
45 incidentSvc->addListener(
this,
"EndInputFile", 40);
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 >();
58 return StatusCode::SUCCESS;
64 if (inc.type() ==
"EndInputFile") {
68 ATH_MSG_DEBUG(
"Failed to fill FileMetaData with non-event info");
74 return StatusCode::SUCCESS;
79 return StatusCode::SUCCESS;
84 return StatusCode::SUCCESS;
92 ATH_MSG_DEBUG(
"Not writing empty or incomplete FileMetaData object");
93 return StatusCode::SUCCESS;
100 auto info = std::make_unique<xAOD::FileMetaData>();
101 auto aux = std::make_unique<xAOD::FileMetaDataAuxInfo>();
102 info->setStore(aux.get());
110 float orig_mcProcID = -1;
111 std::vector<uint32_t> orig_runNumbers, orig_lumiBlocks;
114 if (!
output->value(
"runNumbers", orig_runNumbers))
116 if (!
output->value(
"lumiBlocks", orig_lumiBlocks))
121 ATH_MSG_DEBUG(
"FileMetaData payload replaced in store with content created for this stream");
124 ATH_MSG_DEBUG(
"Event information was not filled, restoring what we had");
127 if (!
output->setValue(
"runNumbers", orig_runNumbers))
129 if (!
output->setValue(
"lumiBlocks", orig_lumiBlocks))
137 return StatusCode::SUCCESS;
142 return StatusCode::SUCCESS;
152 ATH_MSG_DEBUG(
"Failed to fill FileMetaData with non-event info");
157 return StatusCode::SUCCESS;
169 if (eventInfo &&
sc.isSuccess()) {
193 <<
", runNumbers, or lumiBlockNumbers");
199 return StatusCode::SUCCESS;
211 return StatusCode::SUCCESS;
234 }
catch (std::invalid_argument&
e) {
236 }
catch (std::out_of_range&
e) {
240 std::string dataYear =
m_tagInfoMgr->findTag(
"data_year");
241 if (!dataYear.empty()) {
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");
258 if (simInfo &&
sc.isSuccess())
260 for (
const auto& itr : *
payload)
261 attrList = &(itr.second);
264 std::string
key =
"SimulationFlavour";
265 std::string
value =
"none";
266 if (attrList->exists(
key))
267 value = (*attrList)[
key].data< std::string >();
270 if (
value ==
"default")
277 std::string
key =
"IsEventOverlayInputSim";
278 std::string attr =
"False";
279 if (attrList->exists(
key))
280 attr = (*attrList)[
key].data< std::string >();
286 "Failed to retrieve " <<
m_simInfoKey <<
" => cannot set: "
289 <<
". Trying to get them from input metadata store." );
295 std::string orig_simFlavour =
"none";
298 "Could not get xAOD::FileMetaData::simFlavour "
299 "from input metadata "
308 bool orig_isDataOverlay =
false;
312 "xAOD::FileMetaData::isDataOverlay from input "
317 << orig_isDataOverlay);
342 return StatusCode::SUCCESS;
354 << std::noboolalpha);
394 const std::string&
value) {
395 if (
value.empty())
return;
410 std::vector<uint32_t>
list;
417 std::sort(
list.begin(),
list.end());
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
This class is a collection of AttributeLists where each one is associated with a channel number....
uint32_t runNumber() const
The current event's run number.
uint32_t mcChannelNumber() const
The MC generator's channel number.
Handle class for recording to StoreGate.
::StatusCode StatusCode
StatusCode definition for legacy code.
uint32_t lumiBlock() const
The current event's luminosity block number.
Class describing the basic event information.
#define ATH_MSG_WARNING(x)
Handle class for reading from StoreGate.