ATLAS Offline Software
L1Item.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "TrigConfData/L1Item.h"
6 
8 {}
9 
12 {
13  load();
14 }
15 
16 std::string
18  return "L1Item";
19 }
20 
21 void
23 {
24  if(! isInitialized() || empty() ) {
25  return;
26  }
27  m_name = getAttribute("name");
28  for(auto & bg : getList("bunchgroups") ) {
29  m_bunchgroups.push_back(bg.getValue<std::string>());
30  }
31 }
32 
33 unsigned int
35 {
36  return getAttribute<unsigned int>("ctpid");
37 }
38 
39 const std::string &
41 {
42  return getAttribute("definition");
43 }
44 
45 const std::vector<std::string> &
47  return m_bunchgroups;
48 }
49 
50 unsigned int
52 {
53  return getAttribute<unsigned int>("complexDeadtime");
54 }
55 
56 const std::string &
58 {
59  return getAttribute("monitor");
60 }
61 
62 unsigned int
64 {
65  return getAttribute<unsigned int>("partition");
66 }
67 
68 const std::string &
70 {
71  return getAttribute("triggerType");
72 }
73 
74 std::optional<bool>
76 {
77  return hasAttribute("legacy") ? std::optional<bool>{getAttribute<bool>("legacy")} : std::nullopt;
78 }
79 
80 unsigned char
82 {
83  std::string tt ( getAttribute("triggerType") );
84  unsigned char ttuc(0);
85  for(size_t p = 0; p<tt.size(); p++) {
86  ttuc <<= 1;
87  if(tt[p]=='1') ttuc += 1;
88  }
89  return ttuc;
90 }
91 
94 {
95  return getObject("AND");
96 }
TrigConf::L1Item::complexDeadtime
unsigned int complexDeadtime() const
Accessor to the complex deadtime.
Definition: L1Item.cxx:51
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
TrigConf::L1Item::triggerTypeAsUChar
unsigned char triggerTypeAsUChar() const
Accessor to the item triggerType returned format is an uchar (8 bit L1 trigger type)
Definition: L1Item.cxx:81
StandaloneBunchgroupHandler.bg
bg
Definition: StandaloneBunchgroupHandler.py:243
L1Item.h
TrigConf::L1Item::ctpId
unsigned int ctpId() const
Accessor to the CTP ID.
Definition: L1Item.cxx:34
TrigConf::L1Item::legacy
std::optional< bool > legacy() const
Accessor to the item legacy flag.
Definition: L1Item.cxx:75
TrigConf::L1Item::partition
unsigned int partition() const
Accessor to the item partition.
Definition: L1Item.cxx:63
TrigConf::L1Item::triggerType
const std::string & triggerType() const
Accessor to the item triggerType returned format is a string (e.g.
Definition: L1Item.cxx:69
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
TrigConf::L1Item::className
virtual std::string className() const override
A string that is the name of the class.
Definition: L1Item.cxx:17
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
TrigConf::L1Item::load
void load()
Definition: L1Item.cxx:22
TrigConf::L1Item::definition
const std::string & definition() const
Accessor to the item definition.
Definition: L1Item.cxx:40
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::L1Item::L1Item
L1Item()
Constructor.
Definition: L1Item.cxx:7
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:874
TrigConf::L1Item::bunchgroups
const std::vector< std::string > & bunchgroups() const
Accessor to the list of bunchgroups.
Definition: L1Item.cxx:46
TrigConf::L1Item::logic
DataStructure logic() const
Accessor to the item logic.
Definition: L1Item.cxx:93
TrigConf::L1Item::monitor
const std::string & monitor() const
Accessor to the item monitoring definition.
Definition: L1Item.cxx:57