ATLAS Offline Software
|
HLT monitoring configuration. More...
#include <HLTMonitoring.h>
Public Types | |
using | ptree = boost::property_tree::ptree |
Public Member Functions | |
HLTMonitoring () | |
Constructor. More... | |
HLTMonitoring (const ptree &data) | |
Constructor initialized with configuration data. More... | |
HLTMonitoring (const HLTMonitoring &)=default | |
HLTMonitoring (HLTMonitoring &&)=default | |
virtual | ~HLTMonitoring () override=default |
Destructor. More... | |
virtual std::string | className () const override |
A string that is the name of the class. More... | |
std::size_t | size () const |
Accessor to the number of HLT monitoring chains. More... | |
unsigned int | smk () const |
setter and getter for the supermasterkey More... | |
void | setSMK (unsigned int psk) |
std::vector< std::string > | signatureNames () const |
names of the monitored signatures More... | |
const std::set< std::string > & | targets () const |
names of targets More... | |
const std::map< std::string, std::map< std::string, std::vector< std::string > > > & | signatures () const |
std::vector< std::string > | chainsBySignatureAndTarget (const std::string &signature, const std::string &target) const |
monitored chains by signature for a given target More... | |
void | printMonConfig (bool full=false) const |
print overview of L1 Menu More... | |
virtual void | clear () override |
Clearing the configuration data. More... | |
void | setData (const ptree &data) |
Setting the configuration data. More... | |
void | setData (ptree &&data) |
void | setName (const std::string &n) |
Setting the configuration element name. More... | |
virtual const std::string & | name () const final |
const ptree & | data () const |
Access to the underlying data, if needed. More... | |
bool | isValue () const |
Check for attribute. More... | |
std::string | getValue () const |
Access to simple content. More... | |
template<class T > | |
T | getValue () const |
template<class T > | |
std::optional< T > | getValue_optional () const |
access to content of the note Will return false if the value could not be converted into T More... | |
bool | hasAttribute (const std::string &key) const |
Check for attribute. More... | |
bool | isNull (const std::string &key) const |
Check if an attribute is null. More... | |
bool | hasChild (const std::string &path) const |
Check if child exists. More... | |
std::string | operator[] (const std::string &key) const |
Access to simple attribute. More... | |
template<class T > | |
T | getAttribute (const std::string &key, bool ignoreIfMissing=false, const T &def=T()) const |
Access to simple attribute. More... | |
const std::string & | getAttribute (const std::string &key, bool ignoreIfMissing=false, const std::string &def="") const |
template<class T > | |
std::optional< T > | getAttribute_optional (const std::string &key) const |
std::vector< DataStructure > | getList (const std::string &pathToChild, bool ignoreIfMissing=false) const |
Access to array structure. More... | |
std::optional< std::vector< DataStructure > > | getList_optional (const std::string &pathToChild) const |
DataStructure | getObject (const std::string &pathToChild, bool ignoreIfMissing=false) const |
Access to configuration object. More... | |
std::optional< TrigConf::DataStructure > | getObject_optional (const std::string &pathToChild) const |
std::vector< std::string > | getKeys () const |
Access to the keys of an DataStructure which presents a dictionary. More... | |
operator bool () const | |
Access to initialized state. More... | |
bool | isValid () const |
bool | isInitialized () const |
bool | empty () const |
Check if children exist. More... | |
void | printRaw (std::ostream &os=std::cout) const |
virtual void | print (std::ostream &os=std::cout) const |
bool | ownsData () const |
Static Public Member Functions | |
static void | printElement (const std::string &key, const ptree &data, uint level=0, std::ostream &os=std::cout) |
Static function to print a ptree object. More... | |
Protected Attributes | |
bool | m_initialized { false } |
if initialized, the underlying ptree is has been assigned to (can be empty) More... | |
std::shared_ptr< ptree > | m_dataSPtr { nullptr } |
const ptree * | m_dataPtr { nullptr } |
std::string | m_name {""} |
Private Member Functions | |
virtual void | update () override |
Update the internal data after modification of the data object. More... | |
void | load () |
Private Attributes | |
unsigned int | m_smk {0} |
the supermasterkey More... | |
std::map< std::string, std::map< std::string, std::vector< std::string > > > | m_signatures {} |
internal storage of the information More... | |
std::set< std::string > | m_targets {} |
names of monitoring targets like shifter, t0, online More... | |
HLT monitoring configuration.
Provides access to monitoring classifications corresponding to HLT chains.
This file is primarily designed for python based access. This C++ wrapper remains minimalist for the time being. Data may still be queried via the wrapped ptree.
Further accessor helper functions may be added at a later date and would be backwards compatible with existing files.
Definition at line 27 of file HLTMonitoring.h.
|
inherited |
Definition at line 40 of file DataStructure.h.
TrigConf::HLTMonitoring::HLTMonitoring | ( | ) |
Constructor initialized with configuration data.
data | The ptree containing the HLT monitoring structure |
Definition at line 15 of file HLTMonitoring.cxx.
|
default |
|
default |
|
overridevirtualdefault |
Destructor.
std::vector< std::string > TrigConf::HLTMonitoring::chainsBySignatureAndTarget | ( | const std::string & | signature, |
const std::string & | target | ||
) | const |
monitored chains by signature for a given target
signature | signature like egammaMon, idMon, caloMon (complete list via signatureNames()) |
target | monitoring target like shifter, t0, online (complete set via targets()) |
Definition at line 71 of file HLTMonitoring.cxx.
|
inlineoverridevirtual |
A string that is the name of the class.
Reimplemented from TrigConf::DataStructure.
Definition at line 44 of file HLTMonitoring.h.
|
overridevirtual |
Clearing the configuration data.
Reimplemented from TrigConf::DataStructure.
Definition at line 87 of file HLTMonitoring.cxx.
Access to the underlying data, if needed.
Definition at line 83 of file DataStructure.h.
|
inlineinherited |
|
inherited |
Definition at line 136 of file DataStructure.cxx.
|
inlineinherited |
Access to simple attribute.
key | The path to the attribute name, relative to the current one in form "path.to.child" |
ignoreIfMissing | Controls the behavior in case of missing configuration child |
Definition at line 152 of file DataStructure.h.
|
inlineinherited |
|
inherited |
Access to the keys of an DataStructure which presents a dictionary.
In case the DataStructure is a list or a simple attribute, an empty vector is returned
Definition at line 250 of file DataStructure.cxx.
|
inherited |
Access to array structure.
pathToChild | The path to the configuration child, relative to the current one in form "path.to.child" |
ignoreIfMissing | Controls the behavior in case of missing configuration child |
In case the child is missing and ignoreIfMissing
is set to true
, and empty vector will be returned. Otherwise a runtime exception will be thrown.
Definition at line 158 of file DataStructure.cxx.
|
inherited |
|
inherited |
Access to configuration object.
pathToChild | The path to the configuration child, relative to the current one |
ignoreIfMissing | Controls the behavior in case of missing configuration child |
In case the child is missing and ignoreIfMissing
is set to true
, an uninitialized DataStructure
will be returned. Otherwise a runtime exception will be thrown.
Definition at line 207 of file DataStructure.cxx.
|
inherited |
Definition at line 230 of file DataStructure.cxx.
|
inherited |
Access to simple content.
For instance when the json structure contains an array of values (ptree only works with strings) which one retrieved via getList
, then the values in the vector<DataStructure>
can be accessed using getValue
Definition at line 80 of file DataStructure.cxx.
|
inlineinherited |
Definition at line 108 of file DataStructure.h.
|
inlineinherited |
|
inherited |
Check for attribute.
key | The path to the attribute name, relative to the current one in form "path.to.child" |
key
exists and is an attribute Definition at line 86 of file DataStructure.cxx.
|
inherited |
Check if child exists.
path | The path to the child, relative to the current one in form "path.to.child" |
Definition at line 114 of file DataStructure.cxx.
|
inlineinherited |
Definition at line 216 of file DataStructure.h.
|
inherited |
Check if an attribute is null.
key | The path to the attribute name, relative to the current one in form "path.to.child" |
key
exists and is nullIf the attribute doesn't exist, the function returns false. To check if an attribute exists and is null, use it together with hasAttribute
.
Definition at line 94 of file DataStructure.cxx.
|
inlineinherited |
Definition at line 215 of file DataStructure.h.
|
inherited |
Check for attribute.
Definition at line 74 of file DataStructure.cxx.
|
private |
Definition at line 22 of file HLTMonitoring.cxx.
|
finalvirtualinherited |
Definition at line 109 of file DataStructure.cxx.
|
inlineexplicitinherited |
|
inherited |
Access to simple attribute.
key | The path to the attribute name, relative to the current one in form "path.to.child" |
Definition at line 121 of file DataStructure.cxx.
|
inlineinherited |
Definition at line 242 of file DataStructure.h.
|
virtualinherited |
Reimplemented in TrigConf::L1TopoAlgorithm, and TrigConf::L1Threshold_EM.
Definition at line 272 of file DataStructure.cxx.
|
staticinherited |
Static function to print a ptree
object.
key | The key of this data as found in the parent structure |
data | The ptree to print |
level | The substruture level used to indent the output |
os | The output stream |
Definition at line 279 of file DataStructure.cxx.
void TrigConf::HLTMonitoring::printMonConfig | ( | bool | full = false | ) | const |
|
inherited |
Definition at line 265 of file DataStructure.cxx.
|
inherited |
Definition at line 50 of file DataStructure.cxx.
|
inherited |
Setting the configuration element name.
Definition at line 59 of file DataStructure.cxx.
void TrigConf::HLTMonitoring::setSMK | ( | unsigned int | psk | ) |
Definition at line 99 of file HLTMonitoring.cxx.
std::vector< std::string > TrigConf::HLTMonitoring::signatureNames | ( | ) | const |
const std::map< std::string, std::map< std::string, std::vector< std::string > > > & TrigConf::HLTMonitoring::signatures | ( | ) | const |
Definition at line 56 of file HLTMonitoring.cxx.
std::size_t TrigConf::HLTMonitoring::size | ( | ) | const |
Accessor to the number of HLT monitoring chains.
Definition at line 82 of file HLTMonitoring.cxx.
unsigned int TrigConf::HLTMonitoring::smk | ( | ) | const |
setter and getter for the supermasterkey
Definition at line 94 of file HLTMonitoring.cxx.
const std::set< std::string > & TrigConf::HLTMonitoring::targets | ( | ) | const |
|
inlineoverrideprivatevirtual |
Update the internal data after modification of the data object.
Reimplemented from TrigConf::DataStructure.
Definition at line 78 of file HLTMonitoring.h.
Definition at line 257 of file DataStructure.h.
|
protectedinherited |
Definition at line 256 of file DataStructure.h.
|
protectedinherited |
if initialized, the underlying ptree is has been assigned to (can be empty)
Definition at line 254 of file DataStructure.h.
|
protectedinherited |
Definition at line 259 of file DataStructure.h.
|
private |
internal storage of the information
Definition at line 85 of file HLTMonitoring.h.
|
private |
the supermasterkey
Definition at line 82 of file HLTMonitoring.h.
|
private |
names of monitoring targets like shifter, t0, online
Definition at line 88 of file HLTMonitoring.h.