ATLAS Offline Software
Loading...
Searching...
No Matches
L1TriggerByteStreamDecoderAlg Class Reference

Algorithm calling tools to convert L1 ByteStream into xAOD collections. More...

#include <L1TriggerByteStreamDecoderAlg.h>

Inheritance diagram for L1TriggerByteStreamDecoderAlg:
Collaboration diagram for L1TriggerByteStreamDecoderAlg:

Public Member Functions

 L1TriggerByteStreamDecoderAlg (const std::string &name, ISvcLocator *svcLoc)
 Standard constructor.
virtual StatusCode initialize () override
virtual StatusCode start () override
virtual StatusCode finalize () override
virtual StatusCode execute (const EventContext &eventContext) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

enum class  ROBCheckBehaviour {
  Undefined =-1 , None , Warning , Error ,
  Fatal
}
 The behaviour for non-zero ROB status words. More...
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

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.
StatusCode checkRobs (const IROBDataProviderSvc::VROBFRAG &robs, std::string_view toolName, const EventContext &eventContext) const
 Check ROB status word and report if different from zero.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandleArray< IL1TriggerByteStreamToolm_decoderTools
 Tool performing the decoding work.
ServiceHandle< IROBDataProviderSvcm_robDataProviderSvc
 ROBDataProvider service handle.
ToolHandle< GenericMonitoringToolm_monTool
 Monitoring tool to create online histograms.
SG::ReadHandleKey< ByteStreamMetadataContainerm_bsMetaDataContRHKey
 StoreGate key for the ByteStreamMetadata container to retrieve detector mask.
Gaudi::Property< std::vector< uint32_t > > m_maybeMissingRobsProp
 Allow some ROBs to be missing.
Gaudi::Property< std::string > m_robStatusCheckLevel
 Set behaviour for non-zero ROB status words.
Gaudi::Property< std::string > m_robFormatCheckLevel
 Set behaviour for corrupted ROB data.
std::vector< uint32_t > m_robIds
 Vector of ROB IDs to request, filled from all decoder tools in initialize.
std::set< uint32_t > m_maybeMissingRobs
 Set of ROB IDs allowed to be missing because they are disabled.
ROBCheckBehaviour m_robStatusCheck {ROBCheckBehaviour::Undefined}
ROBCheckBehaviour m_robFormatCheck {ROBCheckBehaviour::Undefined}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Algorithm calling tools to convert L1 ByteStream into xAOD collections.

Definition at line 20 of file L1TriggerByteStreamDecoderAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ ROBCheckBehaviour

The behaviour for non-zero ROB status words.

Enumerator
Undefined 
None 
Warning 
Error 
Fatal 

Definition at line 95 of file L1TriggerByteStreamDecoderAlg.h.

95{Undefined=-1, None, Warning, Error, Fatal};
@ Undefined
@ None
Error
The different types of error that can be flagged in the L1TopoRDO.
Definition Error.h:16
@ Fatal
Definition ZDCMsg.h:23

Constructor & Destructor Documentation

◆ L1TriggerByteStreamDecoderAlg()

L1TriggerByteStreamDecoderAlg::L1TriggerByteStreamDecoderAlg ( const std::string & name,
ISvcLocator * svcLoc )

Standard constructor.

Definition at line 70 of file L1TriggerByteStreamDecoderAlg.cxx.

71: AthReentrantAlgorithm(name, svcLoc) {}

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ checkRobs()

StatusCode L1TriggerByteStreamDecoderAlg::checkRobs ( const IROBDataProviderSvc::VROBFRAG & robs,
std::string_view toolName,
const EventContext & eventContext ) const
private

Check ROB status word and report if different from zero.

Definition at line 239 of file L1TriggerByteStreamDecoderAlg.cxx.

241 {
242 StatusCode sc{StatusCode::SUCCESS};
244 return sc;
245 }
246 std::string corruptedFractionName{"CorruptedROBFraction_"};
247 std::string errorFractionName{"ErroneousROBFraction_"};
248 corruptedFractionName.append(toolName);
249 errorFractionName.append(toolName);
250 FractionPerLBNMonitor monCorruptedFraction{std::move(corruptedFractionName), eventContext.eventID().lumi_block(), static_cast<float>(robs.size()), m_monTool};
251 FractionPerLBNMonitor monErrorFraction{std::move(errorFractionName), eventContext.eventID().lumi_block(), static_cast<float>(robs.size()), m_monTool};
252 auto printCheckMsg = [this](std::ostringstream& ss, ROBCheckBehaviour checkBehaviour, bool maybeMissing, StatusCode& sc) {
253 if (maybeMissing) {
254 ss << " but it is allowed due to the detector mask or the " << m_maybeMissingRobsProp.name() << " property";
255 ATH_MSG_DEBUG(ss.str());
256 }
257 else if (checkBehaviour==ROBCheckBehaviour::Warning) {ATH_MSG_WARNING(ss.str());}
258 else if (checkBehaviour==ROBCheckBehaviour::Error) {ATH_MSG_ERROR(ss.str());}
259 else if (checkBehaviour==ROBCheckBehaviour::Fatal) {
260 ATH_MSG_ERROR(ss.str());
261 sc = StatusCode::FAILURE;
262 }
263 };
264
265 for (const IROBDataProviderSvc::ROBF* rob : robs) {
266 // Format check
267 if (m_robFormatCheck!=ROBCheckBehaviour::None && !rob->check_noex()) {
268 ++monCorruptedFraction;
269 const uint32_t id{rob->rob_source_id()}; // there's a small chance ID is also corrupted, but usually corruption affects latter words
270 std::string hexRobId = u32toHexString(id);
271 const bool maybeMissing{std::find(m_maybeMissingRobs.cbegin(),m_maybeMissingRobs.cend(),id) != m_maybeMissingRobs.cend()};
272
273 Monitored::Scalar<std::string> monCorrupted{(maybeMissing ? "CorruptedROBAllowed" : "CorruptedROB"), hexRobId};
274 Monitored::Group{m_monTool, monCorrupted};
275
276 std::ostringstream ss;
277 ss << "ROBFragment with ID " << hexRobId << " (" << eformat::helper::SourceIdentifier(id).human()
278 << ") requested by " << toolName << " has corrupted data with ";
279 printRobProblems(ss, rob);
280 printCheckMsg(ss, m_robFormatCheck, maybeMissing, sc);
281 }
282 // Status check
283 if (m_robStatusCheck!=ROBCheckBehaviour::None && rob->nstatus()>0 && rob->status()[0]!=0) {
284 ++monErrorFraction;
285 const uint32_t id{rob->rob_source_id()};
286 std::string hexRobId = u32toHexString(id);
287 const bool maybeMissing{std::find(m_maybeMissingRobs.cbegin(),m_maybeMissingRobs.cend(),id) != m_maybeMissingRobs.cend()};
288
289 Monitored::Scalar<std::string> monErroneous{(maybeMissing ? "ErroneousROBAllowed" : "ErroneousROB"), hexRobId};
290 Monitored::Group{m_monTool, monErroneous};
291
292 std::ostringstream ss;
293 ss << "ROBFragment with ID " << hexRobId << " (" << eformat::helper::SourceIdentifier(id).human()
294 << ") requested by " << toolName << " has non-zero status 0x" << std::hex << rob->status()[0] << std::dec;
295 printCheckMsg(ss, m_robStatusCheck, maybeMissing, sc);
296 }
297 }
298 return sc;
299}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
static Double_t ss
static Double_t sc
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment ROBF
std::set< uint32_t > m_maybeMissingRobs
Set of ROB IDs allowed to be missing because they are disabled.
ROBCheckBehaviour
The behaviour for non-zero ROB status words.
Gaudi::Property< std::vector< uint32_t > > m_maybeMissingRobsProp
Allow some ROBs to be missing.
ToolHandle< GenericMonitoringTool > m_monTool
Monitoring tool to create online histograms.
::StatusCode StatusCode
StatusCode definition for legacy code.
setEventNumber uint32_t

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode L1TriggerByteStreamDecoderAlg::execute ( const EventContext & eventContext) const
overridevirtual

Definition at line 160 of file L1TriggerByteStreamDecoderAlg.cxx.

