ATLAS Offline Software
Loading...
Searching...
No Matches
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
28class L1TopoPhase1ByteStreamTool : public extends<AthAlgTool, IL1TriggerByteStreamTool> {
29
30public:
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 }
44private:
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
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment ROBF
virtual StatusCode initialize() override
virtual StatusCode convertToBS(std::vector< OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment * > &vrobf, const EventContext &eventContext) override
xAOD->BS conversion
virtual const std::vector< uint32_t > & robIds() const override
Declare ROB IDs for conversion.
Gaudi::Property< std::vector< uint32_t > > m_robIds
virtual StatusCode convertFromBS(const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vrobf, const EventContext &eventContext) const override
BS->xAOD conversion.
virtual ~L1TopoPhase1ByteStreamTool() override=default
L1TopoPhase1ByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
SG::WriteHandleKey< xAOD::L1TopoRawDataContainer > m_topoRawWriteKey
SG::ReadHandleKey< xAOD::L1TopoRawDataContainer > m_topoRawReadKey
StatusCode convert(const ROBF *rob, const std::unique_ptr< xAOD::L1TopoRawDataContainer > &container) const
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.
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment WROBF
eformat::write::ROBFragment ROBFragment
Definition RawEvent.h:33
eformat::ROBFragment< PointerType > ROBFragment
Definition RawEvent.h:27
Simplified version of the C++20 std::span.