ATLAS Offline Software
Loading...
Searching...
No Matches
TrigT2MbtsBitsCnvAlg.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: TrigT2MbtsBitsCnvAlg.cxx 608072 2014-07-23 00:27:40Z azemla $
6
7// Gaudi/Athena include(s):
9
10// EDM include(s):
14
15// Local include(s):
17
18namespace xAODMaker {
19
21 ISvcLocator* svcLoc )
22 : AthAlgorithm( name, svcLoc ),
23 m_cnvTool( "xAODMaker::TrigT2MbtsBitsCnvTool/TrigT2MbtsBitsCnvTool", this ) {
24
25 declareProperty( "AODKey", m_aodKey = "TrigT2MbtsBits" );
26 declareProperty( "xAODKey", m_xaodKey = "xAODTrigT2MbtsBits" );
27 declareProperty( "CnvTool", m_cnvTool );
28 }
29
31
32 // Greet the user:
33 ATH_MSG_INFO( "Initializing" );
34 ATH_MSG_DEBUG( " AOD Key: " << m_aodKey );
35 ATH_MSG_DEBUG( "xAOD Key: " << m_xaodKey );
36
37 // Retrieve the converter tool:
38 CHECK( m_cnvTool.retrieve() );
39
40 // Return gracefully:
41 return StatusCode::SUCCESS;
42 }
43
45
46 // Retrieve the AOD container:
47 const TrigT2MbtsBitsContainer* aod = nullptr;
48 CHECK( evtStore()->retrieve( aod, m_aodKey ) );
49
50 // Create the xAOD container and its auxiliary store:
53 xaod->setStore( aux );
54
55 // Fill the xAOD container:
56 CHECK( m_cnvTool->convert( aod, xaod ) );
57
58 // Record the xAOD containers:
59 CHECK( evtStore()->record( aux, m_xaodKey + "Aux." ) );
60 CHECK( evtStore()->record( xaod, m_xaodKey ) );
61
62 // Return gracefully:
63 return StatusCode::SUCCESS;
64 }
65
66} // 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)
std::string m_xaodKey
StoreGate key for the output container.
std::string m_aodKey
StoreGate key of the input container.
virtual StatusCode initialize()
Function initialising the algorithm.
TrigT2MbtsBitsCnvAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
virtual StatusCode execute()
Function executing the algorithm.
ToolHandle< ITrigT2MbtsBitsCnvTool > m_cnvTool
Handle to the converter tool.
TrigT2MbtsBitsAuxContainer_v1 TrigT2MbtsBitsAuxContainer