ATLAS Offline Software
Loading...
Searching...
No Matches
ZdcRecV3.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5/*
6 * ZdcRecV3.cxx
7 *
8 * Created on: Sept 11, 2016 (never forget)
9 * Author: Peter.Steinberg@bnl.gov
10 */
11
12
13#include <memory>
14
15#include "GaudiKernel/ISvcLocator.h"
16#include "GaudiKernel/MsgStream.h"
17#include "GaudiKernel/StatusCode.h"
21//#include "Identifier/Identifier.h"
22
24#include "ZdcRec/ZdcRecV3.h"
26
27//==================================================================================================
28ZdcRecV3::ZdcRecV3(const std::string& name, ISvcLocator* pSvcLocator) :
29
30 AthAlgorithm(name, pSvcLocator),
31 m_ownPolicy(static_cast<int> (SG::OWN_ELEMENTS))
32{
33 declareProperty("OwnPolicy",m_ownPolicy) ;
34}
35//==================================================================================================
36
37//==================================================================================================
39//==================================================================================================
40
41//==================================================================================================
43{
44 MsgStream mLog(msgSvc(), name());
45
46 // Reconstruction Tool
47 ATH_CHECK( m_zdcTool.retrieve() );
48
49 ATH_CHECK( m_zdcModuleContainerName.initialize() );
50 ATH_CHECK( m_zdcSumContainerName.initialize() );
51
53 mLog << MSG::DEBUG << "...will OWN its cells." << endmsg;
54 else
55 mLog << MSG::DEBUG << "...will VIEW its cells." << endmsg;
56
57
58 mLog << MSG::DEBUG << "--> ZDC: ZdcRecV3 initialization complete" << endmsg;
59
60 return StatusCode::SUCCESS;
61}
62//==================================================================================================
63
64//==================================================================================================
66{
67
68 const EventContext& ctx = Gaudi::Hive::currentContext();
69 ATH_MSG_DEBUG ("--> ZDC: ZdcRecV3 execute starting on "
70 << ctx.evt()
71 << "th event");
72
73
76
77 ATH_CHECK( m_zdcTool->recoZdcModules(*moduleContainer.get(), *moduleSumContainer.get() ) ); // passes by reference
78
79 return StatusCode::SUCCESS;
80
81}
82//==================================================================================================
83
84//==================================================================================================
86{
87
88 ATH_MSG_DEBUG( "--> ZDC: ZdcRecV3 finalize complete" );
89
90 return StatusCode::SUCCESS;
91
92}
93//==================================================================================================
94
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
ToolHandle< ZDC::IZdcAnalysisTool > m_zdcTool
Definition ZdcRecV3.h:91
ZdcRecV3(const std::string &name, ISvcLocator *pSvcLocator)
Definition ZdcRecV3.cxx:28
StatusCode execute() override
Definition ZdcRecV3.cxx:65
int m_ownPolicy
class member version of retrieving StoreGate
Definition ZdcRecV3.h:66
StatusCode finalize() override
Definition ZdcRecV3.cxx:85
StatusCode initialize() override
Definition ZdcRecV3.cxx:42
SG::ReadHandleKey< xAOD::ZdcModuleContainer > m_zdcModuleContainerName
Digits data container name.
Definition ZdcRecV3.h:82
SG::ReadHandleKey< xAOD::ZdcModuleContainer > m_zdcSumContainerName
Definition ZdcRecV3.h:85
Forward declaration.
@ OWN_ELEMENTS
this data object owns its elements