ATLAS Offline Software
TrigT2ZdcSignalsCnvAlg.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: TrigT2ZdcSignalsCnvAlg.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):
16 #include "TrigT2ZdcSignalsCnvAlg.h"
17 
18 namespace xAODMaker {
19 
21  ISvcLocator* svcLoc )
22  : AthAlgorithm( name, svcLoc ),
23  m_cnvTool( "xAODMaker::TrigT2ZdcSignalsCnvTool/TrigT2ZdcSignalsCnvTool", this ) {
24 
25  declareProperty( "AODKey", m_aodKey = "TrigT2ZdcSignals" );
26  declareProperty( "xAODKey", m_xaodKey = "xAODTrigT2ZdcSignals" );
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 TrigT2ZdcSignalsContainer* 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
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TrigT2ZdcSignalsContainer.h
xAOD::TrigT2ZdcSignalsContainer
TrigT2ZdcSignalsContainer_v1 TrigT2ZdcSignalsContainer
Definition: Event/xAOD/xAODTrigMinBias/xAODTrigMinBias/TrigT2ZdcSignalsContainer.h:11
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAODMaker::TrigT2ZdcSignalsCnvAlg::initialize
virtual StatusCode initialize()
Function initialising the algorithm.
Definition: TrigT2ZdcSignalsCnvAlg.cxx:30
xAODMaker
Definition: StoreGateSvc.h:72
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
xAODMaker::TrigT2ZdcSignalsCnvAlg::m_aodKey
std::string m_aodKey
StoreGate key of the input container.
Definition: TrigT2ZdcSignalsCnvAlg.h:43
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
TrigT2ZdcSignalsContainer.h
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
TrigT2ZdcSignalsAuxContainer.h
AthAlgorithm
Definition: AthAlgorithm.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
errorcheck.h
Helpers for checking error return status codes and reporting errors.
xAOD::TrigT2ZdcSignalsAuxContainer_v1
Definition: TrigT2ZdcSignalsAuxContainer_v1.h:14
TrigT2ZdcSignalsCnvAlg.h
xAODMaker::TrigT2ZdcSignalsCnvAlg::execute
virtual StatusCode execute()
Function executing the algorithm.
Definition: TrigT2ZdcSignalsCnvAlg.cxx:44
TrigT2ZdcSignalsContainer
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigT2ZdcSignalsContainer.h:13
xAODMaker::TrigT2ZdcSignalsCnvAlg::m_cnvTool
ToolHandle< ITrigT2ZdcSignalsCnvTool > m_cnvTool
Handle to the converter tool.
Definition: TrigT2ZdcSignalsCnvAlg.h:48
xAODMaker::TrigT2ZdcSignalsCnvAlg::TrigT2ZdcSignalsCnvAlg
TrigT2ZdcSignalsCnvAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
Definition: TrigT2ZdcSignalsCnvAlg.cxx:20
xAODMaker::TrigT2ZdcSignalsCnvAlg::m_xaodKey
std::string m_xaodKey
StoreGate key for the output container.
Definition: TrigT2ZdcSignalsCnvAlg.h:45
xAOD::TrigT2ZdcSignalsAuxContainer
TrigT2ZdcSignalsAuxContainer_v1 TrigT2ZdcSignalsAuxContainer
Definition: TrigT2ZdcSignalsAuxContainer.h:11