160 {
161 ATH_MSG_DEBUG("Executing " << name());
162 auto monTimeExec = Monitored::Timer<std::chrono::duration<float, std::milli>>("TIME_execute");
163
164 // Retrieve the BS data for all tools in one request to parallelise DCM->ROS network requests
166 m_robDataProviderSvc->getROBData(eventContext, m_robIds, vrobf, name());
167
168 // Filter ROB list for each tool and call the conversion
169 for (const auto& decoderTool : m_decoderTools) {
170 std::string toolName{decoderTool->name().substr(decoderTool->name().rfind('.')+1)};
171 auto monTimePrep = Monitored::Timer<std::chrono::duration<float, std::milli>>("TIME_prepareROBs_"+toolName);
173 ATH_CHECK(filterRobs(vrobf, vrobfForTool, decoderTool->robIds(), toolName, eventContext));
174 ATH_CHECK(checkRobs(vrobfForTool, toolName, eventContext));
175 monTimePrep.stop();
176 auto monTimeConv = Monitored::Timer<std::chrono::duration<float, std::milli>>("TIME_convert_"+toolName);
177 try {
178 ATH_CHECK(decoderTool->convertFromBS(vrobfForTool, eventContext));
179 } catch (const std::exception& ex) {
180 ATH_MSG_ERROR("Exception in " << toolName << "::convertFromBS: " << ex.what());
181 return StatusCode::FAILURE;
182 }
183 // Note: time histograms not filled if any ATH_CHECK above fails
184 Monitored::Group(m_monTool, monTimePrep, monTimeConv);
185 }
186
187 Monitored::Group(m_monTool, monTimeExec);
188 return StatusCode::SUCCESS;
189}
#define ATH_CHECK
Evaluate an expression and check for errors.
std::vector< const ROBF * > VROBFRAG
StatusCode checkRobs(const IROBDataProviderSvc::VROBFRAG &robs, std::string_view toolName, const EventContext &eventContext) const
Check ROB status word and report if different from zero.
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.
std::vector< uint32_t > m_robIds
Vector of ROB IDs to request, filled from all decoder tools in initialize.
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc
ROBDataProvider service handle.
ToolHandleArray< IL1TriggerByteStreamTool > m_decoderTools
Tool performing the decoding work.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ filterRobs()

StatusCode L1TriggerByteStreamDecoderAlg::filterRobs ( const IROBDataProviderSvc::VROBFRAG & in,
IROBDataProviderSvc::VROBFRAG & out,
const std::vector< uint32_t > & ids,
std::string_view toolName,
const EventContext & eventContext ) const
private

Copy over ROBFragment pointers from in to out for ROBs with IDs from the ids list.

Parameters
[in]inThe input vector of ROBFragments
[out]outThe output vector of filtered ROBFragments
[in]idsA list of ROB IDs to filter from in to out
[in]toolNameName of the tool requesting the ROB IDs - used for log messages
Returns
FAILURE if any requested ROB IDs are missing from the in vector, otherwise SUCCESS

Definition at line 192 of file L1TriggerByteStreamDecoderAlg.cxx.

196 {
197 std::copy_if(in.cbegin(), in.cend(), std::back_inserter(out),
198 [&ids](const IROBDataProviderSvc::ROBF* rob){
199 return (std::find(ids.cbegin(),ids.cend(),rob->source_id()) != ids.cend());
200 });
201
202 std::string missingFractionName{"MissingROBFraction_"};
203 missingFractionName.append(toolName);
204 FractionPerLBNMonitor monMissingFraction{std::move(missingFractionName), eventContext.eventID().lumi_block(), static_cast<float>(ids.size()), m_monTool};
205
206 // Check if all ROBs were found and report errors if not
207 if (ids.size() != out.size()) {
208 bool fail{false};
209 for (const uint32_t id : ids) {
210 auto eqRobId = [&id](const IROBDataProviderSvc::ROBF* rob){return (rob->source_id() == id);};
211 if (std::find_if(out.cbegin(),out.cend(),eqRobId) == out.cend()) {
212 ++monMissingFraction;
213 std::string hexRobId = u32toHexString(id);
214 if (std::find(m_maybeMissingRobs.cbegin(),m_maybeMissingRobs.cend(),id) != m_maybeMissingRobs.cend()) {
215 ATH_MSG_DEBUG("Missing ROBFragment with ID " << hexRobId << " ("
216 << eformat::helper::SourceIdentifier(id).human() << ") requested by " << toolName
217 << " but it is allowed to be missing due to the detector mask or the "
218 << m_maybeMissingRobsProp.name() << " property");
219 Monitored::Scalar<std::string> monMissing{"MissingROBAllowed", hexRobId};
220 Monitored::Group{m_monTool, monMissing};
221 } else {
222 ATH_MSG_ERROR("Missing ROBFragment with ID " << hexRobId << " ("
223 << eformat::helper::SourceIdentifier(id).human() << ") requested by " << toolName);
224 fail = true;
225 Monitored::Scalar<std::string> monMissing{"MissingROB", hexRobId};
226 Monitored::Group{m_monTool, monMissing};
227 }
228 }
229 }
230 if (fail) {
231 return StatusCode::FAILURE;
232 }
233 }
234 ATH_MSG_DEBUG("Found " << out.size() << " out of " << ids.size() << " ROBFragments requested by " << toolName);
235 return StatusCode::SUCCESS;
236}
fail(message)

◆ finalize()

StatusCode L1TriggerByteStreamDecoderAlg::finalize ( )
overridevirtual

