ATLAS Offline Software
Loading...
Searching...
No Matches
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
19namespace 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
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Container of TrigEFBjet objects to be stored in POOL.
ToolHandle< ITrigBjetCnvTool > m_cnvTool
Handle to the converter tool.
virtual StatusCode initialize()
Function initialising the algorithm.
std::string m_aodKey
StoreGate key of the input container.
TrigBjetCnvAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
std::string m_xaodKey
StoreGate key for the output container.
virtual StatusCode execute()
Function executing the algorithm.
BTaggingContainer_v1 BTaggingContainer
Definition of the current "BTagging container version".
BTaggingAuxContainer_v2 BTaggingAuxContainer
Definition of the current BTagging auxiliary container.