![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
6 #include "GaudiKernel/MsgStream.h"
7 #include "GaudiKernel/StatusCode.h"
8 #include "GaudiKernel/DataObject.h"
9 #include "GaudiKernel/IRegistry.h"
10 #include "GaudiKernel/IToolSvc.h"
11 #include "GaudiKernel/ServiceHandle.h"
38 :
AthConstConverter(storageType(), classID(), svcloc,
"TileRawChannelContByteStreamCnv")
39 , m_tool(
"TileRawChannelContByteStreamTool")
40 , m_byteStreamEventAccess(
"ByteStreamCnvSvc",
name())
41 , m_byteStreamCnvSvc(0)
42 , m_robSvc(
"ROBDataProviderSvc",
name())
43 , m_decoder(
"TileROD_Decoder")
70 return StatusCode::SUCCESS;
82 return StatusCode::FAILURE;
85 const std::string containerName(*(pRE_Addr->par()));
86 bool isTMDB(containerName == std::string(
"MuRcvRawChCnt"));
91 std::vector<uint32_t> robid(1);
93 std::vector<const ROBDataProviderSvc::ROBF*> robf;
104 std::unordered_map<uint32_t,int> bsflags;
110 rawChannelCollection->
clear();
120 if (newrob != robid[0]) {
127 if (robf.size() > 0 ) {
129 m_decoder->fillCollection_TileMuRcv_RawChannel(robf[0], *rawChannelCollection);
131 m_decoder->fillCollection(robf[0], *rawChannelCollection, cont);
133 flag = cont->get_bsflags();
134 auto result = bsflags.insert(std::pair<uint32_t, int>(
flag, 1));
137 ATH_MSG_DEBUG(
"ROB for " << ((isTMDB)?
"TMDB ":
"") <<
"drawer 0x" << MSG::hex << collID << MSG::dec <<
" not found in BS" );
140 ATH_MSG_DEBUG(
"Status for " << ((isTMDB)?
"TMDB ":
"") <<
"drawer 0x" << MSG::hex << collID <<
" is 0x" <<
status << MSG::dec);
144 if (bsflags.size() > 1) {
146 for (
const auto & elem : bsflags) {
147 if (elem.second >
n) {
153 if (
flag != cont->get_bsflags()) {
158 ATH_MSG_DEBUG(
"Changing units for " << ((isTMDB)?
"TMDB ":
"") <<
"RawChannelContainer from "
159 << cont->get_unit() <<
" to " <<
unit << MSG::hex
160 <<
" and BS flags from 0x" << cont->get_bsflags() <<
" to 0x" <<
flag << MSG::dec);
163 cont->set_bsflags(
flag);
167 ATH_MSG_DEBUG(
"Creating raw channel container: " << containerName );
173 return StatusCode::SUCCESS;
184 std::string
key(
"Tile");
195 return StatusCode::FAILURE;
198 std::string
name = pObj->registry()->name();
200 if ( pAddr !=
nullptr ) pAddr->release();
207 return StatusCode::SUCCESS;
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Template class for assembling a full atlas raw event from subfragments.
bool fromStorable(DataObject *pDObj, T *&pTrans, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
convert to and from a SG storable
StatusCode status() const
Return the error status from the constructors.
uint32_t getRobFromFragID(int frag_id) const
make a ROB SrcID for a fragment ID
virtual StatusCode finalize() override
void setFragGlobalCRC(uint32_t globalcrc)
Various set methods.
const TileHid2RESrcID * m_hid2re
Pointer to TileHid2RESrcID.
ToolHandle< TileROD_Decoder > m_decoder
Pointer to TileROD_Decoder.
uint32_t getRobFromTileMuRcvFragID(int frag_id) const
ToolHandle< TileRawChannelContByteStreamTool > m_tool
DataObject * asStorable(T *pObject)
Gaudi converter base class with const interfaces.
ServiceHandle< IByteStreamEventAccess > m_byteStreamEventAccess
virtual StatusCode createRepConst(DataObject *pObj, IOpaqueAddress *&pAddr) const override
Convert the transient object to the requested representation.
virtual StatusCode createObjConst(IOpaqueAddress *pAddr, DataObject *&pObj) const override
Create the transient representation of an object.
static const CLID & ID()
the CLID of T
Gaudi Conversion Service class for ByteStream Persistency.
TileRawChannelContByteStreamCnv(ISvcLocator *svcloc)
::StatusCode StatusCode
StatusCode definition for legacy code.
Helper for holding non-const raw data prior to recording in SG.
IOpaqueAddress for ByteStreamCnvSvc, with ROB ids.
static long storageType()
uint32_t CLID
The Class ID type.
static constexpr long storageType()
Collection * indexFindPtr(IdentifierHash hash)
Look up a (non-const) collection via hash.
ServiceHandle< IROBDataProviderSvc > m_robSvc
Pointer to IROBDataProviderSvc.
Helpers for checking error return status codes and reporting errors.
Incident sent after a store is cleared.
ByteStreamCnvSvc * m_byteStreamCnvSvc
void clear()
Clear everything for next event.
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
StatusCode getFullEventAssembler(T *&t, const std::string &nm)
Access to FullEventAssembler.
virtual StatusCode initialize() override
macros to associate a CLID to a type
static const CLID & classID()