Definition at line 150 of file L1TriggerByteStreamDecoderAlg.cxx.

150 {
151 ATH_MSG_DEBUG("Finalising " << name());
153 ATH_CHECK(m_decoderTools.release());
154 return StatusCode::SUCCESS;
155}

◆ initialize()

StatusCode L1TriggerByteStreamDecoderAlg::initialize ( )
overridevirtual

Definition at line 76 of file L1TriggerByteStreamDecoderAlg.cxx.

76 {
77 ATH_MSG_DEBUG("Initialising " << name());
78 ATH_CHECK(m_decoderTools.retrieve());
80 if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
82
84
85 // Build a list of unique ROB IDs to request in each event
86 for (const auto& decoderTool : m_decoderTools) {
87 const std::vector<uint32_t>& ids = decoderTool->robIds();
88 m_robIds.insert(m_robIds.end(), ids.begin(), ids.end());
89 }
90 std::sort(m_robIds.begin(),m_robIds.end());
91 m_robIds.erase(std::unique(m_robIds.begin(),m_robIds.end()), m_robIds.end());
92 ATH_MSG_INFO("Will request " << m_robIds.size() << " ROBs per event: " << robIdsToString(m_robIds));
93
94 // Parse properties
95 m_maybeMissingRobs.insert(m_maybeMissingRobsProp.value().begin(), m_maybeMissingRobsProp.value().end());
96
97 auto setRobCheckBehaviour = [this](const Gaudi::Property<std::string>& prop, ROBCheckBehaviour& out) -> StatusCode {
98 if (prop.value() == "None") {out=ROBCheckBehaviour::None;}
99 else if (prop.value() == "Warning") {out=ROBCheckBehaviour::Warning;}
100 else if (prop.value() == "Error") {out=ROBCheckBehaviour::Error;}
101 else if (prop.value() == "Fatal") {out=ROBCheckBehaviour::Fatal;}
102 else {
103 ATH_MSG_ERROR(prop.name() << " is set to \"" << prop.value()
104 << "\" but needs to be one of [\"None\", \"Warning\", \"Error\", \"Fatal\"]");
105 return StatusCode::FAILURE;
106 }
107 return StatusCode::SUCCESS;
108 };
109
110 ATH_CHECK(setRobCheckBehaviour(m_robStatusCheckLevel,m_robStatusCheck));
111 ATH_CHECK(setRobCheckBehaviour(m_robFormatCheckLevel,m_robFormatCheck));
112
113 return StatusCode::SUCCESS;
114}
#define ATH_MSG_INFO(x)
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Gaudi::Property< std::string > m_robFormatCheckLevel
Set behaviour for corrupted ROB data.
Gaudi::Property< std::string > m_robStatusCheckLevel
Set behaviour for non-zero ROB status words.
SG::ReadHandleKey< ByteStreamMetadataContainer > m_bsMetaDataContRHKey
StoreGate key for the ByteStreamMetadata container to retrieve detector mask.
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ start()

StatusCode L1TriggerByteStreamDecoderAlg::start ( )
overridevirtual

Definition at line 119 of file L1TriggerByteStreamDecoderAlg.cxx.

119 {
120 // Skip detector mask checks if ByteStreamMetaData not available
121 if (m_bsMetaDataContRHKey.key().empty()) {
122 return StatusCode::SUCCESS;
123 }
124
125 // Get the detector mask
127 ATH_CHECK(bsmdc.isValid());
128 ATH_CHECK(!bsmdc->empty());
129 const ByteStreamMetadata* metadata = bsmdc->front();
130 const eformat::helper::DetectorMask detectorMask{metadata->getDetectorMask(), metadata->getDetectorMask2()};
131
132 // Check if the requested ROBs should be expected to be present or may be missing
133 for (const uint32_t robId : m_robIds) {
134 const eformat::helper::SourceIdentifier sid{robId};
135 if (!detectorMask.is_set(sid.subdetector_id())) {
136 if (m_maybeMissingRobs.insert(robId).second) {
137 ATH_MSG_WARNING("ROB ID 0x" << MSG::hex << robId << MSG::dec << " was requested for decoding, "
138 << "but the SubDetector " << sid.human_detector() << " is disabled in "
139 << "the detector mask. Will not require this ROB ID to be present in every event.");
140 }
141 }
142 }
143
144 return StatusCode::SUCCESS;
145}
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_bsMetaDataContRHKey

SG::ReadHandleKey<ByteStreamMetadataContainer> L1TriggerByteStreamDecoderAlg::m_bsMetaDataContRHKey
private
Initial value:
{
this, "ByteStreamMetadataRHKey", "InputMetaDataStore+ByteStreamMetadata",
"Key of the ByteStreamMetadataContainer to retrieve the detector mask"
}

