Interface for AlgTools converting ByteStream to xAOD RoI objects and vice versa.
More...
#include <IL1TriggerByteStreamTool.h>
Interface for AlgTools converting ByteStream to xAOD RoI objects and vice versa.
Definition at line 19 of file IL1TriggerByteStreamTool.h.
◆ ConversionMode
◆ ~IL1TriggerByteStreamTool()
virtual IL1TriggerByteStreamTool::~IL1TriggerByteStreamTool |
( |
| ) |
|
|
overridevirtualdefault |
◆ clearCache()
void IL1TriggerByteStreamTool::clearCache |
( |
const EventContext & |
eventContext | ) |
|
|
inlineprotected |
◆ convertFromBS()
Convert BS -> xAOD.
The implementation should create an xAOD RoI object from the raw data and record it in the event store using a WriteHandle it declares.
◆ convertToBS()
Convert xAOD -> BS.
The implementation should take the xAOD RoI object from the event store using a ReadHandle it declares, convert it to raw data, and fill the vrobf vector. The function is not const, as it needs to rely on the internal cache to track data allocated for BS representation. The provided helpers clearCache, newRodData, newRobFragment should be used to allocate memory for the BS representation.
The caller should set LVL1 ID and TriggerType in all ROBs created by this function after it returns, because it already has a handle on the FullEventFragment (RawEvent). The LVL1 ID and TriggerType set for the ROBs inside this function should not matter.
◆ DeclareInterfaceID()
◆ getConversionMode()
template<typename RHK , typename WHK >
ConversionMode IL1TriggerByteStreamTool::getConversionMode |
( |
const RHK & |
readHandleKeys, |
|
|
const WHK & |
writeHandleKeys, |
|
|
MsgStream & |
msg |
|
) |
| |
|
inlineprotected |
Helper to find out the conversion mode based on configured data handles.
Definition at line 62 of file IL1TriggerByteStreamTool.h.
69 if constexpr (std::is_base_of_v<SG::VarHandleKeyArray, RHK>) {
70 msg << MSG::ERROR <<
"Exactly one of the read / write handle key arrays has to be set and the other has to"
71 <<
" be empty, but they have " << readHandleKeys.size() <<
" / " <<
writeHandleKeys.size() <<
" elements"
73 }
else if constexpr (std::is_base_of_v<SG::VarHandleKey, RHK>) {
74 msg << MSG::ERROR <<
"Exactly one of the read / write handle keys has to be set and the other has to"
75 <<
" be empty, but they are \"" << readHandleKeys.key() <<
"\" / \"" <<
writeHandleKeys.key() <<
"\""
◆ newRobFragment()
Allocate new ROBFragment for output ByteStream data.
Definition at line 91 of file IL1TriggerByteStreamTool.h.
99 Cache* cache =
m_cache.get(eventContext);
100 const EventIDBase& eid = eventContext.eventID();
101 cache->robFragments.push_back(std::make_unique<OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment>(
105 eid.bunch_crossing_id(),
112 return cache->robFragments.back().get();
◆ newRodData()
uint32_t* IL1TriggerByteStreamTool::newRodData |
( |
const EventContext & |
eventContext, |
|
|
const size_t |
size |
|
) |
| |
|
inlineprotected |
◆ robIds()
virtual const std::vector<uint32_t>& IL1TriggerByteStreamTool::robIds |
( |
| ) |
const |
|
pure virtual |
List of IDs of ROBs which the convert methods expect in the vrobf input/output parameter.
The implementation has to hold a Gaudi::Property<vector<uint32_t>> to declare the ROB IDs it requires/provides and this method has to return the value of this property. There is no easy way to declare a Gaudi::Property here in the interface, so it is delegated to the implementation.
◆ m_cache
The documentation for this class was generated from the following file: