15#include "GaudiKernel/ISvcLocator.h"
16#include "GaudiKernel/MsgStream.h"
17#include "GaudiKernel/StatusCode.h"
49 MsgStream mLog(msgSvc(), name());
64 mLog << MSG::DEBUG <<
"...will OWN its cells." <<
endmsg;
66 mLog << MSG::DEBUG <<
"...will VIEW its cells." <<
endmsg;
69 mLog << MSG::DEBUG <<
"--> ZDC: Running in ZDC+RPD mode" <<
endmsg;
74 mLog << MSG::DEBUG <<
"--> ZDC: Running in LIS only mode" <<
endmsg;
78 mLog << MSG::DEBUG <<
"--> ZDC: Running in ZDC+RPD + LIS mode" <<
endmsg;
82 mLog << MSG::ERROR <<
"--> ZDC: Unknown DecodeRunMode " <<
m_DecodeRunMode <<
", should be 0, 1, or 2. Exiting." <<
endmsg;
83 return StatusCode::FAILURE;
87 mLog << MSG::DEBUG <<
"--> ZDC: ZdcRecRun3Decode initialization complete" <<
endmsg;
89 return StatusCode::SUCCESS;
100 ATH_MSG_DEBUG (
"--> ZDC: ZdcRecRun3Decode execute starting on "
106 return StatusCode::SUCCESS;
119 for (
auto zld : *zldContainer)
121 uint32_t lucrod_id = zld->GetLucrodID();
145 ATH_MSG_WARNING(
" cannot set EventInfo error state for ForwardDet " );
155 ATH_MSG_WARNING(
" cannot set RPDDECODINGERROR flag bit for ForwardDet " );
162 ATH_MSG_WARNING(
" cannot set ZDCDECODINGERROR flag bit for ForwardDet " );
169 ATH_MSG_WARNING(
" cannot set LISDECODINGERROR flag bit for ForwardDet " );
177 moduleContainer->setStore( moduleAuxContainer.get() );
182 moduleSumContainer->setStore( moduleSumAuxContainer.get() );
187 int ncha =
m_ChannelTool->convertLucrod2ZM(zldContainer.
get(), moduleContainer.get(), moduleSumContainer.get() );
188 ATH_MSG_DEBUG(
"m_ChannelTool->convertLucrod2ZM returned " << ncha <<
" channels");
200 std::move(moduleAuxContainer)) );
204 std::move(moduleSumAuxContainer)) );
206 return StatusCode::SUCCESS;
215 ATH_MSG_DEBUG(
"--> ZDC: ZdcRecRun3Decode finalize complete" );
217 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
Define enumerations for event-level ZDC data.
std::string ZdcModuleToString(const xAOD::ZdcModule &zm)
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.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ZdcRecRun3Decode(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
StatusCode initialize() override
StatusCode finalize() override
SG::ReadHandleKey< ZdcLucrodDataContainer > m_zldContainerName
StatusCode execute(const EventContext &ctx) override
Execute method.
SG::WriteHandleKey< xAOD::ZdcModuleContainer > m_zdcSumContainerName
SG::WriteDecorHandleKey< xAOD::EventInfo > m_eventInfoDecorKey
Gaudi::Property< unsigned int > m_nFragments
ToolHandle< ZdcRecChannelToolLucrod > m_ChannelTool
SG::WriteHandleKey< xAOD::ZdcModuleContainer > m_zdcModuleContainerName
@ ForwardDet
The forward detectors.
@ Error
The sub-detector issued an error.
@ OWN_ELEMENTS
this data object owns its elements
ZdcModuleContainer_v1 ZdcModuleContainer
ZdcModuleAuxContainer_v2 ZdcModuleAuxContainer