ATLAS Offline Software
Loading...
Searching...
No Matches
eFexByteStreamTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5//***************************************************************************
6// eFexByteStreamTool - description
7// -------------------
8// begin : 11 05 2022
9// email : will@cern.ch
10// ***************************************************************************/
11
12#ifndef EFEXBYTESTREAMTOOL_H
13#define EFEXBYTESTREAMTOOL_H
14
15
16
17// Trigger includes
19
20// Athena includes
22
26
28
30
31// Gaudi includes
32#include "Gaudi/Property.h"
33
34#include <cstdint>
35#include <vector>
36#include <memory>
37
42class eFexByteStreamTool : public extends<AthAlgTool, IL1TriggerByteStreamTool> {
43 public:
44 eFexByteStreamTool(const std::string& type, const std::string& name, const IInterface* parent);
45 virtual ~eFexByteStreamTool() override = default;
46
47 // ------------------------- IAlgTool methods --------------------------------
48 virtual StatusCode initialize() override;
49
50 // ------------------------- IL1TriggerByteStreamTool methods ----------------------
52 virtual StatusCode convertFromBS(const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vrobf, const EventContext& eventContext)const override;
53
55 virtual StatusCode convertToBS(std::vector<OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment*>& vrobf, const EventContext& eventContext) override;
56
58 virtual const std::vector<uint32_t>& robIds() const override {
59 return m_robIds.value();
60 }
61
62 private:
63 ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
64
67 public:
68 MonitoredLogging(const ToolHandle<GenericMonitoringTool> & tool) : m_monTool(tool) { }
69 virtual ~MonitoredLogging() = default;
70 virtual void err(const std::string& location, const std::string& title, const std::string& detail) const override;
71 ToolHandle<GenericMonitoringTool> m_monTool;
72 };
73
74 // ------------------------- Properties --------------------------------------
75 // ROBIDs property required by the interface
76 Gaudi::Property<std::vector<uint32_t>> m_robIds {this, "ROBIDs", {}, "List of ROB IDs required for conversion to/from xAOD RoI"};
77
78 // Only write keys should be set to non-empty string in python configuration if the tool is in BS->xAOD mode of operation
79 // Note that these are the keys for the triggered time slice. In multi-slice mode data from crossings
80 // before or after this will be stored in separate containers whose keys have the suffix "OutOfTime"
82 this, "eEMContainerWriteKey", "", "Write handle key to eEM TOB container for conversion from ByteStream"};
84 this, "eTAUContainerWriteKey", "", "Write handle key to eTAU TOB container for conversion from ByteStream"};
86 this, "eEMxContainerWriteKey", "", "Write handle key to eEM xTOB container for conversion from ByteStream"};
88 this, "eTAUxContainerWriteKey", "", "Write handle key to eTAU xTOB container for conversion from ByteStream"};
89 // Additional keys for multi-slice TOB readout
90 // Only decoding is implemented, encoding is not needed because simulation does not provide out-of time TOBs
92 this, "eEMSliceContainerWriteKey", "", "Write handle key to eEM TOB out-of-time container for conversion from ByteStream"};
94 this, "eTAUSliceContainerWriteKey", "", "Write handle key to eTAU TOB out-of-time container for conversion from ByteStream"};
95 // inputs (eTowers)
97 this, "eTowerContainerWriteKey", "", "Write handle key to ETower container for conversion from ByteStream"};
98
99 // Only read keys should be set to non-empty string in python configuration if the tool is in xAOD->BS mode of operation
101 this, "eEMContainerReadKeys", {}, "Read handle keys to eEM (x)TOB containers for conversion to ByteStream"};
103 this, "eTAUContainerReadKeys", {}, "Read handle keys to eTAU (x)TOB containers for conversion to ByteStream"};
104
105
106
107
108
109 std::unique_ptr<L1CaloBsDecoderRun3> m_decoder;
110
111};
112
113#endif // EFEXBYTESTREAMTOOL_H
Header file to be included by clients of the Monitored infrastructure.
Interface class for logging, can be overriden to e.g.
Property holding a SG store/key/clid from which a WriteHandle is made.
MonitoredLogging(const ToolHandle< GenericMonitoringTool > &tool)
ToolHandle< GenericMonitoringTool > m_monTool
virtual void err(const std::string &location, const std::string &title, const std::string &detail) const override
Gaudi::Property< std::vector< uint32_t > > m_robIds
SG::WriteHandleKey< xAOD::eFexTowerContainer > m_eTowerWriteKey
SG::WriteHandleKey< xAOD::eFexTauRoIContainer > m_eTAUxWriteKey
SG::WriteHandleKey< xAOD::eFexTauRoIContainer > m_eTAUWriteKey
std::unique_ptr< L1CaloBsDecoderRun3 > m_decoder
virtual StatusCode convertToBS(std::vector< OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment * > &vrobf, const EventContext &eventContext) override
xAOD->BS conversion
virtual StatusCode convertFromBS(const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vrobf, const EventContext &eventContext) const override
BS->xAOD conversion.
SG::ReadHandleKeyArray< xAOD::eFexTauRoIContainer > m_eTAUReadKeys
SG::WriteHandleKey< xAOD::eFexEMRoIContainer > m_eEMxWriteKey
eFexByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
SG::ReadHandleKeyArray< xAOD::eFexEMRoIContainer > m_eEMReadKeys
virtual ~eFexByteStreamTool() override=default
SG::WriteHandleKey< xAOD::eFexEMRoIContainer > m_eEMSliceWriteKey
SG::WriteHandleKey< xAOD::eFexTauRoIContainer > m_eTAUSliceWriteKey
ToolHandle< GenericMonitoringTool > m_monTool
virtual StatusCode initialize() override
virtual const std::vector< uint32_t > & robIds() const override
Declare ROB IDs for conversion.
SG::WriteHandleKey< xAOD::eFexEMRoIContainer > m_eEMWriteKey
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray