ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConf::L1Menu Class Referencefinal

L1 menu configuration. More...

#include <L1Menu.h>

Inheritance diagram for TrigConf::L1Menu:

Public Types

using const_iterator = ConstIter<ptree, L1Item>
 Iterator over the L1 items.
using ptree = boost::property_tree::ptree

Public Member Functions

 L1Menu ()
 Constructor.
 L1Menu (const ptree &data)
 Constructor initialized with configuration data.
virtual ~L1Menu () override=default
 Destructor.
virtual std::string className () const override
 A string that is the name of the class.
unsigned int version () const
 Accessor to the menu version.
unsigned int ctpVersion () const
 Accessor to the version of the CTP format.
std::size_t size () const
 Accessor to the number of L1 items.
unsigned int smk () const
 setter and getter for the supermasterkey
void setSMK (unsigned int psk)
L1Item item (const std::string &itemName) const
 Get item by name.
const_iterator begin () const
 Begin of the L1 items list.
const_iterator end () const
 End of the L1 items list.
std::vector< std::string > thresholdTypes () const
 List of L1 thresholds types.
std::vector< std::string > thresholdNames () const
 List of L1 thresholds names.
std::vector< std::shared_ptr< TrigConf::L1Threshold > > thresholds () const
 Access to list of all L1Thresholds.
const std::vector< std::shared_ptr< TrigConf::L1Threshold > > & thresholds (const std::string &typeName) const
 Access to list of L1Thresholds by type.
const TrigConf::L1Thresholdthreshold (const std::string &thresholdName) const
 Access to L1Threshold by name.
const TrigConf::L1Thresholdthreshold (const std::string &typeName, unsigned int mapping) const
 Access to L1Threshold by type and mapping index.
const L1ThrExtraInfothrExtraInfo () const
 Access to extra info for threshold types.
std::vector< std::string > topoAlgorithmNames (const std::string &category) const
 Access to topo algorithm names.
std::vector< std::string > topoAlgorithmOutputNames (const std::string &category) const
 Access to topo algoritm output names.
const TrigConf::L1TopoAlgorithmalgorithm (const std::string &algoName, const std::string &category) const
 Access to topo algorithm by name.
const TrigConf::L1TopoAlgorithmalgorithmFromTriggerline (const std::string &triggerlineName) const
 Access to topo algorithm by name of triggerline as given in topo connector specification.
const TrigConf::L1TopoAlgorithmalgorithmFromOutput (const std::string &bareOutputName, const std::string &category) const
 Access to topo algorithm by name of the output as given in the algorithm definition.
const TrigConf::L1Boardboard (const std::string &boardName) const
 Access to boards by name.
std::vector< std::string > boardNames () const
 Board names.
const TrigConf::L1Connectorconnector (const std::string &connectorName) const
 Access to connector by name.
std::vector< std::string > connectorNames () const
 Connector names.
const std::string & connectorNameFromThreshold (const std::string &thresholdName) const
 Name of connector from name of threshold or triggerline.
const TrigConf::L1CTPctp () const
 the CTP configuration
void printMenu (bool full=false) const
 print overview of L1 Menu
bool isRun2 () const
unsigned int run () const
virtual void clear () override
 Clearing the configuration data.
void setData (const ptree &data)
 Setting the configuration data.
void setData (ptree &&data)
void setName (const std::string &n)
 Setting the configuration element name.
virtual const std::string & name () const final
const ptreedata () const
 Access to the underlying data, if needed.
bool isValue () const
 Check for attribute.
std::string getValue () const
 Access to simple content.
template<class 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
bool hasAttribute (const std::string &key) const
 Check for attribute.
bool isNull (const std::string &key) const
 Check if an attribute is null.
bool hasChild (const std::string &path) const
 Check if child exists.
std::string operator[] (const std::string &key) const
 Access to simple attribute.
template<class T>
getAttribute (const std::string &key, bool ignoreIfMissing=false, const T &def=T()) const
 Access to simple attribute.
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< DataStructuregetList (const std::string &pathToChild, bool ignoreIfMissing=false) const
 Access to array structure.
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.
std::optional< TrigConf::DataStructuregetObject_optional (const std::string &pathToChild) const
std::vector< std::string > getKeys () const
 Access to the keys of an DataStructure which presents a dictionary.
 operator bool () const
 Access to initialized state.
bool isValid () const
bool isInitialized () const
bool empty () const
 Check if children exist.
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.

Protected Attributes

bool m_initialized { false }
 if initialized, the underlying ptree is has been assigned to (can be empty)
std::shared_ptr< ptreem_dataSPtr { nullptr }
const ptreem_dataPtr { nullptr }
std::string m_name {""}

Private Member Functions

virtual void update () override
 Update the internal data after modification of the data object.
void load ()

Private Attributes

unsigned int m_smk {0}
 the supermasterkey
unsigned int m_run {3}
std::map< std::string, TrigConf::L1Connectorm_connectors {}
 connector by name
std::map< std::string, std::string > m_threshold2ConnectorName {}
 connector name by threshold name
std::map< std::string, TrigConf::L1Boardm_boards {}
 board by name
std::map< std::string, std::vector< std::shared_ptr< TrigConf::L1Threshold > > > m_thresholdsByType {}
 threshold maps
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
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

Detailed Description

L1 menu configuration.

Provides access to menu name and ctpVersion and to the L1 items and thresholds

Definition at line 28 of file L1Menu.h.

Member Typedef Documentation

◆ const_iterator

Iterator over the L1 items.

Definition at line 64 of file L1Menu.h.

◆ ptree

using TrigConf::DataStructure::ptree = boost::property_tree::ptree
inherited

Definition at line 40 of file DataStructure.h.

Constructor & Destructor Documentation

◆ L1Menu() [1/2]

TrigConf::L1Menu::L1Menu ( )

Constructor.

Definition at line 10 of file L1Menu.cxx.

11{}

◆ L1Menu() [2/2]

TrigConf::L1Menu::L1Menu ( const ptree & data)

Constructor initialized with configuration data.

Parameters
dataThe data containing the L1 menu

Definition at line 13 of file L1Menu.cxx.

15{
16 load();
17}
const ptree & data() const
Access to the underlying data, if needed.
DataStructure()
Default constructor, leading to an uninitialized configuration object.

◆ ~L1Menu()

virtual TrigConf::L1Menu::~L1Menu ( )
overridevirtualdefault

Destructor.

Member Function Documentation

◆ algorithm()

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.

383{
384 try {
385 return * m_algorithmsByName.at(category).at(algoName);
386 }
387 catch(std::exception & ex) {
388 std::cerr << "No algorithm " << algoName << " of category " << category << " defined in the L1 menu" << std::endl;
389 throw;
390 }
391}
std::map< std::string, std::map< std::string, TrigConf::L1TopoAlgorithm * > > m_algorithmsByName
Definition L1Menu.h:186

◆ algorithmFromOutput()

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.

Parameters
fullOutputNamestring name of the output prefixed with the category, e.g. ("HT150-J20s5.ETA31","TOPO") or ("0INVM9-EM7ab-EMab","R2TOPO")
Returns
reference to the algorithm that produces this output

Definition at line 417 of file L1Menu.cxx.

418{
419 try {
420 return * m_algorithmsByOutput.at(type).at(bareOutputName);
421 }
422 catch(std::exception & ex) {
423 std::cerr << "No output " << bareOutputName << " defined by any algorithm of type " << type << " in the L1 menu" << std::endl;
424 throw;
425 }
426}
std::map< std::string, std::map< std::string, TrigConf::L1TopoAlgorithm * > > m_algorithmsByOutput
Definition L1Menu.h:187

◆ algorithmFromTriggerline()

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.

Parameters
triggerlineNamestring name of the triggerline
Returns
reference to the algorithm that produces this output

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.

395{
396 std::string category {"MULTTOPO"};
397 std::string outputName {triggerlineName};
398 if( std::size_t pos = triggerlineName.find('_'); pos != std::string::npos ) {
399 category = triggerlineName.substr(0,pos);
400 outputName = triggerlineName.substr(pos+1);
401 }
402 const static std::vector<string> topoTypes {"TOPO", "R2TOPO", "MULTTOPO", "MUTOPO"};
403 if( std::none_of(cbegin(topoTypes), cend(topoTypes), [&category](const std::string & str){return str==category;}) ) {
404 std::string msg = "L1Menu::algorithmFromTriggerLine(" + triggerlineName + "): triggerline " + triggerlineName + " is not produced by a topo algorithm.";
405 throw std::runtime_error(msg);
406 }
407 try {
408 return * m_algorithmsByOutput.at(category).at(outputName);
409 }
410 catch(std::exception & ex) {
411 std::cerr << "L1Menu::algorithmFromTriggerLine(): No output " << outputName << " defined by any algorithm of category " << category << " in the L1 menu. (It was asked for " << triggerlineName << ")" << std::endl;
412 throw;
413 }
414}
str outputName
Definition lumiFormat.py:65
MsgStream & msg
Definition testRead.cxx:32

◆ begin()

TrigConf::L1Menu::const_iterator TrigConf::L1Menu::begin ( ) const

Begin of the L1 items list.

Needed for range-based loops

Definition at line 216 of file L1Menu.cxx.

217{
218 return {data().get_child("items"), 0, [](auto & x){return L1Item(x.second);}};
219}
#define x

◆ board()

const TrigConf::L1Board & TrigConf::L1Menu::board ( const std::string & boardName) const

Access to boards by name.

Definition at line 429 of file L1Menu.cxx.

430{
431 try {
432 return m_boards.at(boardName);
433 }
434 catch(std::exception & ex) {
435 std::cerr << "No board " << boardName << " defined in the L1 menu" << std::endl;
436 throw;
437 }
438}
std::map< std::string, TrigConf::L1Board > m_boards
board by name
Definition L1Menu.h:175

◆ boardNames()

std::vector< std::string > TrigConf::L1Menu::boardNames ( ) const

Board names.

Definition at line 441 of file L1Menu.cxx.

442{
443 std::vector<std::string> boardNames;
444 boardNames.reserve(m_boards.size());
445 for(auto & board : m_boards) {
446 boardNames.emplace_back(board.first);
447 }
448 return boardNames;
449}
std::vector< std::string > boardNames() const
Board names.
Definition L1Menu.cxx:441
const TrigConf::L1Board & board(const std::string &boardName) const
Access to boards by name.
Definition L1Menu.cxx:429

◆ className()

virtual std::string TrigConf::L1Menu::className ( ) const
inlineoverridevirtual

A string that is the name of the class.

Reimplemented from TrigConf::DataStructure.

Definition at line 43 of file L1Menu.h.

43 {
44 return "L1Menu";
45 }

◆ clear()

void TrigConf::L1Menu::clear ( )
overridevirtual

Clearing the configuration data.

Reimplemented from TrigConf::DataStructure.

Definition at line 150 of file L1Menu.cxx.

151{
153
154 m_smk = 0;
155 m_run = 3;
156 m_connectors.clear();
158 m_boards.clear();
159 m_thresholdsByType.clear();
160 m_thresholdsByName.clear();
162
163 m_thrExtraInfo.clear();
164
166 m_algorithmsByName.clear();
167 m_algorithmsByOutput.clear();
168
169 m_ctp.clear();
170}
virtual void clear()
Clearing the configuration data.
std::map< std::string, std::vector< TrigConf::L1TopoAlgorithm > > m_algorithmsByCategory
algorithm maps
Definition L1Menu.h:185
std::map< std::string, std::vector< std::shared_ptr< TrigConf::L1Threshold > > > m_thresholdsByType
threshold maps
Definition L1Menu.h:178
std::map< std::string, TrigConf::L1Connector > m_connectors
connector by name
Definition L1Menu.h:169
unsigned int m_run
Definition L1Menu.h:166
TrigConf::L1CTP m_ctp
Definition L1Menu.h:189
std::map< std::string, std::map< unsigned int, std::shared_ptr< TrigConf::L1Threshold > > > m_thresholdsByTypeAndMapping
Definition L1Menu.h:180
std::map< std::string, std::shared_ptr< TrigConf::L1Threshold > > m_thresholdsByName
Definition L1Menu.h:179
unsigned int m_smk
the supermasterkey
Definition L1Menu.h:164
std::map< std::string, std::string > m_threshold2ConnectorName
connector name by threshold name
Definition L1Menu.h:172
TrigConf::L1ThrExtraInfo m_thrExtraInfo
Definition L1Menu.h:182

◆ connector()

const TrigConf::L1Connector & TrigConf::L1Menu::connector ( const std::string & connectorName) const

Access to connector by name.

Definition at line 335 of file L1Menu.cxx.

335 {
336 try {
337 return m_connectors.at(connectorName);
338 }
339 catch(std::exception & ex) {
340 std::cerr << "No connector " << connectorName << " defined in the L1 menu" << std::endl;
341 throw;
342 }
343}

◆ connectorNameFromThreshold()

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.

314{
315 try {
316 return m_threshold2ConnectorName.at(thresholdName);
317 }
318 catch(...) {
319 std::cerr << "Threshold '" << thresholdName << "' not defined as triggerline in the L1 menu" << std::endl;
320 throw;
321 }
322}

◆ connectorNames()

std::vector< std::string > TrigConf::L1Menu::connectorNames ( ) const

Connector names.

Definition at line 325 of file L1Menu.cxx.

325 {
326 std::vector<std::string> connNames;
327 connNames.reserve(m_connectors.size());
328 for( auto & x : m_connectors ) {
329 connNames.emplace_back(x.first);
330 }
331 return connNames;
332}

◆ ctp()

const TrigConf::L1CTP & TrigConf::L1Menu::ctp ( ) const
inline

the CTP configuration

Definition at line 145 of file L1Menu.h.

145{ return m_ctp; }

◆ ctpVersion()

unsigned int TrigConf::L1Menu::ctpVersion ( ) const

Accessor to the version of the CTP format.

Definition at line 179 of file L1Menu.cxx.

180{
181 return getAttribute<unsigned int>("ctpVersion");
182}
T getAttribute(const std::string &key, bool ignoreIfMissing=false, const T &def=T()) const
Access to simple attribute.

◆ data()

const ptree & TrigConf::DataStructure::data ( ) const
inlineinherited

Access to the underlying data, if needed.

Definition at line 83 of file DataStructure.h.

83 {
84 if( ! isInitialized() ) {
85 throw std::runtime_error("Trying to access data of uninitialized object of type " + className());
86 }
87 // Don't use ?: operator here: it confuses cppcheck.
88 if (ownsData()) {
89 return *m_dataSPtr.get();
90 }
91 return *m_dataPtr;
92 }
std::shared_ptr< ptree > m_dataSPtr
virtual std::string className() const
A string that is the name of the class.

◆ empty()

bool TrigConf::DataStructure::empty ( ) const
inlineinherited

Check if children exist.

Definition at line 219 of file DataStructure.h.

219{ return data().empty(); }

◆ end()

TrigConf::L1Menu::const_iterator TrigConf::L1Menu::end ( ) const

End of the L1 items list.

Needed for range-based loops

Definition at line 223 of file L1Menu.cxx.

224{
225 const auto & items = data().get_child("items");
226 return {items, items.size(), [](auto & x){return L1Item(x.second);}};
227}

◆ getAttribute() [1/2]

const std::string & TrigConf::DataStructure::getAttribute ( const std::string & key,
bool ignoreIfMissing = false,
const std::string & def = "" ) const
inherited

Definition at line 135 of file DataStructure.cxx.

136{
137 const auto & obj = data().get_child_optional(key);
138 if( !obj ) {
139 if( ignoreIfMissing ) {
140 return def;
141 } else {
142 throw std::runtime_error(className() + "#" + name() + ": structure '" + key + "' does not exist" );
143 }
144 }
145 // check if the key points to a plain string value
146 if ( !obj.get().empty() ) {
147 if ( obj.get().front().first.empty() ) {
148 throw std::runtime_error(className() + "#" + name() + ": structure '" + key + "' is not a simple attribute but a list [], it needs to be accessed via getList(\"" + key + "\") -> vector<DataStructure>");
149 } else {
150 throw std::runtime_error(className() + "#" + name() + ": structure '" + key + "' is not a simple attribute but an object {}, it needs to be accessed via getObject(\"" + key + "\") -> DataStructure");
151 }
152 }
153 return obj.get().data();
154}
virtual const std::string & name() const final

◆ getAttribute() [2/2]

template<class T>
T TrigConf::DataStructure::getAttribute ( const std::string & key,
bool ignoreIfMissing = false,
const T & def = T() ) const
inlineinherited

Access to simple attribute.

Parameters
keyThe path to the attribute name, relative to the current one in form "path.to.child"
ignoreIfMissingControls the behavior in case of missing configuration child

Definition at line 152 of file DataStructure.h.

152 {
153 const auto & obj = data().get_child_optional(key);
154 if( !obj ) {
155 if( ignoreIfMissing ) {
156 return def;
157 } else {
158 throw std::runtime_error(className() + "#" + name() + ": structure '" + key + "' does not exist" );
159 }
160 }
161 return obj.get().get_value<T>();
162 }
unsigned long long T

◆ getAttribute_optional()

template<class T>
std::optional< T > TrigConf::DataStructure::getAttribute_optional ( const std::string & key) const
inlineinherited

Definition at line 165 of file DataStructure.h.

165 {
166 const auto & obj = data().get_child_optional(key);
167 if( ! obj ) {
168 return std::nullopt;
169 }
170 auto v = obj.get().get_value_optional<T>();
171 return v ? std::optional(std::move(*v)) : std::nullopt;
172 }

◆ getKeys()

std::vector< std::string > TrigConf::DataStructure::getKeys ( ) const
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 249 of file DataStructure.cxx.

250{
251 std::vector<std::string> keys;
252 if ( ! data().empty() &&
253 ! data().front().first.empty() )
254 {
255 keys.reserve(data().size());
256 for( auto & entry : data() ) {
257 keys.push_back(entry.first);
258 }
259 }
260 return keys;
261}
bool empty() const
Check if children exist.
bool first
Definition DeMoScan.py:534

◆ getList()

std::vector< TrigConf::DataStructure > TrigConf::DataStructure::getList ( const std::string & pathToChild,
bool ignoreIfMissing = false ) const
inherited

Access to array structure.

Parameters
pathToChildThe path to the configuration child, relative to the current one in form "path.to.child"
ignoreIfMissingControls 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 157 of file DataStructure.cxx.

158{
159 std::vector<TrigConf::DataStructure> childList;
160 const auto & list = data().get_child_optional(pathToChild);
161 if( ! list ) {
162 if ( ignoreIfMissing ) {
163 return childList;
164 } else {
165 throw std::runtime_error(className() + "#" + name() + ": structure '" + pathToChild + "' does not exist.");
166 }
167 }
168
169 // check if the pathToChild points to a list
170
171 // this check is not complete, because boost::ptree can not
172 // distinguish between and empty list and an empty string. In both cases
173 // the value is empty and there are no children
174
175 if ( list.get().empty() ) {
176 if ( list.get().get_value<std::string>() != "" ) {
177 // if the value is not empty, then it is for sure an attribute ("key" : "value")
178 throw std::runtime_error(className() + "#" + name() + ": structure '" + pathToChild + "' is not a list [] but a simple attribute, it needs to be accessed via [\"" + pathToChild + "\"] -> string");
179 }
180 // else: if the value is empty, we can not say for sure and will not
181 // give this debugging hint (an empty list will be returned
182 } else if ( ! list.get().front().first.empty() ) {
183 throw std::runtime_error(className() + "#" + name() + ": structure '" + pathToChild + "' is not a list [] but an object {}, it needs to be accessed via getObject(\"" + pathToChild + "\") -> DataStructure");
184 }
185
186 childList.reserve(list.get().size());
187
188 for( auto & childData : list.get() )
189 childList.emplace_back( childData.second );
190
191 return childList;
192}
list(name, path='/')
Definition histSizes.py:38

◆ getList_optional()

std::optional< std::vector< TrigConf::DataStructure > > TrigConf::DataStructure::getList_optional ( const std::string & pathToChild) const
inherited

Definition at line 196 of file DataStructure.cxx.

197{
198 if(data().find(pathToChild) == data().not_found()) {
199 return std::nullopt;
200 }
201 return std::optional<std::vector<TrigConf::DataStructure> >(getList(pathToChild));
202}
std::vector< DataStructure > getList(const std::string &pathToChild, bool ignoreIfMissing=false) const
Access to array structure.
std::string find(const std::string &s)
return a remapped string
Definition hcg.cxx:138

◆ getObject()

TrigConf::DataStructure TrigConf::DataStructure::getObject ( const std::string & pathToChild,
bool ignoreIfMissing = false ) const
inherited

Access to configuration object.

Parameters
pathToChildThe path to the configuration child, relative to the current one
ignoreIfMissingControls 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.

*bool ignoreIfMissing = true;
*if( const DataStructure & child = ds.getObject("path.to.child", ignoreIfMissing) ) {
cout << child["key"] << endl;
}

Definition at line 206 of file DataStructure.cxx.

207{
208 const auto & obj = data().get_child_optional(pathToChild);
209 if( ! obj ) {
210 if ( ignoreIfMissing ) {
211 return DataStructure();
212 } else {
213 throw std::runtime_error(className() + "#" + name() + ": structure '" + pathToChild + "' does not exist.");
214 }
215 }
216 // check if the pathToChild is an attribute
217 if( obj.get().get_value<std::string>() != "" ) {
218 throw std::runtime_error(className() + "#" + name() + ": structure '" + pathToChild + "' is not an object {} but a simple attribute, it needs to be accessed via [\"" + pathToChild + "\"] -> string");
219 }
220 // check if the pathToChild points to a list
221 if ( obj.get().front().first.empty() ) {
222 throw std::runtime_error(className() + "#" + name() + ": structure '" + pathToChild + "' is not an object {} but a list [], it needs to be accessed via getList(\"" + pathToChild + "\") -> vector<DataStructure>");
223 }
224 return { obj.get() };
225}

◆ getObject_optional()

std::optional< TrigConf::DataStructure > TrigConf::DataStructure::getObject_optional ( const std::string & pathToChild) const
inherited

Definition at line 229 of file DataStructure.cxx.

230{
231
232 if(const auto & obj = data().get_child_optional(pathToChild)) {
233 // check if the pathToChild is an attribute
234 if( obj.get().get_value<std::string>() != "" ) {
235 throw std::runtime_error(className() + "#" + name() + ": structure '" + pathToChild + "' is not an object {} but a simple attribute, it needs to be accessed via [\"" + pathToChild + "\"] -> string");
236 }
237 // check if the pathToChild points to a list
238 if ( obj.get().front().first.empty() ) {
239 throw std::runtime_error(className() + "#" + name() + ": structure '" + pathToChild + "' is not an object {} but a list [], it needs to be accessed via getList(\"" + pathToChild + "\") -> vector<DataStructure>");
240 }
241 return std::optional<TrigConf::DataStructure>(obj.get());
242 }
243 return std::nullopt;
244}

◆ getValue() [1/2]

std::string TrigConf::DataStructure::getValue ( ) const
inherited

Access to simple content.

Returns
string that is the content of the structure

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.

80 {
81 return data().get_value<std::string>();
82}

◆ getValue() [2/2]

template<class T>
T TrigConf::DataStructure::getValue ( ) const
inlineinherited

Definition at line 108 of file DataStructure.h.

108 {
109 return data().get_value<T>();
110 }

◆ getValue_optional()

template<class T>
std::optional< T > TrigConf::DataStructure::getValue_optional ( ) const
inlineinherited

access to content of the note Will return false if the value could not be converted into T

Definition at line 116 of file DataStructure.h.

116 {
117 auto v = data().get_value_optional<T>();
118 return v ? std::optional<T>(std::move(*v)) : std::nullopt;
119 }

◆ hasAttribute()

bool TrigConf::DataStructure::hasAttribute ( const std::string & key) const
inherited

Check for attribute.

Parameters
keyThe path to the attribute name, relative to the current one in form "path.to.child"
Returns
true if path key exists and is an attribute

Definition at line 85 of file DataStructure.cxx.

85 {
86 const auto & child = data().get_child_optional( key );
87 if( ! bool(child) ) // key does not exist
88 return false;
89 return child.get().empty(); // if empty then it is an attribute, otherwise a child note
90}

◆ hasChild()

bool TrigConf::DataStructure::hasChild ( const std::string & path) const
inherited

Check if child exists.

Parameters
pathThe path to the child, relative to the current one in form "path.to.child"
Returns
true if path exists

Definition at line 113 of file DataStructure.cxx.

113 {
114 const auto & child = data().get_child_optional( path );
115 return bool(child);
116}
setBGCode setTAP setLVL2ErrorBits bool

◆ isInitialized()

bool TrigConf::DataStructure::isInitialized ( ) const
inlineinherited

Definition at line 216 of file DataStructure.h.

216{ return m_initialized; }
bool m_initialized
if initialized, the underlying ptree is has been assigned to (can be empty)

◆ isNull()

bool TrigConf::DataStructure::isNull ( const std::string & key) const
inherited

Check if an attribute is null.

Parameters
keyThe path to the attribute name, relative to the current one in form "path.to.child"
Returns
true if path key exists and is null

If 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 93 of file DataStructure.cxx.

93 {
94 auto child = data().get_child_optional( key );
95 if( ! child ) {
96 return false;
97 }
98 return child->get_value<std::string>() == "null";
99}

◆ isRun2()

bool TrigConf::L1Menu::isRun2 ( ) const
inline

Definition at line 150 of file L1Menu.h.

150{ return m_run == 2; }

◆ isValid()

bool TrigConf::DataStructure::isValid ( ) const
inlineinherited

Definition at line 215 of file DataStructure.h.

215{ return m_initialized; }

◆ isValue()

bool TrigConf::DataStructure::isValue ( ) const
inherited

Check for attribute.

Returns
true if the structure is just a value

Definition at line 74 of file DataStructure.cxx.

74 {
75 return data().empty(); // just a key->value pair, no children
76}

◆ item()

TrigConf::L1Item TrigConf::L1Menu::item ( const std::string & itemName) const

Get item by name.

Definition at line 201 of file L1Menu.cxx.

202{
203 if(itemName=="") {
204 throw std::runtime_error("L1Menu::item() was called with empty itemName");
205 }
206 const ptree * pt;
207 try {
208 pt = & data().get_child(ptree::path_type("items/"+itemName,'/')); // '/' is not used in any item Name, so we can use it as separator in the path
209 } catch(boost::property_tree::ptree_bad_path & ex) {
210 throw std::runtime_error("L1Item " + itemName + " does not exist in the menu");
211 }
212 return L1Item(*pt);
213}
boost::property_tree::ptree ptree

◆ load()

void TrigConf::L1Menu::load ( )
private

Definition at line 20 of file L1Menu.cxx.

21{
22 if(! isInitialized() || empty() ) {
23 return;
24 }
25
26 m_run = getAttribute_optional<int>("run").value_or(3);
27
28 // thresholds
29 try {
30 m_name = getAttribute("name");
31 for( const std::string path : {"thresholds", "thresholds.legacyCalo" } ) {
32 for( auto & thrByType : data().get_child( path ) ) {
33 const std::string & thrType = thrByType.first;
34 if (thrType == "legacyCalo")
35 continue;
36
37 // first create the extraInfo object for this type of thresholds
38 auto extraInfo = m_thrExtraInfo.addExtraInfo(thrByType.first,thrByType.second);
39
40 auto & v = m_thresholdsByType[thrType] = std::vector<std::shared_ptr<TrigConf::L1Threshold>>();
41 if(thrType == "internal") {
42 for( auto & thr : data().get_child( path + ".internal.names") ) {
43 const std::string thrName = thr.second.data();
44 v.push_back( L1Threshold::createThreshold( thrName, thrType, extraInfo, thr.second ) );
45 }
46 } else {
47 for( auto & thr : data().get_child( path + "." + thrType + ".thresholds") ) {
48 const std::string thrName = thr.first;
49 v.push_back( L1Threshold::createThreshold( thrName, thrType, extraInfo, thr.second ) );
50 }
51 }
52 for( auto & thr : v ) {
53 m_thresholdsByName[ thr->name() ] = thr;
54 }
55 for (auto &thr : v) {
56 m_thresholdsByTypeAndMapping[thrType][thr->mapping()] = thr;
57 }
58 }
59 }
60 }
61 catch(std::exception & ex) {
62 std::cerr << "ERROR: problem when building L1 menu structure (thresholds). " << ex.what() << std::endl;
63 throw;
64 }
65
66 // boards
67 try {
68 for( auto & board : data().get_child( "boards" ) ) {
69 m_boards.emplace( std::piecewise_construct,
70 std::forward_as_tuple(board.first),
71 std::forward_as_tuple(board.first, board.second) );
72 }
73 }
74 catch(std::exception & ex) {
75 std::cerr << "ERROR: problem when building L1 menu structure (boards). " << ex.what() << std::endl;
76 throw;
77 }
78
79 // connectors
80 try {
81 for( auto & conn : data().get_child( "connectors" ) ) {
82 auto res = m_connectors.emplace( std::piecewise_construct,
83 std::forward_as_tuple(conn.first),
84 std::forward_as_tuple(conn.first, conn.second) );
85 for( auto & tl : res.first->second.triggerLineNames() ) {
86 m_threshold2ConnectorName.emplace( std::piecewise_construct,
87 std::forward_as_tuple(tl),
88 std::forward_as_tuple(conn.first));
89 }
90 }
91 }
92 catch(std::exception & ex) {
93 std::cerr << "ERROR: problem when building L1 menu structure (connectors). " << ex.what() << std::endl;
94 throw;
95 }
96
97 // algorithms
98 if(m_run>1) {
99 try {
100 auto topoCategories = isRun2() ? std::vector<std::string> {"R2TOPO"} : std::vector<std::string> {"TOPO", "MUTOPO", "MULTTOPO", "R2TOPO"};
101 for( const std::string& algoCategory : topoCategories ) {
102 auto & v = m_algorithmsByCategory[algoCategory] = std::vector<TrigConf::L1TopoAlgorithm>();
103 m_algorithmsByName.emplace(algoCategory, std::map<std::string, TrigConf::L1TopoAlgorithm*>());
104 m_algorithmsByOutput.emplace(algoCategory, std::map<std::string, TrigConf::L1TopoAlgorithm*>());
105 if(algoCategory == "MULTTOPO") {
106 for( auto & alg : data().get_child( "topoAlgorithms." + algoCategory + ".multiplicityAlgorithms" ) ) {
107 v.emplace_back( alg.first, L1TopoAlgorithm::AlgorithmType::MULTIPLICITY, algoCategory, alg.second );
108 }
109 } else {
111 std::string subpath = "topoAlgorithms." + algoCategory + (algoType==L1TopoAlgorithm::AlgorithmType::DECISION ? ".decisionAlgorithms" : ".sortingAlgorithms" );
112 for( auto & algorithm : data().get_child( subpath ) ) {
113 v.emplace_back( algorithm.first, algoType, algoCategory, algorithm.second );
114 }
115 }
116 }
117 for( auto & algo : v ) {
118 if( m_algorithmsByName[algoCategory].count(algo.name()) > 0 ) {
119 std::cerr << "ERROR : Topo algorithm with name " << algo.name() << " and of type " << algoCategory << " already exists" << std::endl;
120 throw std::runtime_error("Found duplicate topo algorithm name " + algo.name() + " of type " + algoCategory);
121 }
122 m_algorithmsByName[ algoCategory ][ algo.name() ] = & algo;
123 for( const std::string & output : algo.outputs() ) {
124 if( m_algorithmsByOutput[algoCategory].count(output) > 0 ) {
125 std::cerr << "ERROR : Topo algorithm output " << output << " already exists" << std::endl;
126 throw std::runtime_error("Found duplicate topo algorithm output " + output + " of type " + algoCategory);
127 }
128 m_algorithmsByOutput[algoCategory][output] = & algo;
129 }
130 }
131 }
132 }
133 catch(std::exception & ex) {
134 std::cerr << "ERROR: problem when building L1 menu structure (algorithms). " << ex.what() << std::endl;
135 throw;
136 }
137 }
138
139 // CTP
140 try {
141 m_ctp.setData(data().get_child("ctp"));
142 }
143 catch(std::exception & ex) {
144 std::cerr << "ERROR: problem when building L1 menu structure (CTP). " << ex.what() << std::endl;
145 throw;
146 }
147}
std::pair< std::vector< unsigned int >, bool > res
std::optional< T > getAttribute_optional(const std::string &key) const
const TrigConf::L1TopoAlgorithm & algorithm(const std::string &algoName, const std::string &category) const
Access to topo algorithm by name.
Definition L1Menu.cxx:382
bool isRun2() const
Definition L1Menu.h:150
static std::shared_ptr< L1Threshold > createThreshold(const std::string &name, const std::string &type, std::weak_ptr< L1ThrExtraInfoBase > extraInfo, const ptree &data)
static method to create type-specific L1Thresholds
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
output
Definition merge.py:16

