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 26 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 fill the vrobf vector with raw data converted from the xAOD object(s). The TrigCompositeContainer pointer carries any input the Cnv has already retrieved on behalf of the tool; tools that retrieve their inputs via ReadHandle may ignore it, and callers in that case may pass nullptr. 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 72 of file IL1TriggerByteStreamTool.h.
72 {
75 }
78 }
79 if constexpr (std::is_base_of_v<SG::VarHandleKeyArray, RHK>) {
80 msg << MSG::ERROR <<
"Exactly one of the read / write handle key arrays has to be set and the other has to"
81 <<
" be empty, but they have " << readHandleKeys.size() <<
" / " <<
writeHandleKeys.size() <<
" elements"
83 } else if constexpr (std::is_base_of_v<SG::VarHandleKey, RHK>) {
84 msg << MSG::ERROR <<
"Exactly one of the read / write handle keys has to be set and the other has to"
85 <<
" be empty, but they are \"" << readHandleKeys.key() <<
"\" / \"" <<
writeHandleKeys.key() <<
"\""
87 }
89 }
◆ newRobFragment()
Allocate new ROBFragment for output ByteStream data.
Definition at line 101 of file IL1TriggerByteStreamTool.h.
107 {
108
110 const EventIDBase& eid = eventContext.eventID();
111 cache->robFragments.push_back(std::make_unique<OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment>(
112 source_id,
113 eid.run_number(),
114 0,
115 eid.bunch_crossing_id(),
116 0,
117 detev_type,
118 ndata,
120 status_position
121 ));
122 return cache->robFragments.back().get();
123 }
char data[hepevt_bytes_allocation_ATLAS]
const IIntersectionCache * cache() const
Retrieve the associated cache block, if it exists.
◆ newRodData()
| uint32_t * IL1TriggerByteStreamTool::newRodData |
( |
const EventContext & | eventContext, |
|
|
const size_t | size ) |
|
inlineprotected |
Allocate new array of raw ROD words for output ByteStream data.
Definition at line 95 of file IL1TriggerByteStreamTool.h.
95 {
97 cache->rodData.push_back(std::make_unique<uint32_t[]>(
size));
98 return cache->rodData.back().get();
99 }
size_t size() const
Number of registered mappings.
◆ 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: