ATLAS Offline Software
TrigBjetCnvAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: TrigBjetCnvAlg.cxx 619848 2014-10-03 13:59:50Z lidiaz $
6 
7 // Gaudi/Athena include(s):
9 
10 // EDM include(s):
15 
16 // Local include(s):
17 #include "TrigBjetCnvAlg.h"
18 
19 namespace xAODMaker {
20 
21  TrigBjetCnvAlg::TrigBjetCnvAlg( const std::string& name,
22  ISvcLocator* svcLoc )
23  : AthAlgorithm( name, svcLoc ),
24  m_cnvTool( "xAODMaker::TrigBjetCnvTool/TrigBjetCnvTool", this ) {
25 
26  // declareProperty( "AODKey", m_aodKey = "TrigEFBjetContainer" );
27  declareProperty( "AODKey", m_aodKey = "HLT_EFBjetFex" );
28  declareProperty( "xAODKey", m_xaodKey = "TrigBjet" ); // ? Lidija
29  declareProperty( "CnvTool", m_cnvTool );
30  }
31 
33 
34  // Greet the user:
35  ATH_MSG_INFO( "Initializing" );
36  ATH_MSG_DEBUG( " AOD Key: " << m_aodKey );
37  ATH_MSG_DEBUG( "xAOD Key: " << m_xaodKey );
38 
39  // Retrieve the converter tool:
40  CHECK( m_cnvTool.retrieve() );
41 
42  // Return gracefully:
43  return StatusCode::SUCCESS;
44  }
45 
47 
48  // Retrieve the AOD container:
49  const TrigEFBjetContainer* aod = nullptr;
50  CHECK( evtStore()->retrieve( aod, m_aodKey ) );
51 
52  // Create the xAOD container and its auxiliary store:
55  xaod->setStore( aux );
56 
57  // Fill the xAOD container:
58  CHECK( m_cnvTool->convert( aod, xaod ) );
59 
60  // Record the xAOD containers:
61  CHECK( evtStore()->record( aux, m_xaodKey + "Aux." ) );
62  CHECK( evtStore()->record( xaod, m_xaodKey ) );
63 
64  // Return gracefully:
65  return StatusCode::SUCCESS;
66  }
67 
68 } // namespace xAODMaker
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::BTaggingAuxContainer
BTaggingAuxContainer_v2 BTaggingAuxContainer
Definition of the current BTagging auxiliary container.
Definition: BTaggingAuxContainer.h:22
xAOD::BTaggingAuxContainer_v2
Definition: BTaggingAuxContainer_v2.h:18
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAODMaker::TrigBjetCnvAlg::m_aodKey
std::string m_aodKey
StoreGate key of the input container.
Definition: TrigBjetCnvAlg.h:44
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TrigEFBjetContainer
Container of TrigEFBjet objects to be stored in POOL.
Definition: TrigEFBjetContainer.h:31
TrigBjetCnvAlg.h
TrigEFBjet.h
xAODMaker
Definition: StoreGateSvc.h:72
xAODMaker::TrigBjetCnvAlg::m_xaodKey
std::string m_xaodKey
StoreGate key for the output container.
Definition: TrigBjetCnvAlg.h:46
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
BTaggingAuxContainer.h
xAOD::BTaggingContainer
BTaggingContainer_v1 BTaggingContainer
Definition of the current "BTagging container version".
Definition: BTaggingContainer.h:17
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
xAODMaker::TrigBjetCnvAlg::execute
virtual StatusCode execute()
Function executing the algorithm.
Definition: TrigBjetCnvAlg.cxx:46
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
AthAlgorithm
Definition: AthAlgorithm.h:47
xAODMaker::TrigBjetCnvAlg::TrigBjetCnvAlg
TrigBjetCnvAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
Definition: TrigBjetCnvAlg.cxx:21
TrigEFBjetContainer.h
BTaggingContainer.h
xAODMaker::TrigBjetCnvAlg::m_cnvTool
ToolHandle< ITrigBjetCnvTool > m_cnvTool
Handle to the converter tool.
Definition: TrigBjetCnvAlg.h:49
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
errorcheck.h
Helpers for checking error return status codes and reporting errors.
xAODMaker::TrigBjetCnvAlg::initialize
virtual StatusCode initialize()
Function initialising the algorithm.
Definition: TrigBjetCnvAlg.cxx:32