◆ name()

const std::string & TrigConf::DataStructure::name ( ) const
finalvirtualinherited

Definition at line 108 of file DataStructure.cxx.

108 {
109 return m_name;
110}

◆ operator bool()

TrigConf::DataStructure::operator bool ( ) const
inlineexplicitinherited

Access to initialized state.

Definition at line 214 of file DataStructure.h.

214{ return m_initialized; }

◆ operator[]()

std::string TrigConf::DataStructure::operator[] ( const std::string & key) const
inherited

Access to simple attribute.

Parameters
keyThe path to the attribute name, relative to the current one in form "path.to.child"

Definition at line 120 of file DataStructure.cxx.

121{
122 const auto & obj = data().get_child(key);
123 // check if the key points to a plain string value
124 if ( !obj.empty() ) {
125 if ( obj.front().first.empty() ) {
126 throw std::runtime_error(className() + "#" + name() + ": structure '" + key + "' is not a simple attribute but a list [], it needs to be accessed via getList(\"" + key + "\") -> vector<DataStructure>");
127 } else {
128 throw std::runtime_error(className() + "#" + name() + ": structure '" + key + "' is not a simple attribute but an object {}, it needs to be accessed via getObject(\"" + key + "\") -> DataStructure");
129 }
130 }
131 return obj.data();
132}

◆ ownsData()

bool TrigConf::DataStructure::ownsData ( ) const
inlineinherited

Definition at line 242 of file DataStructure.h.

242 {
243 return (bool)m_dataSPtr;
244 }

◆ print()

void TrigConf::DataStructure::print ( std::ostream & os = std::cout) const
virtualinherited

Reimplemented in TrigConf::L1Threshold_EM, and TrigConf::L1TopoAlgorithm.

Definition at line 271 of file DataStructure.cxx.

272{
273 printElement("", data(), 0, os);
274 os << std::endl;
275}
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.

◆ printElement()

void TrigConf::DataStructure::printElement ( const std::string & key,
const ptree & data,
uint level = 0,
std::ostream & os = std::cout )
staticinherited

Static function to print a ptree object.

Parameters
keyThe key of this data as found in the parent structure
dataThe ptree to print
levelThe substruture level used to indent the output
osThe output stream

Definition at line 278 of file DataStructure.cxx.

279{
280 constexpr char del = '"';
281
282 const std::string value = data.get_value<std::string>();
283
284 if( data.empty() ) { // no children, so just a key->value pair
285 uint n(4*level); while(n--) os << " ";
286 os << del << key << del << ": " << del << value << del;
287 return;
288 }
289
290
291 bool isArray ( data.begin()->first.empty() ); // dictionaries have keys, arrays don't
292 { uint n(4*level); while(n--) os << " "; }
293 if ( ! key.empty() )
294 os << del << key << del << ": ";
295 os << (isArray ? "[" : "{") << std::endl;
296
297 size_t childCounter = data.size();
298 for( const boost::property_tree::ptree::value_type & x : data ) {
299 printElement(x.first, x.second, level + 1, os);
300 if( --childCounter ) os << ",";
301 os << std::endl;
302 }
303 { uint n(4*level); while(n--) os << " "; }
304 os << (isArray ? "]" : "}");
305
306}
unsigned int uint

◆ printMenu()

void TrigConf::L1Menu::printMenu ( bool full = false) const

print overview of L1 Menu

Definition at line 455 of file L1Menu.cxx.

456{
457 cout << "L1 menu '" << name() << "'" << endl;
458 cout << "Items: " << size() << endl;
459 if(full) {
460 int c(0);
461 for(const L1Item & item : *this ) {
462 cout << " " << c++ << ": " << item.name() << endl;
463 }
464 }
465 cout << "Thresholds: " << thresholds().size() << "(of " << thresholdTypes().size() << " different types)" << endl;
466 if(full) {
467 int c(0);
468 for(const std::string & thrType : thresholdTypes() ) {
469 cout << thrType << " :" << endl;
470 for(auto & thr : thresholds(thrType)) {
471 cout << " " << c++ << ": " << thr->name() << "[" << thr->type() << "]" << endl;
472 }
473 }
474 }
475 if(m_run>1) {
476 cout << "Topo algorithms: " << endl;
477 cout << " new : " << data().get_child("topoAlgorithms.TOPO.decisionAlgorithms").size() << endl;
478 cout << " muon : " << data().get_child("topoAlgorithms.MUTOPO.decisionAlgorithms").size() << endl;
479 cout << " mult : " << data().get_child("topoAlgorithms.MULTTOPO.multiplicityAlgorithms").size() << endl;
480 cout << " legacy: " << data().get_child("topoAlgorithms.R2TOPO.decisionAlgorithms").size() << endl;
481 }
482 cout << "Boards: " << data().get_child("boards").size() << endl;
483 cout << "Connectors: " << data().get_child("connectors").size() << endl;
484 unsigned int ctpinputs = data().get_child("ctp.inputs.optical").size();
485 ctpinputs += data().get_child("ctp.inputs.electrical").size();
486 ctpinputs += data().get_child("ctp.inputs.ctpin.slot7").size();
487 ctpinputs += data().get_child("ctp.inputs.ctpin.slot8").size();
488 ctpinputs += data().get_child("ctp.inputs.ctpin.slot9").size();
489 cout << "CTP connections: " << ctpinputs << endl;
490}
std::vector< std::shared_ptr< TrigConf::L1Threshold > > thresholds() const
Access to list of all L1Thresholds.
Definition L1Menu.cxx:267
std::vector< std::string > thresholdTypes() const
List of L1 thresholds types.
Definition L1Menu.cxx:231
std::size_t size() const
Accessor to the number of L1 items.
Definition L1Menu.cxx:185
L1Item item(const std::string &itemName) const
Get item by name.
Definition L1Menu.cxx:201

◆ printRaw()

void TrigConf::DataStructure::printRaw ( std::ostream & os = std::cout) const
inherited

Definition at line 264 of file DataStructure.cxx.

265{
266 boost::property_tree::json_parser::write_json( os, data() );
267}

◆ run()

unsigned int TrigConf::L1Menu::run ( ) const
inline

Definition at line 152 of file L1Menu.h.

152{ return m_run; }

◆ setData() [1/2]

void TrigConf::DataStructure::setData ( const ptree & data)
inherited

Setting the configuration data.

Definition at line 39 of file DataStructure.cxx.

40{
41 clear();
42 m_initialized = true;
43 m_dataSPtr.reset();
44 m_dataPtr = &data;
45 update();
46}
virtual void update()
Update the internal data after modification of the data object.

◆ setData() [2/2]

void TrigConf::DataStructure::setData ( ptree && data)
inherited

Definition at line 50 of file DataStructure.cxx.

51{
52 clear();
53 m_initialized = true;
54 m_dataSPtr = std::make_shared<ptree>(std::move(data));
55 m_dataPtr = nullptr;
56 update();
57}

◆ setName()

void TrigConf::DataStructure::setName ( const std::string & n)
inherited

Setting the configuration element name.

Definition at line 59 of file DataStructure.cxx.

59 {
60 m_name = n;
61}

◆ setSMK()

void TrigConf::L1Menu::setSMK ( unsigned int psk)

Definition at line 196 of file L1Menu.cxx.

196 {
197 m_smk = smk;
198}
unsigned int smk() const
setter and getter for the supermasterkey
Definition L1Menu.cxx:191

◆ size()

std::size_t TrigConf::L1Menu::size ( ) const

Accessor to the number of L1 items.

Definition at line 185 of file L1Menu.cxx.

186{
187 return data().get_child("items").size();
188}

◆ smk()

unsigned int TrigConf::L1Menu::smk ( ) const

setter and getter for the supermasterkey

Definition at line 191 of file L1Menu.cxx.

191 {
192 return m_smk;
193}

◆ threshold() [1/2]

const TrigConf::L1Threshold & TrigConf::L1Menu::threshold ( const std::string & thresholdName) const

Access to L1Threshold by name.

Definition at line 279 of file L1Menu.cxx.

280{
281 try {
282 return * m_thresholdsByName.at(thresholdName);
283 }
284 catch(std::exception & ex) {
285 std::cerr << "No threshold '" << thresholdName << "' defined in the thresholds section of the L1 menu" << std::endl;
286 throw;
287 }
288}

◆ threshold() [2/2]

const TrigConf::L1Threshold & TrigConf::L1Menu::threshold ( const std::string & typeName,
unsigned int mapping ) const

Access to L1Threshold by type and mapping index.

Definition at line 292 of file L1Menu.cxx.

293{
294 try
295 {
296 return *m_thresholdsByTypeAndMapping.at(typeName).at(mapping);
297 }
298 catch (std::exception &ex)
299 {
300 std::cerr << "No threshold of type '" << typeName << "' with mapping " << mapping
301 << " defined in the thresholds section of the L1 menu" << std::endl;
302 throw;
303 }
304}

◆ thresholdNames()

std::vector< std::string > TrigConf::L1Menu::thresholdNames ( ) const

List of L1 thresholds names.

Definition at line 242 of file L1Menu.cxx.

243{
244 std::vector<std::string> thrNames;
245 thrNames.reserve(m_thresholdsByName.size());
246 for( const auto & x : m_thresholdsByName ) {
247 thrNames.emplace_back(x.first);
248 }
249 return thrNames;
250}

◆ thresholds() [1/2]

std::vector< std::shared_ptr< TrigConf::L1Threshold > > TrigConf::L1Menu::thresholds ( ) const

Access to list of all L1Thresholds.

Definition at line 267 of file L1Menu.cxx.

268{
269 std::vector<std::shared_ptr<TrigConf::L1Threshold>> thrlist;
270 for ( const std::string & type : thresholdTypes() ) {
271 const auto & thrOfType = thresholds(type);
272 std::copy(thrOfType.begin(), thrOfType.end(), std::back_inserter(thrlist));
273 }
274 return thrlist;
275}

◆ thresholds() [2/2]

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.

255{
256 try {
257 return m_thresholdsByType.at(typeName);
258 }
259 catch(std::exception & ex) {
260 std::cerr << "No threshold type '" << typeName << "' defined in the thresholds section of the L1 menu" << std::endl;
261 throw;
262 }
263}

◆ thresholdTypes()

std::vector< std::string > TrigConf::L1Menu::thresholdTypes ( ) const

