ATLAS Offline Software
Loading...
Searching...
No Matches
eFexByteStreamTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
25
27
30
32
33// Gaudi includes
34#include "Gaudi/Property.h"
35
40class eFexByteStreamTool : public extends<AthAlgTool, IL1TriggerByteStreamTool> {
41 public:
42 eFexByteStreamTool(const std::string& type, const std::string& name, const IInterface* parent);
43 virtual ~eFexByteStreamTool() override = default;
44
45 // ------------------------- IAlgTool methods --------------------------------
46 virtual StatusCode initialize() override;
47
48 // ------------------------- IL1TriggerByteStreamTool methods ----------------------
50 virtual StatusCode convertFromBS(const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vrobf, const EventContext& eventContext)const override;
51
53 virtual StatusCode convertToBS(std::vector<OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment*>& vrobf, const EventContext& eventContext) override;
54
56 virtual const std::vector<uint32_t>& robIds() const override {
57 return m_robIds.value();
58 }
59
60 private:
61 ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
62
65 public:
66 MonitoredLogging(const ToolHandle<GenericMonitoringTool> & tool) : m_monTool(tool) { }
67 virtual ~MonitoredLogging() = default;
68 virtual void err(const std::string& location, const std::string& title, const std::string& detail) const override;
69 ToolHandle<GenericMonitoringTool> m_monTool;
70 };
71
72 // ------------------------- Properties --------------------------------------
73 // ROBIDs property required by the interface
74 Gaudi::Property<std::vector<uint32_t>> m_robIds {this, "ROBIDs", {}, "List of ROB IDs required for conversion to/from xAOD RoI"};
75
76 // Only write keys should be set to non-empty string in python configuration if the tool is in BS->xAOD mode of operation
77 // Note that these are the keys for the triggered time slice. In multi-slice mode data from crossings
78 // before or after this will be stored in separate containers whose keys have the suffix "OutOfTime"
80 this, "eEMContainerWriteKey", "", "Write handle key to eEM TOB container for conversion from ByteStream"};
82 this, "eTAUContainerWriteKey", "", "Write handle key to eTAU TOB container for conversion from ByteStream"};
84 this, "eEMxContainerWriteKey", "", "Write handle key to eEM xTOB container for conversion from ByteStream"};
86 this, "eTAUxContainerWriteKey", "", "Write handle key to eTAU xTOB container for conversion from ByteStream"};
87 // Additional keys for multi-slice TOB readout
88 // Only decoding is implemented, encoding is not needed because simulation does not provide out-of time TOBs
90 this, "eEMSliceContainerWriteKey", "", "Write handle key to eEM TOB out-of-time container for conversion from ByteStream"};
92 this, "eTAUSliceContainerWriteKey", "", "Write handle key to eTAU TOB out-of-time container for conversion from ByteStream"};
93 // inputs (eTowers)
95 this, "eTowerContainerWriteKey", "", "Write handle key to ETower container for conversion from ByteStream"};
96
97 // Only read keys should be set to non-empty string in python configuration if the tool is in xAOD->BS mode of operation
99 this, "eEMContainerReadKey", "", "Read handle key to eEM (x)TOB container for conversion to ByteStream"};
101 this, "eTAUContainerReadKey", "", "Read handle key to eTAU (x)TOB container for conversion to ByteStream"};
102
103
104
105
106
107 std::unique_ptr<L1CaloBsDecoderRun3> m_decoder;
108
109};
110
111#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 ReadHandle is made.
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
SG::ReadHandleKey< xAOD::eFexTauRoIContainer > m_eTAUReadKey
virtual StatusCode convertFromBS(const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vrobf, const EventContext &eventContext) const override
BS->xAOD conversion.
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eEMReadKey
SG::WriteHandleKey< xAOD::eFexEMRoIContainer > m_eEMxWriteKey
eFexByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
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