ATLAS Offline Software
TrigConfData/src/HLTChain.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 {}
9 
12 {
13  load();
14 }
15 
18 {
19  load();
20 }
21 
22 void
24 {
25  load();
26 }
27 
28 void
30 {
31  if(! isInitialized() || empty() ) {
32  return;
33  }
34  m_name = getAttribute("name", true, m_name);
35 }
36 
37 std::string
39  return "Chain";
40 }
41 
42 
43 unsigned int
45 {
46  return getAttribute<unsigned int>("counter");
47 }
48 
49 unsigned int
51 {
52  return getAttribute<unsigned int>("nameHash");
53 }
54 
55 const std::string &
57 {
58  return getAttribute("l1item");
59 }
60 
61 std::vector<size_t> TrigConf::Chain::legMultiplicities() const {
62  std::vector<size_t> returnMultiplicities;
63  const auto& theMultiplicities = getList("legMultiplicities");
64  if( !theMultiplicities.empty() ) {
65  returnMultiplicities.reserve(theMultiplicities.size());
66  for( auto& m : theMultiplicities ) {
67  returnMultiplicities.push_back( m.getValue<size_t>() );
68  }
69  }
70  return returnMultiplicities;
71 }
72 
73 std::vector<std::string>
75 {
76 
77  std::vector<std::string> thrV;
78  const auto & thrs = getList("l1thresholds");
79  if( !thrs.empty() ) {
80  thrV.reserve(thrs.size());
81  for( auto & thr : thrs ) {
82  thrV.emplace_back( thr.getValue<std::string>() );
83  }
84  }
85  return thrV;
86 }
87 
88 
89 std::vector<std::string>
91 {
92 
93  std::vector<std::string> strlist;
94  const auto & streams = getList("streams");
95  if( !streams.empty() ) {
96  strlist.reserve(streams.size());
97  for( auto & stream : streams ) {
98  strlist.emplace_back( stream.getValue<std::string>() );
99  }
100  }
101  return strlist;
102 }
103 
104 
105 std::vector<std::string>
107 {
108 
109  std::vector<std::string> grouplist;
110  const auto & groups = getList("groups", /*ignoreIfMissing=*/ true);
111  if( !groups.empty() ) {
112  grouplist.reserve(groups.size());
113  for( auto & group : groups ) {
114  if (group.hasAttribute("name")) {
115  grouplist.emplace_back( group["name"] );
116  } else if (group.isValue()) {
117  grouplist.emplace_back( group.getValue<std::string>() );
118  }
119  }
120  }
121 
122  return grouplist;
123 }
124 
125 std::vector<std::string>
127 {
128 
129  std::vector<std::string> seqlist;
130  const auto & seqs = getList("sequencers");
131  if( !seqs.empty() ) {
132  seqlist.reserve(seqs.size());
133  for( auto & seq : seqs ) {
134  seqlist.emplace_back( seq.getValue<std::string>() );
135  }
136  }
137  return seqlist;
138 }
139 
test_athena_ntuple_filter.seq
seq
filter configuration ## -> we use the special sequence 'AthMasterSeq' which is run before any other a...
Definition: test_athena_ntuple_filter.py:18
TrigConf::Chain::l1thresholds
std::vector< std::string > l1thresholds() const
Accessor to the l1 thresholds.
Definition: TrigConfData/src/HLTChain.cxx:74
ChainDefInMenu.groups
groups
Definition: ChainDefInMenu.py:44
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
TrigConf::Chain::streams
std::vector< std::string > streams() const
Accessor to the connected output streams.
Definition: TrigConfData/src/HLTChain.cxx:90
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
python.outputTest_v2.streams
streams
Definition: outputTest_v2.py:55
TrigConf::Chain::update
void update() override
Update the internal data after modification of the data object.
Definition: TrigConfData/src/HLTChain.cxx:23
HLTChain.h
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
TrigConf::Chain::className
virtual std::string className() const override
A string that is the name of the class.
Definition: TrigConfData/src/HLTChain.cxx:38
TrigConf::Chain::groups
std::vector< std::string > groups() const
Accessor to the groups this chain belongs to.
Definition: TrigConfData/src/HLTChain.cxx:106
TrigConf::Chain::load
void load()
Definition: TrigConfData/src/HLTChain.cxx:29
TrigConf::Chain::legMultiplicities
std::vector< size_t > legMultiplicities() const
Accessor to the chains multiplicitiy requirements for each of its legs.
Definition: TrigConfData/src/HLTChain.cxx:61
TrigConf::name
Definition: HLTChainList.h:35
TrigConf::Chain::sequencers
std::vector< std::string > sequencers() const
Accessor to the sequencers this chain belongs to.
Definition: TrigConfData/src/HLTChain.cxx:126
ptree
boost::property_tree::ptree ptree
Definition: JsonFileLoader.cxx:16
TrigConf::DataStructure
Base class for Trigger configuration data and wrapper around underlying representation.
Definition: DataStructure.h:37
TrigConf::Chain::counter
unsigned int counter() const
Accessor to the chain counter.
Definition: TrigConfData/src/HLTChain.cxx:44
TrigConf::Chain::Chain
Chain()
Constructor.
Definition: TrigConfData/src/HLTChain.cxx:7
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
TrigConf::Chain::namehash
unsigned int namehash() const
Accessor to the chain name hash.
Definition: TrigConfData/src/HLTChain.cxx:50
TrigConf::Chain::l1item
const std::string & l1item() const
Accessor to the seeding L1 item.
Definition: TrigConfData/src/HLTChain.cxx:56
python.root_pickle.load
def load(f, use_proxy=1, key=None)
Definition: root_pickle.py:476