22#ifdef CTP_MUCTPI_HAVE_SAME_ROS
35 m_tool(
"MuCTPIByteStreamTool" ),
36#ifdef CTP_MUCTPI_HAVE_SAME_ROS
37 m_ctp_tool(
"CTPByteStreamTool" ),
38 m_ctp_rec_tool(
"RecCTPByteStreamTool" ),
39 m_storeGate(
"StoreGateSvc",
"MuCTPIByteStreamCnv" ),
70 MsgStream log( msgSvc(),
"MuCTPIByteStreamCnv" );
71 log << MSG::DEBUG <<
"MuCTPIByteStreamCnv in initialize() " <<
endmsg;
82 log << MSG::DEBUG <<
"Connected to MuCTPIByteStreamTool" <<
endmsg;
84#ifdef CTP_MUCTPI_HAVE_SAME_ROS
89 log << MSG::DEBUG <<
"Connected to CTPByteStreamTool" <<
endmsg;
95 log << MSG::DEBUG <<
"Connected to RecCTPByteStreamTool" <<
endmsg;
102 log << MSG::WARNING <<
"Can't get ROBDataProviderSvc" <<
endmsg;
105 log << MSG::DEBUG <<
"Connected to ROBDataProviderSvc" <<
endmsg;
108 return StatusCode::SUCCESS;
118 MsgStream log( msgSvc(),
"MuCTPIByteStreamCnv" );
119 log << MSG::DEBUG <<
"createObj() called" <<
endmsg;
124 log << MSG::ERROR <<
" Can not cast to ByteStreamAddress " <<
endmsg ;
125 return StatusCode::FAILURE;
128 log << MSG::DEBUG <<
" Creating Objects " << *( pBS_Addr->par() ) <<
endmsg;
135 log << MSG::DEBUG <<
" expected ROB sub-detector ID: " << std::hex
136 << robId << std::dec <<
endmsg;
138 std::vector< uint32_t > vID;
139 vID.push_back( robId );
150 if( robFrags.size() == 0 ) {
158 vID[0] = ( robId | 0x00000b );
159#ifdef CTP_MUCTPI_HAVE_SAME_ROS
160 vID.push_back( robId | 0x00000a );
164 if( robFrags.size() == 0 ) {
167#ifdef CTP_MUCTPI_HAVE_SAME_ROS
172 if( robFrags.size() == 0 ) {
173 log << MSG::WARNING <<
"No MuCTPI ROB fragments found!" <<
endmsg;
177 return StatusCode::SUCCESS;
182 IROBDataProviderSvc::VROBFRAG::const_iterator it = robFrags.begin();
185 if(
sc.isFailure() ) {
186 log << MSG::ERROR <<
" Failed to create Objects: " << *( pBS_Addr->par() ) <<
endmsg;
195#ifdef CTP_MUCTPI_HAVE_SAME_ROS
201 if( robFrags.size() > 1 ) {
204 if( it != robFrags.end() ) {
209 ATH_CHECK( m_ctp_tool->convert(
ROBData( *it ).getROBFragment(), ctp_result ) );
212 ATH_CHECK( m_storeGate->record( ctp_result,
"CTP_RDO" ) );
214 ATH_CHECK( m_ctp_rec_tool->convert(
ROBData( *it ).getROBFragment(), ctp_rio_result, log ) );
217 ATH_CHECK( m_storeGate->record( ctp_rio_result,
"CTP_RIO" ) );
233 MsgStream log( msgSvc(),
"MuCTPIByteStreamCnv" );
234 log << MSG::DEBUG <<
"createRep() called" <<
endmsg;
240 log << MSG::ERROR <<
" Cannot cast to MuCTPI_RDO" <<
endmsg;
241 return StatusCode::FAILURE;
const boost::regex re(r_e)
#define ATH_CHECK
Evaluate an expression and check for errors.
uint32_t CLID
The Class ID type.
Defines the ROB data entity. The ROB data is an abstract entity that is used to decouple the raw even...
ROBData_T< OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment, OFFLINE_FRAGMENTS_NAMESPACE::PointerType > ROBData
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::FullEventFragment RawEventWrite
data type for writing raw event
convert to and from a SG storable
IOpaqueAddress for ByteStreamCnvSvc, with ROB ids.
static constexpr long storageType()
std::vector< const ROBF * > VROBFRAG
ServiceHandle< IByteStreamEventAccess > m_ByteStreamEventAccess
Service used when writing the BS data.
static const CLID & classID()
Function needed by the framework.
ToolHandle< MuCTPIByteStreamTool > m_tool
Tool doing the actual conversion.
MuCTPIByteStreamCnv(ISvcLocator *svcloc)
Standard constructor.
MuCTPISrcIdMap m_srcIdMap
Object storing the various IDs of the MuCTPI fragment.
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
Function creating the MuCTPI_RDO object from a MuCTPI ROB fragment.
virtual StatusCode initialize() override
Function connecting to all the needed services/tools.
static long storageType()
Function needed by the framework.
ServiceHandle< IROBDataProviderSvc > m_robDataProvider
Service used when reading the BS data.
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&pAddr) override
Function creating the MuCTPI ROB fragment from a MuCTPI_RDO object.
Class representing the readout data of the MuCTPI hardware and simulation.
const ROBFragment * getROBFragment() const
Return the ROBFragment.
bool fromStorable(DataObject *pDObj, T *&pTrans, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)