ATLAS Offline Software
L1TriggerByteStreamDecoderAlg.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 #ifndef TRIGT1RESULTBYTESTREAM_L1TRIGGERBYTESTREAMDECODERALG_H
6 #define TRIGT1RESULTBYTESTREAM_L1TRIGGERBYTESTREAMDECODERALG_H
7 
8 // Trigger includes
10 
11 // Athena includes
16 
21 public:
23  L1TriggerByteStreamDecoderAlg(const std::string& name, ISvcLocator* svcLoc);
24 
25  // ------------------------- AthReentrantAlgorithm methods -------------------
26  virtual StatusCode initialize() override;
27  virtual StatusCode start() override;
28  virtual StatusCode finalize() override;
29  virtual StatusCode execute(const EventContext& eventContext) const override;
30 
31 private:
32  // ------------------------- Tool/Service handles ----------------------------
34  ToolHandleArray<IL1TriggerByteStreamTool> m_decoderTools {
35  this, "DecoderTools", {}, "Array of tools performing the decoding work"};
38  this, "ROBDataProviderSvc", "ROBDataProviderSvc", "ROB data provider"};
40  ToolHandle<GenericMonitoringTool> m_monTool{
41  this, "MonTool", "", "Monitoring tool"};
42 
43  // ------------------------- Properties --------------------------------------
46  this, "ByteStreamMetadataRHKey", "InputMetaDataStore+ByteStreamMetadata",
47  "Key of the ByteStreamMetadataContainer to retrieve the detector mask"
48  };
50  Gaudi::Property<std::vector<uint32_t>> m_maybeMissingRobsProp {
51  this, "MaybeMissingROBs", {},
52  "List of ROB IDs allowed to be missing. If a decoder tool requests one of these "
53  "and it is not available in the event, no errors will be reported",
54  "appendList<T>"
55  };
57  Gaudi::Property<std::string> m_robStatusCheckLevel {
58  this, "ROBStatusCheckLevel", "Warning",
59  "ROB status word check behaviour. Can be 'None' - status is not checked, 'Warning' - only print warnings "
60  "for non-zero status, 'Error' - only print errors for non-zero status, 'Fatal' - return FAILURE "
61  "from the algorithm if non-zero status is found. MaybeMissingROBs are always exempt from this check."
62  };
64  Gaudi::Property<std::string> m_robFormatCheckLevel {
65  this, "ROBFormatCheckLevel", "Fatal",
66  "ROB format (data consistency) check behaviour. Can be 'None' - format is not checked, 'Warning' - only print warnings "
67  "for corrupted data, 'Error' - only print errors for corrupted data, 'Fatal' - return FAILURE "
68  "from the algorithm if corrupted data are found. MaybeMissingROBs are always exempt from this check."
69  };
70 
71  // ------------------------- Helper methods ----------------------------------
83  const std::vector<uint32_t>& ids,
84  std::string_view toolName,
85  const EventContext& eventContext) const;
87  StatusCode checkRobs(const IROBDataProviderSvc::VROBFRAG& robs, std::string_view toolName, const EventContext& eventContext) const;
88 
89  // ------------------------- Other private members ---------------------------
91  std::vector<uint32_t> m_robIds;
93  std::set<uint32_t> m_maybeMissingRobs;
98 };
99 
100 #endif // TRIGT1RESULTBYTESTREAM_L1TRIGGERBYTESTREAMDECODERALG_H
L1TriggerByteStreamDecoderAlg::ROBCheckBehaviour::Undefined
@ Undefined
L1TriggerByteStreamDecoderAlg::L1TriggerByteStreamDecoderAlg
L1TriggerByteStreamDecoderAlg(const std::string &name, ISvcLocator *svcLoc)
Standard constructor.
Definition: L1TriggerByteStreamDecoderAlg.cxx:70
L1TriggerByteStreamDecoderAlg::execute
virtual StatusCode execute(const EventContext &eventContext) const override
Definition: L1TriggerByteStreamDecoderAlg.cxx:160
L1TriggerByteStreamDecoderAlg::ROBCheckBehaviour::Warning
@ Warning
L1TriggerByteStreamDecoderAlg::m_robStatusCheck
ROBCheckBehaviour m_robStatusCheck
Definition: L1TriggerByteStreamDecoderAlg.h:96
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
ByteStreamMetadataContainer.h
This file contains the class definition for the ByteStreamMetadataContainer class.
IL1TriggerByteStreamTool.h
L1TriggerByteStreamDecoderAlg::ROBCheckBehaviour::Error
@ Error
SG::ReadHandleKey< ByteStreamMetadataContainer >
L1TriggerByteStreamDecoderAlg::m_bsMetaDataContRHKey
SG::ReadHandleKey< ByteStreamMetadataContainer > m_bsMetaDataContRHKey
StoreGate key for the ByteStreamMetadata container to retrieve detector mask.
Definition: L1TriggerByteStreamDecoderAlg.h:45
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
L1TriggerByteStreamDecoderAlg::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Monitoring tool to create online histograms.
Definition: L1TriggerByteStreamDecoderAlg.h:40
L1TriggerByteStreamDecoderAlg::m_decoderTools
ToolHandleArray< IL1TriggerByteStreamTool > m_decoderTools
Tool performing the decoding work.
Definition: L1TriggerByteStreamDecoderAlg.h:34
L1TriggerByteStreamDecoderAlg::m_robStatusCheckLevel
Gaudi::Property< std::string > m_robStatusCheckLevel
Set behaviour for non-zero ROB status words.
Definition: L1TriggerByteStreamDecoderAlg.h:57
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
python.HLT.CommonSequences.EventBuildingSequences.robs
robs
Definition: EventBuildingSequences.py:400
L1TriggerByteStreamDecoderAlg::initialize
virtual StatusCode initialize() override
Definition: L1TriggerByteStreamDecoderAlg.cxx:76
L1TriggerByteStreamDecoderAlg::finalize
virtual StatusCode finalize() override
Definition: L1TriggerByteStreamDecoderAlg.cxx:150
L1TriggerByteStreamDecoderAlg::m_maybeMissingRobs
std::set< uint32_t > m_maybeMissingRobs
Set of ROB IDs allowed to be missing because they are disabled.
Definition: L1TriggerByteStreamDecoderAlg.h:93
IROBDataProviderSvc::VROBFRAG
std::vector< const ROBF * > VROBFRAG
Definition: IROBDataProviderSvc.h:29
L1TriggerByteStreamDecoderAlg::m_robDataProviderSvc
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc
ROBDataProvider service handle.
Definition: L1TriggerByteStreamDecoderAlg.h:37
L1TriggerByteStreamDecoderAlg::m_robFormatCheckLevel
Gaudi::Property< std::string > m_robFormatCheckLevel
Set behaviour for corrupted ROB data.
Definition: L1TriggerByteStreamDecoderAlg.h:64
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
AthReentrantAlgorithm.h
L1TriggerByteStreamDecoderAlg::start
virtual StatusCode start() override
Definition: L1TriggerByteStreamDecoderAlg.cxx:119
L1TriggerByteStreamDecoderAlg::ROBCheckBehaviour
ROBCheckBehaviour
The behaviour for non-zero ROB status words.
Definition: L1TriggerByteStreamDecoderAlg.h:95
L1TriggerByteStreamDecoderAlg::filterRobs
StatusCode filterRobs(const IROBDataProviderSvc::VROBFRAG &in, IROBDataProviderSvc::VROBFRAG &out, const std::vector< uint32_t > &ids, std::string_view toolName, const EventContext &eventContext) const
Copy over ROBFragment pointers from in to out for ROBs with IDs from the ids list.
Definition: L1TriggerByteStreamDecoderAlg.cxx:192
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
L1TriggerByteStreamDecoderAlg::m_robFormatCheck
ROBCheckBehaviour m_robFormatCheck
Definition: L1TriggerByteStreamDecoderAlg.h:97
L1TriggerByteStreamDecoderAlg::ROBCheckBehaviour::None
@ None
L1TriggerByteStreamDecoderAlg
Algorithm calling tools to convert L1 ByteStream into xAOD collections.
Definition: L1TriggerByteStreamDecoderAlg.h:20
L1TriggerByteStreamDecoderAlg::m_robIds
std::vector< uint32_t > m_robIds
Vector of ROB IDs to request, filled from all decoder tools in initialize.
Definition: L1TriggerByteStreamDecoderAlg.h:91
L1TriggerByteStreamDecoderAlg::m_maybeMissingRobsProp
Gaudi::Property< std::vector< uint32_t > > m_maybeMissingRobsProp
Allow some ROBs to be missing.
Definition: L1TriggerByteStreamDecoderAlg.h:50
L1TriggerByteStreamDecoderAlg::checkRobs
StatusCode checkRobs(const IROBDataProviderSvc::VROBFRAG &robs, std::string_view toolName, const EventContext &eventContext) const
Check ROB status word and report if different from zero.
Definition: L1TriggerByteStreamDecoderAlg.cxx:239
IROBDataProviderSvc.h
L1TriggerByteStreamDecoderAlg::ROBCheckBehaviour::Fatal
@ Fatal
ServiceHandle< IROBDataProviderSvc >