ATLAS Offline Software
Loading...
Searching...
No Matches
CTPResultByteStreamTool.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef TRIGT1RESULTBYTESTREAM_CTPRESULTBYTESTREAMTOOL_H
8#define TRIGT1RESULTBYTESTREAM_CTPRESULTBYTESTREAMTOOL_H
9
10// Trigger includes
13
14// Gaudi/Athena include(s):
16
21class CTPResultByteStreamTool : public extends<AthAlgTool, IL1TriggerByteStreamTool> {
22
23public:
24
25 // To use base class functions (e.g. constructor)
26 using base_class::base_class;
27
28 // ------------------------- IAlgTool methods --------------------------------
29 virtual StatusCode initialize() override;
30
31 // ------------------------- IL1TriggerByteStreamTool methods ----------------
32
33 // BS->xAOD conversion
34 virtual StatusCode convertFromBS(const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vrobf, const EventContext& eventContext) const override;
35
36 // xAOD->BS conversion
37 virtual StatusCode convertToBS(std::vector<OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment*>& vrobf, const EventContext& eventContext) override;
38
39 // Declare ROB IDs for conversion
40 virtual const std::vector<uint32_t>& robIds() const override {return m_robIds.value();}
41
42private:
43
44 // ------------------------- Private types -----------------------------------
45 // Struct holding the status words and rob/rod error flags
46 struct DataStatus {
47 bool rob_error {false};
48 bool rod_error {false};
49 uint32_t status_word {0};
50 uint32_t status_info {0};
51 };
52
53 // ------------------------- Data handles ------------------------------------
54 SG::ReadHandleKey<xAOD::CTPResult> m_inKeyCTPResult {this, "CTPResultReadKey", "", "Read handle key to CTPResult for conversion to ByteStream"};
55 SG::WriteHandleKey<xAOD::CTPResult> m_outKeyCTPResult {this, "CTPResultWriteKey", "", "Write handle key to CTPResult for conversion from ByteStream"};
56
57 // ------------------------- Other properties --------------------------------
58 Gaudi::Property<std::vector<uint32_t>> m_robIds {this, "ROBIDs", {}, "List of ROB IDs required for conversion to/from xAOD"};
59 Gaudi::Property<uint16_t> m_detEvType {this, "DetEvType", 1, "Detector event type to write when converting to ByteStream"};
60
61}; // class CTPResultByteStreamTool
62
63#endif // TRIGT1RESULTBYTESTREAM_CTPRESULTBYTESTREAMTOOL_H
Tool for converting CTP ROB from BS to xAOD::CTPResult and from xAOD::CTPResult to BS (IL1TriggerByte...
virtual StatusCode initialize() override
Gaudi::Property< uint16_t > m_detEvType
Gaudi::Property< std::vector< uint32_t > > m_robIds
SG::ReadHandleKey< xAOD::CTPResult > m_inKeyCTPResult
SG::WriteHandleKey< xAOD::CTPResult > m_outKeyCTPResult
virtual const std::vector< uint32_t > & robIds() const override
virtual StatusCode convertFromBS(const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vrobf, const EventContext &eventContext) const override
virtual StatusCode convertToBS(std::vector< OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment * > &vrobf, const EventContext &eventContext) override
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.