ATLAS Offline Software
|
L1 menu configuration. More...
#include <L1Menu.h>
Public Types | |
using | const_iterator = ConstIter< ptree, L1Item > |
Iterator over the L1 items. More... | |
using | ptree = boost::property_tree::ptree |
Public Member Functions | |
L1Menu () | |
Constructor. More... | |
L1Menu (const ptree &data) | |
Constructor initialized with configuration data. More... | |
virtual | ~L1Menu () override=default |
Destructor. More... | |
virtual std::string | className () const override |
A string that is the name of the class. More... | |
unsigned int | version () const |
Accessor to the menu version. More... | |
unsigned int | ctpVersion () const |
Accessor to the version of the CTP format. More... | |
std::size_t | size () const |
Accessor to the number of L1 items. More... | |
unsigned int | smk () const |
setter and getter for the supermasterkey More... | |
void | setSMK (unsigned int psk) |
L1Item | item (const std::string &itemName) const |
Get item by name. More... | |
const_iterator | begin () const |
Begin of the L1 items list. More... | |
const_iterator | end () const |
End of the L1 items list. More... | |
std::vector< std::string > | thresholdTypes () const |
List of L1 thresholds types. More... | |
std::vector< std::string > | thresholdNames () const |
List of L1 thresholds names. More... | |
std::vector< std::shared_ptr< TrigConf::L1Threshold > > | thresholds () const |
Access to list of all L1Thresholds. More... | |
const std::vector< std::shared_ptr< TrigConf::L1Threshold > > & | thresholds (const std::string &typeName) const |
Access to list of L1Thresholds by type. More... | |
const TrigConf::L1Threshold & | threshold (const std::string &thresholdName) const |
Access to L1Threshold by name. More... | |
const TrigConf::L1Threshold & | threshold (const std::string &typeName, unsigned int mapping) const |
Access to L1Threshold by type and mapping index. More... | |
const L1ThrExtraInfo & | thrExtraInfo () const |
Access to extra info for threshold types. More... | |
std::vector< std::string > | topoAlgorithmNames (const std::string &category) const |
Access to topo algorithm names. More... | |
std::vector< std::string > | topoAlgorithmOutputNames (const std::string &category) const |
Access to topo algoritm output names. More... | |
const TrigConf::L1TopoAlgorithm & | algorithm (const std::string &algoName, const std::string &category) const |
Access to topo algorithm by name. More... | |
const TrigConf::L1TopoAlgorithm & | algorithmFromTriggerline (const std::string &triggerlineName) const |
Access to topo algorithm by name of triggerline as given in topo connector specification. More... | |
const TrigConf::L1TopoAlgorithm & | algorithmFromOutput (const std::string &bareOutputName, const std::string &category) const |
Access to topo algorithm by name of the output as given in the algorithm definition. More... | |
const TrigConf::L1Board & | board (const std::string &boardName) const |
Access to boards by name. More... | |
std::vector< std::string > | boardNames () const |
Board names. More... | |
const TrigConf::L1Connector & | connector (const std::string &connectorName) const |
Access to connector by name. More... | |
std::vector< std::string > | connectorNames () const |
Connector names. More... | |
const std::string & | connectorNameFromThreshold (const std::string &thresholdName) const |
Name of connector from name of threshold or triggerline. More... | |
const TrigConf::L1CTP & | ctp () const |
the CTP configuration More... | |
void | printMenu (bool full=false) const |
print overview of L1 Menu More... | |
bool | isRun2 () const |
unsigned int | run () const |
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... | |
unsigned int | m_run {3} |
std::map< std::string, TrigConf::L1Connector > | m_connectors {} |
connector by name More... | |
std::map< std::string, std::string > | m_threshold2ConnectorName {} |
connector name by threshold name More... | |
std::map< std::string, TrigConf::L1Board > | m_boards {} |
board by name More... | |
std::map< std::string, std::vector< std::shared_ptr< TrigConf::L1Threshold > > > | m_thresholdsByType {} |
threshold maps More... | |
std::map< std::string, std::shared_ptr< TrigConf::L1Threshold > > | m_thresholdsByName {} |
std::map< std::string, std::map< unsigned int, std::shared_ptr< TrigConf::L1Threshold > > > | m_thresholdsByTypeAndMapping {} |
TrigConf::L1ThrExtraInfo | m_thrExtraInfo |
std::map< std::string, std::vector< TrigConf::L1TopoAlgorithm > > | m_algorithmsByCategory {} |
algorithm maps More... | |
std::map< std::string, std::map< std::string, TrigConf::L1TopoAlgorithm * > > | m_algorithmsByName {} |
std::map< std::string, std::map< std::string, TrigConf::L1TopoAlgorithm * > > | m_algorithmsByOutput {} |
TrigConf::L1CTP | m_ctp |
L1 menu configuration.
Provides access to menu name and ctpVersion and to the L1 items and thresholds
using TrigConf::L1Menu::const_iterator = ConstIter<ptree, L1Item> |
|
inherited |
Definition at line 40 of file DataStructure.h.
TrigConf::L1Menu::L1Menu | ( | ) |
Constructor initialized with configuration data.
data | The data containing the L1 menu |
Definition at line 13 of file L1Menu.cxx.
|
overridevirtualdefault |
Destructor.
const TrigConf::L1TopoAlgorithm & TrigConf::L1Menu::algorithm | ( | const std::string & | algoName, |
const std::string & | category | ||
) | const |
Access to topo algorithm by name.
Definition at line 382 of file L1Menu.cxx.
const TrigConf::L1TopoAlgorithm & TrigConf::L1Menu::algorithmFromOutput | ( | const std::string & | bareOutputName, |
const std::string & | category | ||
) | const |
Access to topo algorithm by name of the output as given in the algorithm definition.
fullOutputName | string name of the output prefixed with the category, e.g. ("HT150-J20s5.ETA31","TOPO") or ("0INVM9-EM7ab-EMab","R2TOPO") |
Definition at line 417 of file L1Menu.cxx.
const TrigConf::L1TopoAlgorithm & TrigConf::L1Menu::algorithmFromTriggerline | ( | const std::string & | triggerlineName | ) | const |
Access to topo algorithm by name of triggerline as given in topo connector specification.
triggerlineName | string name of the triggerline |
The name of the triggerline starts with "TOPO_", "MUTOPO_", or "R2TOPO_", except in the case of multiplicity output lines which are just the threshold name
Definition at line 394 of file L1Menu.cxx.
TrigConf::L1Menu::const_iterator TrigConf::L1Menu::begin | ( | ) | const |
const TrigConf::L1Board & TrigConf::L1Menu::board | ( | const std::string & | boardName | ) | const |
std::vector< std::string > TrigConf::L1Menu::boardNames | ( | ) | const |
|
inlineoverridevirtual |
A string that is the name of the class.
Reimplemented from TrigConf::DataStructure.
|
overridevirtual |
Clearing the configuration data.
Reimplemented from TrigConf::DataStructure.
Definition at line 150 of file L1Menu.cxx.
const TrigConf::L1Connector & TrigConf::L1Menu::connector | ( | const std::string & | connectorName | ) | const |
const std::string & TrigConf::L1Menu::connectorNameFromThreshold | ( | const std::string & | thresholdName | ) | const |
Name of connector from name of threshold or triggerline.
Definition at line 313 of file L1Menu.cxx.
std::vector< std::string > TrigConf::L1Menu::connectorNames | ( | ) | const |
|
inline |
unsigned int TrigConf::L1Menu::ctpVersion | ( | ) | const |
Accessor to the version of the CTP format.
Definition at line 179 of file L1Menu.cxx.
Access to the underlying data, if needed.
Definition at line 83 of file DataStructure.h.
|
inlineinherited |
TrigConf::L1Menu::const_iterator TrigConf::L1Menu::end | ( | ) | const |
|
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.
|
inline |
|
inlineinherited |
Definition at line 215 of file DataStructure.h.
|
inherited |
Check for attribute.
Definition at line 74 of file DataStructure.cxx.
TrigConf::L1Item TrigConf::L1Menu::item | ( | const std::string & | itemName | ) | const |
Get item by name.
Definition at line 201 of file L1Menu.cxx.
|
private |
Definition at line 20 of file L1Menu.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::L1Menu::printMenu | ( | bool | full = false | ) | const |
print overview of L1 Menu
Definition at line 455 of file L1Menu.cxx.
|
inherited |
Definition at line 265 of file DataStructure.cxx.
|
inline |
|
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::L1Menu::setSMK | ( | unsigned int | psk | ) |
Definition at line 196 of file L1Menu.cxx.
std::size_t TrigConf::L1Menu::size | ( | ) | const |
Accessor to the number of L1 items.
Definition at line 185 of file L1Menu.cxx.
unsigned int TrigConf::L1Menu::smk | ( | ) | const |
setter and getter for the supermasterkey
Definition at line 191 of file L1Menu.cxx.
const TrigConf::L1Threshold & TrigConf::L1Menu::threshold | ( | const std::string & | thresholdName | ) | const |
Access to L1Threshold by name.
Definition at line 279 of file L1Menu.cxx.
const TrigConf::L1Threshold & TrigConf::L1Menu::threshold | ( | const std::string & | typeName, |
unsigned int | mapping | ||
) | const |
std::vector< std::string > TrigConf::L1Menu::thresholdNames | ( | ) | const |
std::vector< std::shared_ptr< TrigConf::L1Threshold > > TrigConf::L1Menu::thresholds | ( | ) | const |
const std::vector< std::shared_ptr< TrigConf::L1Threshold > > & TrigConf::L1Menu::thresholds | ( | const std::string & | typeName | ) | const |
Access to list of L1Thresholds by type.
Definition at line 254 of file L1Menu.cxx.
std::vector< std::string > TrigConf::L1Menu::thresholdTypes | ( | ) | const |
const TrigConf::L1ThrExtraInfo & TrigConf::L1Menu::thrExtraInfo | ( | ) | const |
Access to extra info for threshold types.
Definition at line 307 of file L1Menu.cxx.
std::vector< std::string > TrigConf::L1Menu::topoAlgorithmNames | ( | const std::string & | category | ) | const |
Access to topo algorithm names.
category | must be one of "TOPO", "MUTOPO", "MULTTOPO", or "R2TOPO" |
TOPO ... new topo algorithms, R2TOPO ... Run-2 topo algorithms MUTOPO ... MUCTPI topo algorithms MULTTOPO ... multiplicity algorithms
Definition at line 347 of file L1Menu.cxx.
std::vector< std::string > TrigConf::L1Menu::topoAlgorithmOutputNames | ( | const std::string & | category | ) | const |
|
inlineoverrideprivatevirtual |
Update the internal data after modification of the data object.
Reimplemented from TrigConf::DataStructure.
Definition at line 160 of file L1Menu.h.
unsigned int TrigConf::L1Menu::version | ( | ) | const |
Accessor to the menu version.
Definition at line 173 of file L1Menu.cxx.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
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 |
|
private |
|
private |
|
private |
|
private |
|
private |