ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
L1CaloFEX
L1CaloFEXByteStream
src
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
18
#include "
TrigT1ResultByteStream/IL1TriggerByteStreamTool.h
"
19
20
// Athena includes
21
#include "
AthenaBaseComps/AthAlgTool.h
"
22
23
#include "
xAODTrigger/eFexEMRoIContainer.h
"
24
#include "
xAODTrigger/eFexTauRoIContainer.h
"
25
#include "
xAODTrigL1Calo/eFexTowerContainer.h
"
26
27
#include "
bytestreamDecoder/L1CaloBsDecoderRun3.h
"
28
29
#include "
AthenaMonitoringKernel/Monitored.h
"
30
31
// Gaudi includes
32
#include "Gaudi/Property.h"
33
34
#include <cstdint>
35
#include <vector>
36
#include <memory>
37
42
class
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,
56
const
xAOD::TrigCompositeContainer
*
tc
,
57
const
EventContext& eventContext)
override
;
58
60
virtual
const
std::vector<uint32_t>&
robIds
()
const override
{
61
return
m_robIds
.value();
62
}
63
64
private
:
65
ToolHandle<GenericMonitoringTool>
m_monTool
{
this
,
"MonTool"
,
""
,
"Monitoring tool"
};
66
68
class
MonitoredLogging
:
public
L1CaloBsDecoderRun3::Logging
{
69
public
:
70
MonitoredLogging
(
const
ToolHandle<GenericMonitoringTool> & tool) :
m_monTool
(tool) { }
71
virtual
~MonitoredLogging
() =
default
;
72
virtual
void
err
(
const
std::string& location,
const
std::string& title,
const
std::string&
detail
)
const override
;
73
ToolHandle<GenericMonitoringTool>
m_monTool
;
74
};
75
76
// ------------------------- Properties --------------------------------------
77
// ROBIDs property required by the interface
78
Gaudi::Property<std::vector<uint32_t>>
m_robIds
{
this
,
"ROBIDs"
, {},
"List of ROB IDs required for conversion to/from xAOD RoI"
};
79
80
// Only write keys should be set to non-empty string in python configuration if the tool is in BS->xAOD mode of operation
81
// Note that these are the keys for the triggered time slice. In multi-slice mode data from crossings
82
// before or after this will be stored in separate containers whose keys have the suffix "OutOfTime"
83
SG::WriteHandleKey<xAOD::eFexEMRoIContainer>
m_eEMWriteKey
{
84
this
,
"eEMContainerWriteKey"
,
""
,
"Write handle key to eEM TOB container for conversion from ByteStream"
};
85
SG::WriteHandleKey<xAOD::eFexTauRoIContainer>
m_eTAUWriteKey
{
86
this
,
"eTAUContainerWriteKey"
,
""
,
"Write handle key to eTAU TOB container for conversion from ByteStream"
};
87
SG::WriteHandleKey<xAOD::eFexEMRoIContainer>
m_eEMxWriteKey
{
88
this
,
"eEMxContainerWriteKey"
,
""
,
"Write handle key to eEM xTOB container for conversion from ByteStream"
};
89
SG::WriteHandleKey<xAOD::eFexTauRoIContainer>
m_eTAUxWriteKey
{
90
this
,
"eTAUxContainerWriteKey"
,
""
,
"Write handle key to eTAU xTOB container for conversion from ByteStream"
};
91
// Additional keys for multi-slice TOB readout
92
// Only decoding is implemented, encoding is not needed because simulation does not provide out-of time TOBs
93
SG::WriteHandleKey<xAOD::eFexEMRoIContainer>
m_eEMSliceWriteKey
{
94
this
,
"eEMSliceContainerWriteKey"
,
""
,
"Write handle key to eEM TOB out-of-time container for conversion from ByteStream"
};
95
SG::WriteHandleKey<xAOD::eFexTauRoIContainer>
m_eTAUSliceWriteKey
{
96
this
,
"eTAUSliceContainerWriteKey"
,
""
,
"Write handle key to eTAU TOB out-of-time container for conversion from ByteStream"
};
97
// inputs (eTowers)
98
SG::WriteHandleKey<xAOD::eFexTowerContainer>
m_eTowerWriteKey
{
99
this
,
"eTowerContainerWriteKey"
,
""
,
"Write handle key to ETower container for conversion from ByteStream"
};
100
101
102
std::unique_ptr<L1CaloBsDecoderRun3>
m_decoder
;
103
104
};
105
106
#endif
// EFEXBYTESTREAMTOOL_H
AthAlgTool.h
IL1TriggerByteStreamTool.h
L1CaloBsDecoderRun3.h
tc
static Double_t tc
Definition
LArPhysWaveHECTool.cxx:38
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
L1CaloBsDecoderRun3::Logging
Interface class for logging, can be overriden to e.g.
Definition
L1CaloBsDecoderRun3.h:31
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
eFexByteStreamTool::MonitoredLogging::MonitoredLogging
MonitoredLogging(const ToolHandle< GenericMonitoringTool > &tool)
Definition
eFexByteStreamTool.h:70
eFexByteStreamTool::MonitoredLogging::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition
eFexByteStreamTool.h:73
eFexByteStreamTool::MonitoredLogging::err
virtual void err(const std::string &location, const std::string &title, const std::string &detail) const override
Definition
eFexByteStreamTool.cxx:84
eFexByteStreamTool::MonitoredLogging::~MonitoredLogging
virtual ~MonitoredLogging()=default
eFexByteStreamTool::m_robIds
Gaudi::Property< std::vector< uint32_t > > m_robIds
Definition
eFexByteStreamTool.h:78
eFexByteStreamTool::m_eTowerWriteKey
SG::WriteHandleKey< xAOD::eFexTowerContainer > m_eTowerWriteKey
Definition
eFexByteStreamTool.h:98
eFexByteStreamTool::m_eTAUxWriteKey
SG::WriteHandleKey< xAOD::eFexTauRoIContainer > m_eTAUxWriteKey
Definition
eFexByteStreamTool.h:89
eFexByteStreamTool::m_eTAUWriteKey
SG::WriteHandleKey< xAOD::eFexTauRoIContainer > m_eTAUWriteKey
Definition
eFexByteStreamTool.h:85
eFexByteStreamTool::m_decoder
std::unique_ptr< L1CaloBsDecoderRun3 > m_decoder
Definition
eFexByteStreamTool.h:102
eFexByteStreamTool::convertFromBS
virtual StatusCode convertFromBS(const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vrobf, const EventContext &eventContext) const override
BS->xAOD conversion.
Definition
eFexByteStreamTool.cxx:97
eFexByteStreamTool::m_eEMxWriteKey
SG::WriteHandleKey< xAOD::eFexEMRoIContainer > m_eEMxWriteKey
Definition
eFexByteStreamTool.h:87
eFexByteStreamTool::eFexByteStreamTool
eFexByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
eFexByteStreamTool.cxx:47
eFexByteStreamTool::~eFexByteStreamTool
virtual ~eFexByteStreamTool() override=default
eFexByteStreamTool::convertToBS
virtual StatusCode convertToBS(std::vector< OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment * > &vrobf, const xAOD::TrigCompositeContainer *tc, const EventContext &eventContext) override
xAOD->BS conversion: reads the RoI containers reachable via the TrigCompositeContainer.
Definition
eFexByteStreamTool.cxx:390
eFexByteStreamTool::m_eEMSliceWriteKey
SG::WriteHandleKey< xAOD::eFexEMRoIContainer > m_eEMSliceWriteKey
Definition
eFexByteStreamTool.h:93
eFexByteStreamTool::m_eTAUSliceWriteKey
SG::WriteHandleKey< xAOD::eFexTauRoIContainer > m_eTAUSliceWriteKey
Definition
eFexByteStreamTool.h:95
eFexByteStreamTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition
eFexByteStreamTool.h:65
eFexByteStreamTool::initialize
virtual StatusCode initialize() override
Definition
eFexByteStreamTool.cxx:52
eFexByteStreamTool::robIds
virtual const std::vector< uint32_t > & robIds() const override
Declare ROB IDs for conversion.
Definition
eFexByteStreamTool.h:60
eFexByteStreamTool::m_eEMWriteKey
SG::WriteHandleKey< xAOD::eFexEMRoIContainer > m_eEMWriteKey
Definition
eFexByteStreamTool.h:83
eFexEMRoIContainer.h
eFexTauRoIContainer.h
eFexTowerContainer.h
detail
Definition
extract_histogram_tag.cxx:14
xAOD::TrigCompositeContainer
TrigCompositeContainer_v1 TrigCompositeContainer
Declare the latest version of the container.
Definition
TrigCompositeContainer.h:17
type
Generated on
for ATLAS Offline Software by
1.17.0