List of L1 thresholds types.

Definition at line 231 of file L1Menu.cxx.

232{
233 std::vector<std::string> thrTypeNames;
234 thrTypeNames.reserve(m_thresholdsByType.size());
235 for( const auto & x : m_thresholdsByType ) {
236 thrTypeNames.emplace_back(x.first);
237 }
238 return thrTypeNames;
239}

◆ thrExtraInfo()

const TrigConf::L1ThrExtraInfo & TrigConf::L1Menu::thrExtraInfo ( ) const

Access to extra info for threshold types.

Definition at line 307 of file L1Menu.cxx.

308{
309 return m_thrExtraInfo;
310}

◆ topoAlgorithmNames()

std::vector< std::string > TrigConf::L1Menu::topoAlgorithmNames ( const std::string & category) const

Access to topo algorithm names.

Parameters
categorymust 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.

348{
349 std::vector<std::string> algoNames;
350 try {
351 for(auto & entry : m_algorithmsByName.at(category) ) {
352 algoNames.push_back(entry.first);
353 }
354 }
355 catch(std::exception & ex) {
356 std::cerr << "No algorithm category '" << category << "' defined in the L1 menu" << std::endl;
357 throw;
358 }
359 return algoNames;
360}

◆ topoAlgorithmOutputNames()

std::vector< std::string > TrigConf::L1Menu::topoAlgorithmOutputNames ( const std::string & category) const

Access to topo algoritm output names.

Definition at line 364 of file L1Menu.cxx.

365{
366 std::vector<std::string> outputNames;
367 try {
368 for(auto & entry : m_algorithmsByOutput.at(category) ) {
369 outputNames.push_back(entry.first);
370 }
371 }
372 catch(std::exception & ex) {
373 std::cerr << "No algorithm category '" << category << "' defined in the L1 menu" << std::endl;
374 throw;
375 }
376 return outputNames;
377}

◆ update()

virtual void TrigConf::L1Menu::update ( )
inlineoverrideprivatevirtual

Update the internal data after modification of the data object.

Reimplemented from TrigConf::DataStructure.

Definition at line 160 of file L1Menu.h.

160{ load(); };

◆ version()

unsigned int TrigConf::L1Menu::version ( ) const

Accessor to the menu version.

Definition at line 173 of file L1Menu.cxx.

174{
175 return getAttribute<unsigned int>("version");
176}

Member Data Documentation

◆ m_algorithmsByCategory

std::map<std::string, std::vector<TrigConf::L1TopoAlgorithm> > TrigConf::L1Menu::m_algorithmsByCategory {}
private

algorithm maps

Definition at line 185 of file L1Menu.h.

185{}; // primary set of vectors of algos, one per category (TOPO, R2TOPO, MUTOPO, MULTTOPO)

◆ m_algorithmsByName

std::map<std::string, std::map<std::string, TrigConf::L1TopoAlgorithm*> > TrigConf::L1Menu::m_algorithmsByName {}
private

Definition at line 186 of file L1Menu.h.

186{}; // map from category and algorithm name to algorithm

◆ m_algorithmsByOutput

std::map<std::string, std::map<std::string, TrigConf::L1TopoAlgorithm*> > TrigConf::L1Menu::m_algorithmsByOutput {}
private

Definition at line 187 of file L1Menu.h.

187{}; // map from category and output name to algorithm

◆ m_boards

std::map<std::string, TrigConf::L1Board> TrigConf::L1Menu::m_boards {}
private

board by name

Definition at line 175 of file L1Menu.h.

175{};

◆ m_connectors

std::map<std::string, TrigConf::L1Connector> TrigConf::L1Menu::m_connectors {}
private

connector by name

Definition at line 169 of file L1Menu.h.

169{};

◆ m_ctp

TrigConf::L1CTP TrigConf::L1Menu::m_ctp
private

Definition at line 189 of file L1Menu.h.

◆ m_dataPtr

const ptree* TrigConf::DataStructure::m_dataPtr { nullptr }
protectedinherited

Definition at line 257 of file DataStructure.h.

257{ nullptr }; // used when not owning the tree

◆ m_dataSPtr

std::shared_ptr<ptree> TrigConf::DataStructure::m_dataSPtr { nullptr }
protectedinherited

Definition at line 256 of file DataStructure.h.

256{ nullptr }; // used when owning the tree

◆ m_initialized

bool TrigConf::DataStructure::m_initialized { false }
protectedinherited

if initialized, the underlying ptree is has been assigned to (can be empty)

Definition at line 254 of file DataStructure.h.

254{ false };

◆ m_name

std::string TrigConf::DataStructure::m_name {""}
protectedinherited

Definition at line 259 of file DataStructure.h.

259{""}; // most objects are named

◆ m_run

unsigned int TrigConf::L1Menu::m_run {3}
private

Definition at line 166 of file L1Menu.h.

166{3}; // this variable is set to 2 for L1 menus from Run 2 which have a much reduced content

◆ m_smk

unsigned int TrigConf::L1Menu::m_smk {0}
private

the supermasterkey

Definition at line 164 of file L1Menu.h.

164{0};

◆ m_threshold2ConnectorName

std::map<std::string, std::string> TrigConf::L1Menu::m_threshold2ConnectorName {}
private

connector name by threshold name

Definition at line 172 of file L1Menu.h.

172{};

◆ m_thresholdsByName

std::map<std::string, std::shared_ptr<TrigConf::L1Threshold> > TrigConf::L1Menu::m_thresholdsByName {}
private

Definition at line 179 of file L1Menu.h.

179{};

◆ m_thresholdsByType

std::map<std::string, std::vector<std::shared_ptr<TrigConf::L1Threshold> > > TrigConf::L1Menu::m_thresholdsByType {}
private

threshold maps

Definition at line 178 of file L1Menu.h.

178{};

◆ m_thresholdsByTypeAndMapping

std::map<std::string, std::map<unsigned int, std::shared_ptr<TrigConf::L1Threshold> > > TrigConf::L1Menu::m_thresholdsByTypeAndMapping {}
private

Definition at line 180 of file L1Menu.h.

180{};

◆ m_thrExtraInfo

TrigConf::L1ThrExtraInfo TrigConf::L1Menu::m_thrExtraInfo
private

Definition at line 182 of file L1Menu.h.


The documentation for this class was generated from the following files: