ATLAS Offline Software
LBMetadataTool.cxx
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id$
16 #include "LBMetadataTool.h"
19 #include "TString.h"
20 
21 namespace D3PD {
22 
23 
31  const std::string& name,
32  const IInterface* parent)
33  : base_class (type, name, parent)
34 {
35  declareProperty ("Metakey", m_metakey = "Lumi",
36  "Key for output metadata.");
37 }
38 
39 
44 {
45  return AthAlgTool::initialize();
46 }
47 
48 
54 {
55  TString xml;
56  ATH_MSG_WARNING( "Luminosity metadata not added correctly to the D3PD!" );
57  CHECK( d3pd->addMetadata (m_metakey, &xml) );
58  return StatusCode::SUCCESS;
59 }
60 
61 
62 } // namespace D3PD
D3PD::LBMetadataTool::initialize
virtual StatusCode initialize() override
Standard Gaudi initialize method.
Definition: LBMetadataTool.cxx:43
D3PD::ID3PD::addMetadata
virtual StatusCode addMetadata(const std::string &key, const void *obj, const std::type_info &ti)=0
Add a new piece of metadata to the tuple.
D3PD::ID3PD
Define an abstract interface for building a D3PD tree.
Definition: ID3PD.h:37
initialize
void initialize()
Definition: run_EoverP.cxx:894
ExtractEBRunDetails.xml
xml
Definition: ExtractEBRunDetails.py:239
D3PD
Block filler tool for noisy FEB information.
Definition: CaloCellDetailsFillerTool.cxx:29
D3PD::LBMetadataTool::writeMetadata
virtual StatusCode writeMetadata(ID3PD *d3pd) override
Write metadata to a D3PD.
Definition: LBMetadataTool.cxx:53
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
errorcheck.h
Helpers for checking error return status codes and reporting errors.
D3PD::LBMetadataTool::m_metakey
std::string m_metakey
Key for output metadata.
Definition: LBMetadataTool.h:57
LBMetadataTool.h
Add luminosity metadata info to a D3PD.
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ID3PD.h
Abstract interface for a D3PD tree.
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
D3PD::LBMetadataTool::LBMetadataTool
LBMetadataTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition: LBMetadataTool.cxx:30