ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
9
10TrigConf::L1Item::L1Item(const boost::property_tree::ptree & data)
12{
13 load();
14}
15
16std::string
18 return "L1Item";
19}
20
21void
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
33unsigned int
35{
36 return getAttribute<unsigned int>("ctpid");
37}
38
39const std::string &
41{
42 return getAttribute("definition");
43}
44
45const std::vector<std::string> &
49
50unsigned int
52{
53 return getAttribute<unsigned int>("complexDeadtime");
54}
55
56const std::string &
58{
59 return getAttribute("monitor");
60}
61
62unsigned int
64{
65 return getAttribute<unsigned int>("partition");
66}
67
68const std::string &
70{
71 return getAttribute("triggerType");
72}
73
74std::optional<bool>
76{
77 return hasAttribute("legacy") ? std::optional<bool>{getAttribute<bool>("legacy")} : std::nullopt;
78}
79
80unsigned 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}
static const Attributes_t empty
Base class for Trigger configuration data and wrapper around underlying representation.
std::vector< DataStructure > getList(const std::string &pathToChild, bool ignoreIfMissing=false) const
Access to array structure.
const ptree & data() const
Access to the underlying data, if needed.
bool hasAttribute(const std::string &key) const
Check for attribute.
DataStructure()
Default constructor, leading to an uninitialized configuration object.
T getAttribute(const std::string &key, bool ignoreIfMissing=false, const T &def=T()) const
Access to simple attribute.
DataStructure getObject(const std::string &pathToChild, bool ignoreIfMissing=false) const
Access to configuration object.
unsigned char triggerTypeAsUChar() const
Accessor to the item triggerType returned format is an uchar (8 bit L1 trigger type)
Definition L1Item.cxx:81
const std::string & triggerType() const
Accessor to the item triggerType returned format is a string (e.g.
Definition L1Item.cxx:69
unsigned int partition() const
Accessor to the item partition.
Definition L1Item.cxx:63
std::optional< bool > legacy() const
Accessor to the item legacy flag.
Definition L1Item.cxx:75
L1Item()
Constructor.
Definition L1Item.cxx:7
DataStructure logic() const
Accessor to the item logic.
Definition L1Item.cxx:93
unsigned int ctpId() const
Accessor to the CTP ID.
Definition L1Item.cxx:34
unsigned int complexDeadtime() const
Accessor to the complex deadtime.
Definition L1Item.cxx:51
virtual std::string className() const override
A string that is the name of the class.
Definition L1Item.cxx:17
const std::vector< std::string > & bunchgroups() const
Accessor to the list of bunchgroups.
Definition L1Item.cxx:46
const std::string & definition() const
Accessor to the item definition.
Definition L1Item.cxx:40
std::vector< std::string > m_bunchgroups
Definition L1Item.h:82
const std::string & monitor() const
Accessor to the item monitoring definition.
Definition L1Item.cxx:57