Skip to content
Snippets Groups Projects

Event format meta data

Merged Frank Berghaus requested to merge berghaus/athena:EventFormatMetaData into master
1 file
+ 4
10
Compare changes
  • Side-by-side
  • Inline
  • The MetaDataSvc calls MetaDataStop to prepare the MetaDataStore for the
    output stream. To make EventFormat available to the running job we write
    out the metadata on beginInputFile. To make sure all writing to the
    MetaDataStore is done before the output stream commences beginInputFile
    locks the tool and metaDataStop waits for that lock.
@@ -45,6 +45,9 @@ StatusCode
StatusCode
EventFormatMetaDataTool::beginInputFile() {
// lock the tool, so metaDataStop will wait for write to finish
std::lock_guard< std::mutex > guard(m_outputMutex);
// Create object to hold information from the new file
auto format = std::make_unique< xAOD::EventFormat >();
@@ -63,13 +66,7 @@ StatusCode
StatusCode
EventFormatMetaDataTool::metaDataStop() {
// StatusCode sc = writeMetaData();
// if( sc.isFailure() ) {
// REPORT_ERROR( sc )
// << "Failed to write metadata to the output store";
// throw std::runtime_error( "Failed write xAOD::EventFormat "
// "to the output" );
// }
// wait for threads currenly writing to finish
std::lock_guard< std::mutex > guard(m_outputMutex);
return StatusCode::SUCCESS;
@@ -133,7 +130,6 @@ StatusCode
// Record the event format metadata, if any was found in the
// processed input files.
std::lock_guard< std::mutex > guard(m_outputMutex);
ATH_MSG_DEBUG("Recording event format metadata");
ATH_CHECK(m_outputMetaStore->record(std::move(format), m_outputKey));
@@ -146,8 +142,6 @@ StatusCode
const std::unique_ptr< xAOD::EventFormat >& format) {
ATH_MSG_DEBUG("Updateing with EventFormat from new input file");
std::lock_guard< std::mutex > guard(m_outputMutex);
// Retrieve existing object from MetaDataStore
xAOD::EventFormat * output = nullptr;
ATH_CHECK(m_outputMetaStore->retrieve(output, m_outputKey));
Loading