![]() |
ATLAS Offline Software
|
Loader of trigger configurations from Json files. More...
#include <JsonFileLoader.h>
Public Member Functions | |
| JsonFileLoader () | |
| Constructor. | |
| virtual | ~JsonFileLoader () override=default |
| Destructor. | |
| bool | loadFile (const std::string &filename, boost::property_tree::ptree &data, const std::string &pathToChild="") const |
| Load content of json file into a ptree. | |
| bool | loadFile (const std::string &filename, DataStructure &data, const std::string &pathToChild="") const |
| Load content of json file into a ptree. | |
| bool | saveFile (const std::string &filename, const DataStructure &data) const |
| Save content of DataStructure (underlying ptree) to a file. | |
| std::string | getFileType (const std::string &filename) const |
| Checks the trigger level of a given json file. | |
| bool | checkTriggerLevel (const std::string &filename, std::string &level) const |
| Checks the trigger level of a given json file. | |
| void | setLevel (MSGTC::Level lvl) |
| MSGTC::Level | outputLevel () const |
| bool | msgLvl (const MSGTC::Level lvl) const |
| Test the output level. | |
| MsgStreamTC & | msg () const |
| The standard message stream. | |
| MsgStreamTC & | msg (const MSGTC::Level lvl) const |
| The standard message stream. | |
| const std::string & | getName () const |
| name accessor | |
Private Member Functions | |
| std::string | findFile (const std::string &filename) const |
Private Attributes | |
| boost::thread_specific_ptr< MsgStreamTC > | m_msg_tls |
| MsgStreamTC instance (a std::cout like with print-out levels). | |
| std::string | m_name |
Loader of trigger configurations from Json files.
Definition at line 25 of file JsonFileLoader.h.
| TrigConf::JsonFileLoader::JsonFileLoader | ( | ) |
|
overridevirtualdefault |
Destructor.
| bool TrigConf::JsonFileLoader::checkTriggerLevel | ( | const std::string & | filename, |
| std::string & | level ) const |
Checks the trigger level of a given json file.
| filename | [in] Name of the json file |
| level | [out] either "L1", "HLT" or "UNKNOWN" |
Definition at line 128 of file JsonFileLoader.cxx.
|
private |
Definition at line 28 of file JsonFileLoader.cxx.
| std::string TrigConf::JsonFileLoader::getFileType | ( | const std::string & | filename | ) | const |
Checks the trigger level of a given json file.
| filename | [in] Name of the json file |
Definition at line 114 of file JsonFileLoader.cxx.
|
inlineinherited |
| bool TrigConf::JsonFileLoader::loadFile | ( | const std::string & | filename, |
| boost::property_tree::ptree & | data, | ||
| const std::string & | pathToChild = "" ) const |
Load content of json file into a ptree.
| filename | [in] Name of the json file |
| data | [out] |
| pathToChild | [in] Path to a sub structure for partial loading of data |
If the optional parameter pathToChild is specified, one can load parts if the configuration from the file.
Definition at line 45 of file JsonFileLoader.cxx.
| bool TrigConf::JsonFileLoader::loadFile | ( | const std::string & | filename, |
| DataStructure & | data, | ||
| const std::string & | pathToChild = "" ) const |
Load content of json file into a ptree.
| filename | [in] Name of the json file |
| data | [out] |
| pathToChild | [in] Path to a sub structure for partial loading of data |
Definition at line 82 of file JsonFileLoader.cxx.
|
inlineinherited |
The standard message stream.
Returns a reference to the message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 86 of file TrigConfMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 96 of file TrigConfMessaging.h.
|
inlineinherited |
Test the output level.
| lvl | The message level to test against |
| true | Messages at level "lvl" will be printed |
Definition at line 75 of file TrigConfMessaging.h.
|
inline |
Definition at line 88 of file JsonFileLoader.h.
| bool TrigConf::JsonFileLoader::saveFile | ( | const std::string & | filename, |
| const DataStructure & | data ) const |
Save content of DataStructure (underlying ptree) to a file.
| filename | [in] Name of the json file |
| data | [in] |
Definition at line 99 of file JsonFileLoader.cxx.
|
inline |
Definition at line 86 of file JsonFileLoader.h.
|
mutableprivateinherited |
MsgStreamTC instance (a std::cout like with print-out levels).
Definition at line 71 of file TrigConfMessaging.h.
|
privateinherited |
Definition at line 72 of file TrigConfMessaging.h.