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;
99 const EventContext& ctx = Gaudi::Hive::currentContext();
101 ATH_MSG_DEBUG (
"--> ZDC: ZdcRecRun3Decode execute starting on "
107 return StatusCode::SUCCESS;
120 for (
auto zld : *zldContainer)
122 uint32_t lucrod_id = zld->GetLucrodID();
146 ATH_MSG_WARNING(
" cannot set EventInfo error state for ForwardDet " );
156 ATH_MSG_WARNING(
" cannot set RPDDECODINGERROR flag bit for ForwardDet " );
163 ATH_MSG_WARNING(
" cannot set ZDCDECODINGERROR flag bit for ForwardDet " );
170 ATH_MSG_WARNING(
" cannot set LISDECODINGERROR flag bit for ForwardDet " );
178 moduleContainer->setStore( moduleAuxContainer.get() );
183 moduleSumContainer->setStore( moduleSumAuxContainer.get() );
188 int ncha =
m_ChannelTool->convertLucrod2ZM(zldContainer.
get(), moduleContainer.get(), moduleSumContainer.get() );
189 ATH_MSG_DEBUG(
"m_ChannelTool->convertLucrod2ZM returned " << ncha <<
" channels");
201 std::move(moduleAuxContainer)) );
205 std::move(moduleSumAuxContainer)) );
207 return StatusCode::SUCCESS;
216 ATH_MSG_DEBUG(
"--> ZDC: ZdcRecRun3Decode finalize complete" );
218 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)
StatusCode execute() override
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
StatusCode initialize() override
StatusCode finalize() override
SG::ReadHandleKey< ZdcLucrodDataContainer > m_zldContainerName
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