ATLAS Offline Software
ExampleL1TriggerByteStreamTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGT1RESULTBYTESTREAM_EXAMPLEL1TRIGGERBYTESTREAMTOOL_H
6 #define TRIGT1RESULTBYTESTREAM_EXAMPLEL1TRIGGERBYTESTREAMTOOL_H
7 
8 // Trigger includes
11 
12 // Athena includes
14 
15 // Gaudi includes
16 #include "Gaudi/Property.h"
17 
27 class ExampleL1TriggerByteStreamTool : public extends<AthAlgTool, IL1TriggerByteStreamTool> {
28 public:
29  ExampleL1TriggerByteStreamTool(const std::string& type, const std::string& name, const IInterface* parent);
30  virtual ~ExampleL1TriggerByteStreamTool() override = default;
31 
32  // ------------------------- IAlgTool methods --------------------------------
33  virtual StatusCode initialize() override;
34 
35  // ------------------------- IL1TriggerByteStreamTool methods ----------------
37  virtual StatusCode convertFromBS(const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vrobf,
38  const EventContext& eventContext) const override;
40  virtual StatusCode convertToBS(std::vector<OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment*>& vrobf,
41  const EventContext& eventContext) override;
43  virtual const std::vector<uint32_t>& robIds() const override {return m_robIds.value();}
44 
45 private:
46  // ------------------------- Properties --------------------------------------
47  // ROBIDs property required by the interface
48  Gaudi::Property<std::vector<uint32_t>> m_robIds {
49  this, "ROBIDs", {}, "List of ROB IDs required for conversion to/from xAOD RoI"};
50 
51  // Only write key should be set to non-empty string in python configuration if the tool is in BS->xAOD mode of operation
53  this, "MuonRoIContainerWriteKey", "", "Write handle key to MuonRoIContainer for conversion from ByteStream"};
54  // Only read key should be set to non-empty string in python configuration if the tool is in xAOD->BS mode of operation
56  this, "MuonRoIContainerReadKey", "", "Read handle key to MuonRoIContainer for conversion to ByteStream"};
57 
58 };
59 
60 #endif // TRIGT1RESULTBYTESTREAM_EXAMPLEL1TRIGGERBYTESTREAMTOOL_H
MuonRoIContainer.h
ExampleL1TriggerByteStreamTool::~ExampleL1TriggerByteStreamTool
virtual ~ExampleL1TriggerByteStreamTool() override=default
IL1TriggerByteStreamTool.h
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
ExampleL1TriggerByteStreamTool::m_roiReadKey
SG::ReadHandleKey< xAOD::MuonRoIContainer > m_roiReadKey
Definition: ExampleL1TriggerByteStreamTool.h:55
ExampleL1TriggerByteStreamTool::initialize
virtual StatusCode initialize() override
Definition: ExampleL1TriggerByteStreamTool.cxx:26
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ExampleL1TriggerByteStreamTool::m_roiWriteKey
SG::WriteHandleKey< xAOD::MuonRoIContainer > m_roiWriteKey
Definition: ExampleL1TriggerByteStreamTool.h:52
ExampleL1TriggerByteStreamTool::ExampleL1TriggerByteStreamTool
ExampleL1TriggerByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: ExampleL1TriggerByteStreamTool.cxx:21
ExampleL1TriggerByteStreamTool::robIds
virtual const std::vector< uint32_t > & robIds() const override
Declare ROB IDs for conversion.
Definition: ExampleL1TriggerByteStreamTool.h:43
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ExampleL1TriggerByteStreamTool::convertFromBS
virtual StatusCode convertFromBS(const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vrobf, const EventContext &eventContext) const override
BS->xAOD conversion.
Definition: ExampleL1TriggerByteStreamTool.cxx:37
ExampleL1TriggerByteStreamTool::convertToBS
virtual StatusCode convertToBS(std::vector< OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment * > &vrobf, const EventContext &eventContext) override
xAOD->BS conversion
Definition: ExampleL1TriggerByteStreamTool.cxx:79
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ExampleL1TriggerByteStreamTool
Example implementation of a tool for L1 RoI conversion from BS to xAOD and from xAOD to BS (IL1Trigge...
Definition: ExampleL1TriggerByteStreamTool.h:27
ExampleL1TriggerByteStreamTool::m_robIds
Gaudi::Property< std::vector< uint32_t > > m_robIds
Definition: ExampleL1TriggerByteStreamTool.h:48