|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "GaudiKernel/MsgStream.h"
25 :
Converter( storageType(), classID(), svcloc ),
26 m_tool(
"CTPByteStreamTool" ),
27 m_robDataProvider(
"ROBDataProviderSvc",
"CTPByteStreamCnv" ),
28 m_ByteStreamEventAccess(
"ByteStreamCnvSvc",
"CTPByteStreamCnv" ) {
56 MsgStream
log(
msgSvc(),
"CTPByteStreamCnv" );
75 log << MSG::WARNING <<
"Can't get ROBDataProviderSvc" <<
endmsg;
81 return StatusCode::SUCCESS;
91 MsgStream
log(
msgSvc(),
"CTPByteStreamCnv" );
97 log << MSG::ERROR <<
"Can not cast input to ByteStreamAddress" <<
endmsg ;
98 return StatusCode::FAILURE;
108 log <<
MSG::DEBUG <<
"expected ROB sub-detector ID: " << std::hex
109 << robId << std::dec <<
endmsg;
111 std::vector< uint32_t > vID;
112 vID.push_back( robId );
123 if( robFrags.size() != 1 ) {
124 log << MSG::WARNING <<
"Number of ROB fragments is " << robFrags.size() <<
endmsg;
125 log << MSG::WARNING <<
"Creating empty CTP_RDO object" <<
endmsg;
129 return StatusCode::SUCCESS;
135 IROBDataProviderSvc::VROBFRAG::const_iterator
it = robFrags.begin();
141 return StatusCode::SUCCESS;
151 MsgStream
log(
msgSvc(),
"CTPByteStreamCnv" );
158 log << MSG::ERROR <<
" Cannot cast to CTP_RDO" <<
endmsg;
159 return StatusCode::FAILURE;
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::FullEventFragment RawEventWrite
data type for writing raw event
const ROBFragment * getROBFragment() const
Return the ROBFragment.
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
Function creating the CTP_RDO object from a CTP ROB fragment.
CTPByteStreamCnv(ISvcLocator *svcloc)
Standard constructor.
bool fromStorable(DataObject *pDObj, T *&pTrans, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
convert to and from a SG storable
Defines the ROB data entity. The ROB data is an abstract entity that is used to discase the raw event...
templete data class to wrap ROB fragment for accessing ROD data
static long storageType()
Function needed by the framework.
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
static const CLID & ID()
the CLID of T
msgSvc
Provide convenience handles for various services.
::StatusCode StatusCode
StatusCode definition for legacy code.
IOpaqueAddress for ByteStreamCnvSvc, with ROB ids.
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&pAddr) override
Function creating the CTP ROB fragment from a CTP_RDO object.
std::vector< const ROBF * > VROBFRAG
uint32_t CLID
The Class ID type.
ServiceHandle< IByteStreamEventAccess > m_ByteStreamEventAccess
Service used when writing the BS data.
static constexpr long storageType()
ToolHandle< CTPByteStreamTool > m_tool
Tool doing the actual conversion.
ServiceHandle< IROBDataProviderSvc > m_robDataProvider
Service used when reading the BS data.
uint32_t getRodID() const
get a ROD Source ID
const boost::regex re(r_e)
virtual StatusCode initialize() override
Function connecting to all the needed services/tools.
uint32_t getRobID(uint32_t rod_id) const
Make a ROB Source ID from a ROD source ID.
CTPSrcIdMap m_srcIdMap
Object storing the various IDs of the CTP fragment.
static const CLID & classID()
Function needed by the framework.