ATLAS Offline Software
L1TopoPhase1ByteStreamTool.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 //author: @asonay
6 //email: anil.sonay@cern.ch
7 
8 #ifndef L1TOPOPHASE1BYTESTREAMTOOL_H
9 #define L1TOPOPHASE1BYTESTREAMTOOL_H
10 
11 // Trigger includes
13 
14 // Athena includes
16 // Gaudi includes
17 #include "Gaudi/Property.h"
18 
19 //xAOD
22 
23 #include "CxxUtils/span.h"
24 
27 
28 class L1TopoPhase1ByteStreamTool : public extends<AthAlgTool, IL1TriggerByteStreamTool> {
29 
30 public:
31  L1TopoPhase1ByteStreamTool(const std::string& type, const std::string& name, const IInterface* parent);
32  virtual ~L1TopoPhase1ByteStreamTool() override = default;
33  // ------------------------- IAlgTool methods ---------------------------------
34  virtual StatusCode initialize() override;
35  // ------------------------- IL1TriggerByteStreamTool methods -----------------
37  virtual StatusCode convertFromBS(const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vrobf, const EventContext& eventContext)const override;
39  virtual StatusCode convertToBS(std::vector<OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment*>& vrobf, const EventContext& eventContext) override;
41  virtual const std::vector<uint32_t>& robIds() const override {
42  return m_robIds.value();
43  }
44 private:
45  // ------------------------- Private Methods ---------------------------------
46  StatusCode convert(const ROBF* rob, const std::unique_ptr<xAOD::L1TopoRawDataContainer> &container) const;
47 
48  // ------------------------- Properties --------------------------------------
49  // ROBIDs property required by the interface
50  Gaudi::Property<std::vector<uint32_t>> m_robIds {this, "ROBIDs", {}, "List of ROB IDs required for conversion to/from xAOD RoI"};
51 
52  // Write handle keys for the L1TopoRAWDataContainer for BS->xAOD mode of operation
53  SG::WriteHandleKey< xAOD::L1TopoRawDataContainer > m_topoRawWriteKey {this,"L1TopoPhase1RAWDataWriteContainer" ,"L1_Phase1L1TopoRAWData","Write Phase1 L1Topo RAW data"};
54 
55  // Read handle keys for the L1Calo EDMs for xAOD->BS mode of operation
56  SG::ReadHandleKey< xAOD::L1TopoRawDataContainer > m_topoRawReadKey {this,"L1TopoPhase1RAWDataReadContainer" ,"L1_Phase1L1TopoRAWData","Read Phase1 L1Topo RAW data"};
57 
58  //------------------------- Private Vars ---------------------------------------
59 
60 };
61 #endif // L1TOPOPHASE1BYTESTREAMTOOL_H
L1TopoPhase1ByteStreamTool::convert
StatusCode convert(const ROBF *rob, const std::unique_ptr< xAOD::L1TopoRawDataContainer > &container) const
Definition: L1TopoPhase1ByteStreamTool.cxx:66
L1TopoPhase1ByteStreamTool::m_topoRawWriteKey
SG::WriteHandleKey< xAOD::L1TopoRawDataContainer > m_topoRawWriteKey
Definition: L1TopoPhase1ByteStreamTool.h:53
L1TopoPhase1ByteStreamTool
Definition: L1TopoPhase1ByteStreamTool.h:28
IL1TriggerByteStreamTool.h
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
L1TopoRawDataAuxContainer.h
L1TopoPhase1ByteStreamTool::robIds
virtual const std::vector< uint32_t > & robIds() const override
Declare ROB IDs for conversion.
Definition: L1TopoPhase1ByteStreamTool.h:41
ROBF
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment ROBF
Definition: ByteStreamMergeOutputSvc.cxx:16
L1TopoRawDataContainer.h
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
span.h
Simplified version of the C++20 std::span.
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
L1TopoPhase1ByteStreamTool::m_robIds
Gaudi::Property< std::vector< uint32_t > > m_robIds
Definition: L1TopoPhase1ByteStreamTool.h:50
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
L1TopoPhase1ByteStreamTool::convertFromBS
virtual StatusCode convertFromBS(const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vrobf, const EventContext &eventContext) const override
BS->xAOD conversion.
Definition: L1TopoPhase1ByteStreamTool.cxx:41
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
eformat::ROBFragment< PointerType > ROBFragment
Definition: RawEvent.h:27
L1TopoPhase1ByteStreamTool::initialize
virtual StatusCode initialize() override
Definition: L1TopoPhase1ByteStreamTool.cxx:26
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment
eformat::write::ROBFragment ROBFragment
Definition: RawEvent.h:33
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
WROBF
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment WROBF
Definition: eFexByteStreamTool.cxx:27
L1TopoPhase1ByteStreamTool::~L1TopoPhase1ByteStreamTool
virtual ~L1TopoPhase1ByteStreamTool() override=default
L1TopoPhase1ByteStreamTool::convertToBS
virtual StatusCode convertToBS(std::vector< OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment * > &vrobf, const EventContext &eventContext) override
xAOD->BS conversion
Definition: L1TopoPhase1ByteStreamTool.cxx:62
L1TopoPhase1ByteStreamTool::L1TopoPhase1ByteStreamTool
L1TopoPhase1ByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: L1TopoPhase1ByteStreamTool.cxx:20
L1TopoPhase1ByteStreamTool::m_topoRawReadKey
SG::ReadHandleKey< xAOD::L1TopoRawDataContainer > m_topoRawReadKey
Definition: L1TopoPhase1ByteStreamTool.h:56