![]() |
ATLAS Offline Software
|
Interface for AlgTools converting ByteStream to xAOD RoI objects and vice versa. More...
#include <IL1TriggerByteStreamTool.h>
Classes | |
| struct | Cache |
| Cache which tracks memory allocated for ByteStream data representation in the convertToBS method. More... | |
Public Member Functions | |
| DeclareInterfaceID (IL1TriggerByteStreamTool, 1, 0) | |
| virtual | ~IL1TriggerByteStreamTool () override=default |
| virtual StatusCode | convertFromBS (const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vrobf, const EventContext &eventContext) const =0 |
| Convert BS -> xAOD. | |
| virtual StatusCode | convertToBS (std::vector< OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment * > &vrobf, const xAOD::TrigCompositeContainer *tc, const EventContext &eventContext)=0 |
| Convert xAOD -> BS. | |
| virtual const std::vector< uint32_t > & | robIds () const =0 |
| List of IDs of ROBs which the convert methods expect in the vrobf input/output parameter. | |
Protected Types | |
| enum class | ConversionMode { Undefined , Decoding , Encoding } |
| Enum defining conversion mode. More... | |
Protected Member Functions | |
| template<typename RHK, typename WHK> | |
| ConversionMode | getConversionMode (const RHK &readHandleKeys, const WHK &writeHandleKeys, MsgStream &msg) |
| Helper to find out the conversion mode based on configured data handles. | |
| void | clearCache (const EventContext &eventContext) |
| Helper to clear the ByteStream data cache for a given event slot. | |
| uint32_t * | newRodData (const EventContext &eventContext, const size_t size) |
| Allocate new array of raw ROD words for output ByteStream data. | |
| OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment * | newRobFragment (const EventContext &eventContext, uint32_t source_id, uint32_t ndata, const uint32_t *data, uint32_t detev_type=0, uint32_t status_position=eformat::STATUS_BACK) |
| Allocate new ROBFragment for output ByteStream data. | |
Private Attributes | |
| SG::SlotSpecificObj< Cache > | m_cache |
Interface for AlgTools converting ByteStream to xAOD RoI objects and vice versa.
Definition at line 26 of file IL1TriggerByteStreamTool.h.
|
strongprotected |
Enum defining conversion mode.
| Enumerator | |
|---|---|
| Undefined | |
| Decoding | = BS->xAOD |
| Encoding | = xAOD->BS |
Definition at line 69 of file IL1TriggerByteStreamTool.h.
|
overridevirtualdefault |
|
inlineprotected |
Helper to clear the ByteStream data cache for a given event slot.
Definition at line 91 of file IL1TriggerByteStreamTool.h.
|
pure virtual |
|
pure virtual |
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.
| IL1TriggerByteStreamTool::DeclareInterfaceID | ( | IL1TriggerByteStreamTool | , |
| 1 | , | ||
| 0 | ) |
|
inlineprotected |
Helper to find out the conversion mode based on configured data handles.
Definition at line 72 of file IL1TriggerByteStreamTool.h.
|
inlineprotected |
Allocate new ROBFragment for output ByteStream data.
Definition at line 101 of file IL1TriggerByteStreamTool.h.
|
inlineprotected |
Allocate new array of raw ROD words for output ByteStream data.
Definition at line 95 of file IL1TriggerByteStreamTool.h.
|
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.
|
private |
Definition at line 142 of file IL1TriggerByteStreamTool.h.