StoreGate key for the ByteStreamMetadata container to retrieve detector mask.

Definition at line 45 of file L1TriggerByteStreamDecoderAlg.h.

45 {
46 this, "ByteStreamMetadataRHKey", "InputMetaDataStore+ByteStreamMetadata",
47 "Key of the ByteStreamMetadataContainer to retrieve the detector mask"
48 };

◆ m_decoderTools

ToolHandleArray<IL1TriggerByteStreamTool> L1TriggerByteStreamDecoderAlg::m_decoderTools
private
Initial value:
{
this, "DecoderTools", {}, "Array of tools performing the decoding work"}

Tool performing the decoding work.

Definition at line 34 of file L1TriggerByteStreamDecoderAlg.h.

34 {
35 this, "DecoderTools", {}, "Array of tools performing the decoding work"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_maybeMissingRobs

std::set<uint32_t> L1TriggerByteStreamDecoderAlg::m_maybeMissingRobs
private

Set of ROB IDs allowed to be missing because they are disabled.

Definition at line 93 of file L1TriggerByteStreamDecoderAlg.h.

◆ m_maybeMissingRobsProp

Gaudi::Property<std::vector<uint32_t> > L1TriggerByteStreamDecoderAlg::m_maybeMissingRobsProp
private
Initial value:
{
this, "MaybeMissingROBs", {},
"List of ROB IDs allowed to be missing. If a decoder tool requests one of these "
"and it is not available in the event, no errors will be reported",
"OrderedSet<T>"
}

Allow some ROBs to be missing.

Definition at line 50 of file L1TriggerByteStreamDecoderAlg.h.

50 {
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 "OrderedSet<T>"
55 };

◆ m_monTool

ToolHandle<GenericMonitoringTool> L1TriggerByteStreamDecoderAlg::m_monTool
private
Initial value:
{
this, "MonTool", "", "Monitoring tool"}

Monitoring tool to create online histograms.

Definition at line 40 of file L1TriggerByteStreamDecoderAlg.h.

40 {
41 this, "MonTool", "", "Monitoring tool"};

◆ m_robDataProviderSvc

ServiceHandle<IROBDataProviderSvc> L1TriggerByteStreamDecoderAlg::m_robDataProviderSvc
private
Initial value:
{
this, "ROBDataProviderSvc", "ROBDataProviderSvc", "ROB data provider"}

ROBDataProvider service handle.

Definition at line 37 of file L1TriggerByteStreamDecoderAlg.h.

37 {
38 this, "ROBDataProviderSvc", "ROBDataProviderSvc", "ROB data provider"};

◆ m_robFormatCheck

◆ m_robFormatCheckLevel

Gaudi::Property<std::string> L1TriggerByteStreamDecoderAlg::m_robFormatCheckLevel
private
Initial value:
{
this, "ROBFormatCheckLevel", "Fatal",
"ROB format (data consistency) check behaviour. Can be 'None' - format is not checked, 'Warning' - only print warnings "
"for corrupted data, 'Error' - only print errors for corrupted data, 'Fatal' - return FAILURE "
"from the algorithm if corrupted data are found. MaybeMissingROBs are always exempt from this check."
}

Set behaviour for corrupted ROB data.

Definition at line 64 of file L1TriggerByteStreamDecoderAlg.h.

64 {
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 };

◆ m_robIds

std::vector<uint32_t> L1TriggerByteStreamDecoderAlg::m_robIds
private

Vector of ROB IDs to request, filled from all decoder tools in initialize.

Definition at line 91 of file L1TriggerByteStreamDecoderAlg.h.

◆ m_robStatusCheck

ROBCheckBehaviour L1TriggerByteStreamDecoderAlg::m_robStatusCheck {ROBCheckBehaviour::Undefined}
private

◆ m_robStatusCheckLevel

Gaudi::Property<std::string> L1TriggerByteStreamDecoderAlg::m_robStatusCheckLevel
private
Initial value:
{
this, "ROBStatusCheckLevel", "Warning",
"ROB status word check behaviour. Can be 'None' - status is not checked, 'Warning' - only print warnings "
"for non-zero status, 'Error' - only print errors for non-zero status, 'Fatal' - return FAILURE "
"from the algorithm if non-zero status is found. MaybeMissingROBs are always exempt from this check."
}

Set behaviour for non-zero ROB status words.

Definition at line 57 of file L1TriggerByteStreamDecoderAlg.h.

57 {
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 };

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: