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,
39 const EventContext& eventContext) override;
40
41 // Declare ROB IDs for conversion
42 virtual const std::vector<uint32_t>& robIds() const override {return m_robIds.value();}
43
44private:
45
46 // ------------------------- Private types -----------------------------------
47 // Struct holding the status words and rob/rod error flags
48 struct DataStatus {
49 bool rob_error {false};
50 bool rod_error {false};
51 uint32_t status_word {0};
52 uint32_t status_info {0};
53 };
54
55 // ------------------------- Data handles ------------------------------------
56 SG::ReadHandleKey<xAOD::CTPResult> m_inKeyCTPResult {this, "CTPResultReadKey", "", "Read handle key to CTPResult for conversion to ByteStream"};
57 SG::WriteHandleKey<xAOD::CTPResult> m_outKeyCTPResult {this, "CTPResultWriteKey", "", "Write handle key to CTPResult for conversion from ByteStream"};
58
59 // ------------------------- Other properties --------------------------------
60 Gaudi::Property<std::vector<uint32_t>> m_robIds {this, "ROBIDs", {}, "List of ROB IDs required for conversion to/from xAOD"};
61 Gaudi::Property<uint16_t> m_detEvType {this, "DetEvType", 1, "Detector event type to write when converting to ByteStream"};
62
63}; // class CTPResultByteStreamTool
64
65#endif // TRIGT1RESULTBYTESTREAM_CTPRESULTBYTESTREAMTOOL_H
static Double_t tc
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
virtual StatusCode convertToBS(std::vector< OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment * > &vrobf, const xAOD::TrigCompositeContainer *tc, const EventContext &eventContext) override
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
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.
TrigCompositeContainer_v1 TrigCompositeContainer
Declare the latest version of the container.