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-2017 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)
34 {
35  declareProperty ("Metakey", m_metakey = "Lumi",
36  "Key for output metadata.");
37 }
38 
39 
44 {
45  return AthAlgTool::initialize();
46 }
47 
48 
53 LBMetadataTool::queryInterface( const InterfaceID& riid, void** ppvIf )
54 {
55  if ( riid == IMetadataTool::interfaceID() ) {
56  *ppvIf = static_cast<IMetadataTool*> (this);
57  addRef();
58  return StatusCode::SUCCESS;
59  }
60 
61  return AlgTool::queryInterface( riid, ppvIf );
62 }
63 
64 
70 {
71  TString xml;
72  ATH_MSG_WARNING( "Luminosity metadata not added correctly to the D3PD!" );
73  CHECK( d3pd->addMetadata (m_metakey, &xml) );
74  return StatusCode::SUCCESS;
75 }
76 
77 
78 } // namespace D3PD
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
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
initialize
void initialize()
Definition: run_EoverP.cxx:894
D3PD::LBMetadataTool::writeMetadata
virtual StatusCode writeMetadata(ID3PD *d3pd)
Write metadata to a D3PD.
Definition: LBMetadataTool.cxx:69
ExtractEBRunDetails.xml
xml
Definition: ExtractEBRunDetails.py:239
D3PD
Block filler tool for noisy FEB information.
Definition: InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/TrigD3PD/ChainGroup.h:21
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:192
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:63
D3PD::IMetadataTool
Write metadata to a D3PD.
Definition: IMetadataTool.h:35
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::initialize
virtual StatusCode initialize()
Standard Gaudi initialize method.
Definition: LBMetadataTool.cxx:43
AthAlgTool
Definition: AthAlgTool.h:26
D3PD::LBMetadataTool::LBMetadataTool
LBMetadataTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition: LBMetadataTool.cxx:30
D3PD::LBMetadataTool::queryInterface
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvIf)
Standard Gaudi queryInterface method.
Definition: LBMetadataTool.cxx:53