ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TrigDecisionTool
Root
FeatureCollectStandalone.cxx
Go to the documentation of this file.
1
// Emacs -*- c++ -*-
2
3
/*
4
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
8
#include "
TrigDecisionTool/FeatureCollectStandalone.h
"
9
10
#include "
TrigDecisionTool/TypelessFeature.h
"
11
#include "
TrigNavStructure/TrigNavStructure.h
"
12
13
#include "
TrigSteeringEvent/TrigPassBits.h
"
14
15
16
17
//pretty printing a TypelessFeature object
18
std::ostream &
Trig::operator<<
(std::ostream & o,
const
Trig::TypelessFeature
& feat) {
19
o <<
"Feature accessible by : "
<< feat.
accessHelper
();
20
return
o;
21
}
22
23
namespace
Trig
{
24
namespace
FeatureAccessImpl
{
25
26
HLT::TriggerElement::FeatureAccessHelper
getTypelessBits
(
const
HLT::TriggerElement
* te,
const
HLT::TrigNavStructure
* navigation){
27
28
//completely disabled for now. should be reenabled once we have more recent TNS tag in Athena
29
HLT::TriggerElement::FeatureAccessHelper
answer;
30
#ifndef XAOD_STANDALONE
31
answer = navigation->
getFeature
(te,
ClassID_traits<TrigPassBits>::ID
(),
"passbits"
);
32
#else
33
(void)te;
34
(void)navigation;
35
#endif
36
37
38
if
(answer.
valid
()){
39
#ifdef XAOD_STANDALONE
// AnalysisBase
40
// In AnalysisBase we can't access TrigPassBits. So warn the user about
41
// this, and pretend that no TrigPassBits is available for this element.
42
static
bool
warningPrinted =
false
;
43
if
( ! warningPrinted ) {
44
std::cerr <<
"FeatureAccessImpl::getTypelessBits WARNING "
45
<<
"Retrieving a container that has TrigPassBits attached "
46
<<
"to it"
<< std::endl;
47
std::cerr <<
"FeatureAccessImpl::getTypelessBits WARNING "
48
<<
"But it's not possible to use TrigPassBits in "
49
<<
"standalone mode"
<< std::endl;
50
std::cerr <<
"FeatureAccessImpl::getTypelessBits WARNING "
51
<<
"So, keep in mind that some of the returned objects "
52
<<
"didn't actually pass the required chain"
53
<< std::endl;
54
warningPrinted =
true
;
55
}
56
return
HLT::TriggerElement::FeatureAccessHelper
();
57
#else
58
return
answer;
59
#endif
// XAOD_STANDALONE
60
}
61
return
HLT::TriggerElement::FeatureAccessHelper
();
62
}
63
64
65
void
typelessCollect
(
const
HLT::TriggerElement
* te,
HLT::class_id_type
clid,
66
std::vector<Trig::TypelessFeature>& data,
67
const
std::string&
label
,
unsigned
int
condition,
68
const
HLT::TrigNavStructure
* navigation ){
69
//collect recursively features for this trigger element
70
if
(condition ==
TrigDefs::Physics
&& !te->
getActiveState
() )
return
;
71
72
const
HLT::TriggerElement
* source = 0;
73
HLT::TriggerElement::FeatureAccessHelper
answer = navigation->
getFeatureRecursively
(te,clid,
label
,source);
74
if
(!answer.
valid
() && source){
75
//source was set but answer invalid -> bifurcation
76
for
(
auto
& predecessor : navigation->
getDirectPredecessors
(source)){
77
typelessCollect
(predecessor,clid,data,
label
,condition,navigation);
78
}
79
}
80
if
(answer.
valid
()){
81
auto
typelessholder = navigation->
getHolder
(answer);
82
if
(!typelessholder){
83
//this can happen, because features were thinned away (which deletes the Holders, but doesn't touch the TE structure)
84
//so we'll let this slip silently
85
return
;
86
}
87
data.push_back(
Trig::TypelessFeature
(answer,source,typelessholder->label()));
88
}
89
}
90
}
// EOF namespace FeatureAccessImpl
91
}
// EOF namespace Trig
92
FeatureCollectStandalone.h
TrigNavStructure.h
TrigPassBits.h
TypelessFeature.h
HLT::TrigNavStructure
Definition
TrigNavStructure.h:40
HLT::TrigNavStructure::getFeature
TriggerElement::FeatureAccessHelper getFeature(const TriggerElement *te, class_id_type clid, const index_or_label_type &index_or_label) const
typeless feature access metod
Definition
TrigNavStructure.cxx:781
HLT::TrigNavStructure::getHolder
const BaseHolder * getHolder(const TriggerElement::FeatureAccessHelper &fea) const
Definition
TrigNavStructure.cxx:921
HLT::TrigNavStructure::getFeatureRecursively
TriggerElement::FeatureAccessHelper getFeatureRecursively(const TriggerElement *startTE, class_id_type clid, const index_or_label_type &index_or_label, const TriggerElement *&sourceTE) const
recursive search for features the function is similar to the above butif th features is not found at ...
Definition
TrigNavStructure.cxx:795
HLT::TrigNavStructure::getDirectPredecessors
static const std::vector< TriggerElement * > & getDirectPredecessors(const TriggerElement *te)
returns list of direct predecessors (nodes seeding me)
Definition
TrigNavStructure.cxx:120
HLT::TriggerElement::FeatureAccessHelper
the FeatureAccessHelper is a class used to keep track of features attached to this TE.
Definition
TrigNavStructure/TrigNavStructure/TriggerElement.h:192
HLT::TriggerElement::FeatureAccessHelper::valid
bool valid() const
Definition
TrigNavStructure/TrigNavStructure/TriggerElement.h:226
HLT::TriggerElement
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
Definition
TrigNavStructure/TrigNavStructure/TriggerElement.h:27
HLT::TriggerElement::getActiveState
bool getActiveState() const
get state of the TriggerElement
Definition
TrigNavStructure/TrigNavStructure/TriggerElement.h:48
Trig::TypelessFeature
Feature class, holding information on Feature attached to navigation.
Definition
TypelessFeature.h:20
Trig::TypelessFeature::accessHelper
const HLT::TriggerElement::FeatureAccessHelper & accessHelper() const
Definition
TypelessFeature.h:24
label
std::string label(const std::string &format, int i)
Definition
label.h:19
HLT::class_id_type
uint32_t class_id_type
Definition
Trigger/TrigEvent/TrigNavStructure/Root/Types.h:11
TrigDefs::Physics
static const unsigned int Physics
Definition
TrigEvent/TrigDecisionInterface/TrigDecisionInterface/Conditions.h:43
Trig::FeatureAccessImpl
This is the implementation of the Feature collection for Athena.
Definition
FeatureCollectStandalone.cxx:24
Trig::FeatureAccessImpl::getTypelessBits
HLT::TriggerElement::FeatureAccessHelper getTypelessBits(const HLT::TriggerElement *te, const HLT::TrigNavStructure *navigation)
Definition
FeatureCollectStandalone.cxx:26
Trig::FeatureAccessImpl::typelessCollect
void typelessCollect(const HLT::TriggerElement *te, HLT::class_id_type clid, std::vector< Trig::TypelessFeature > &data, const std::string &label, unsigned int condition, const HLT::TrigNavStructure *navigation)
Definition
FeatureCollectStandalone.cxx:65
Trig
The common trigger namespace for trigger analysis tools.
Definition
LArCellMonAlg.h:33
Trig::operator<<
std::ostream & operator<<(std::ostream &, const Trig::TypelessFeature &)
Definition
FeatureCollectStandalone.cxx:18
ClassID_traits::ID
static constexpr CLID ID()
Definition
Control/AthenaKernel/AthenaKernel/ClassID_traits.h:44
Generated on
for ATLAS Offline Software by
1.17.0