|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GaudiKernel/IRegistry.h"
17 #include "GaudiKernel/ThreadLocalContext.h"
20 #include "eformat/Issue.h"
21 #include "eformat/SourceIdentifier.h"
29 Converter(storageType(), classID(), svcLoc),
45 const bool doMuon = not serviceLocator()->getOptsSvc().get(
"ToolSvc.L1MuonBSEncoderTool.ROBIDs").empty();
49 const bool doMuonDaq = not serviceLocator()->getOptsSvc().get(
"ToolSvc.L1MuonBSEncoderToolDAQ.ROBIDs").empty();
50 ATH_MSG_DEBUG(
"MUCTPI DAQ ROB encoding is " << (doMuonDaq ?
"enabled" :
"disabled"));
54 return StatusCode::SUCCESS;
69 return StatusCode::SUCCESS;
76 ATH_MSG_ERROR(
"L1TriggerResult cannot be created directly from ByteStream!"
77 <<
" Use the L1TriggerResultMaker algorithm instead");
78 return StatusCode::FAILURE;
90 if (!castSuccessful || !l1TriggerResult) {
91 ATH_MSG_ERROR(
"Failed to convert DataObject to xAOD::TrigCompositeContainer for L1TriggerResult");
92 return StatusCode::FAILURE;
99 return StatusCode::FAILURE;
109 if (not
tool.isEnabled()) {
continue;}
110 std::vector<WROBF*> muon_robs;
111 ATH_CHECK(
tool->convertToBS(muon_robs, Gaudi::Hive::currentContext()));
112 ATH_MSG_DEBUG(
tool.name() <<
" created " << muon_robs.size() <<
" L1Muon ROB Fragments");
113 for (
WROBF* rob : muon_robs) {
116 rob->rod_lvl1_type(
re->lvl1_trigger_type());
118 rob->rod_lvl1_id(
re->lvl1_id());
121 ATH_MSG_DEBUG(
"Added ROB fragment 0x" << MSG::hex << rob->source_id() << MSG::dec <<
" to the output raw event");
128 if ( pAddr !=
nullptr ) pAddr->release();
130 pAddr =
static_cast<IOpaqueAddress*
>(bsAddr);
134 return StatusCode::SUCCESS;
142 const uint32_t ndata = rob.rod_ndata();
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::FullEventFragment RawEventWrite
data type for writing raw event
char data[hepevt_bytes_allocation_ATLAS]
virtual StatusCode finalize() override
bool fromStorable(DataObject *pDObj, T *&pTrans, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
convert to and from a SG storable
void printRob(const OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment &rob) const
Helper method for debug printouts.
virtual ~L1TriggerResultByteStreamCnv()
Standard destructor.
#define ATH_MSG_VERBOSE(x)
ServiceHandle< IByteStreamEventAccess > m_ByteStreamEventAccess
Helper to obtain the RawEvent pointer.
static const CLID & ID()
the CLID of T
bool msgLvl(const MSG::Level lvl) const
Test the output level.
msgSvc
Provide convenience handles for various services.
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
::StatusCode StatusCode
StatusCode definition for legacy code.
static const CLID & classID()
CLID of the class of the L1TriggerResult converted by this converter (xAOD::TrigCompositeContainer)
IOpaqueAddress for ByteStreamCnvSvc, with ROB ids.
virtual StatusCode initialize() override
Class to provide easy MsgStream access and capabilities.
uint32_t CLID
The Class ID type.
static long storageType()
Storage type used by this converter.
static constexpr long storageType()
ToolHandle< IL1TriggerByteStreamTool > m_muonEncoderToolDaq
eformat::write::ROBFragment ROBFragment
#define ATH_MSG_WARNING(x)
const boost::regex re(r_e)
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&pAddr) override
Create ByteStream from xAOD (L1TriggerResult)
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
Create xAOD (L1TriggerResult) from ByteStream.
ToolHandle< IL1TriggerByteStreamTool > m_muonEncoderTool
Encoder tools for L1Muon RoIs (one writing RoIB ROB, one writing DAQ ROB)
L1TriggerResultByteStreamCnv(ISvcLocator *svcLoc)
Standard constructor.