ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigConfiguration
TrigConfIO
TrigConfIO
JsonFileLoader.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
11
12
#ifndef TRIGCONFSTORAGE_JSONFILELOADER_H
13
#define TRIGCONFSTORAGE_JSONFILELOADER_H
14
15
#include "
TrigConfBase/TrigConfMessaging.h
"
16
#include "
TrigConfData/DataStructure.h
"
17
18
#include "boost/property_tree/ptree.hpp"
19
20
namespace
TrigConf
{
21
25
class
JsonFileLoader
:
public
TrigConfMessaging
{
26
public
:
27
29
JsonFileLoader
();
30
32
virtual
~JsonFileLoader
()
override
=
default
;
33
49
bool
loadFile
(
const
std::string & filename,
50
boost::property_tree::ptree & data,
51
const
std::string & pathToChild =
""
)
const
;
52
59
bool
loadFile
(
const
std::string & filename,
60
DataStructure
& data,
61
const
std::string & pathToChild =
""
)
const
;
62
63
69
bool
saveFile
(
const
std::string & filename,
70
const
DataStructure
& data )
const
;
71
76
std::string
getFileType
(
const
std::string & filename )
const
;
77
83
bool
checkTriggerLevel
(
const
std::string & filename,
84
std::string & level )
const
;
85
86
void
setLevel
(
MSGTC::Level
lvl) {
msg
().
setLevel
(lvl); }
87
88
MSGTC::Level
outputLevel
()
const
{
return
msg
().
level
(); }
89
90
private
:
91
std::string
findFile
(
const
std::string & filename)
const
;
92
93
};
94
95
}
96
97
#endif
98
DataStructure.h
TrigConfMessaging.h
Messaging base class for TrigConf code shared with Lvl1 ( AthMessaging).
TrigConf::DataStructure
Base class for Trigger configuration data and wrapper around underlying representation.
Definition
DataStructure.h:37
TrigConf::JsonFileLoader::saveFile
bool saveFile(const std::string &filename, const DataStructure &data) const
Save content of DataStructure (underlying ptree) to a file.
Definition
JsonFileLoader.cxx:99
TrigConf::JsonFileLoader::checkTriggerLevel
bool checkTriggerLevel(const std::string &filename, std::string &level) const
Checks the trigger level of a given json file.
Definition
JsonFileLoader.cxx:128
TrigConf::JsonFileLoader::JsonFileLoader
JsonFileLoader()
Constructor.
Definition
JsonFileLoader.cxx:19
TrigConf::JsonFileLoader::findFile
std::string findFile(const std::string &filename) const
Definition
JsonFileLoader.cxx:28
TrigConf::JsonFileLoader::outputLevel
MSGTC::Level outputLevel() const
Definition
JsonFileLoader.h:88
TrigConf::JsonFileLoader::setLevel
void setLevel(MSGTC::Level lvl)
Definition
JsonFileLoader.h:86
TrigConf::JsonFileLoader::getFileType
std::string getFileType(const std::string &filename) const
Checks the trigger level of a given json file.
Definition
JsonFileLoader.cxx:114
TrigConf::JsonFileLoader::loadFile
bool loadFile(const std::string &filename, boost::property_tree::ptree &data, const std::string &pathToChild="") const
Load content of json file into a ptree.
Definition
JsonFileLoader.cxx:45
TrigConf::JsonFileLoader::~JsonFileLoader
virtual ~JsonFileLoader() override=default
Destructor.
TrigConf::MsgStreamTC::setLevel
void setLevel(MSGTC::Level lvl)
Set message level of stream.
Definition
Trigger/TrigConfiguration/TrigConfBase/Root/MsgStream.cxx:52
TrigConf::MsgStreamTC::level
MSGTC::Level level()
Return message level of stream.
Definition
Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:53
TrigConf::TrigConfMessaging::msg
MsgStreamTC & msg() const
The standard message stream.
Definition
TrigConfMessaging.h:86
TrigConf::TrigConfMessaging::TrigConfMessaging
TrigConfMessaging(const std::string &name)
Constructor with parameters.
Definition
TrigConfMessaging.h:34
TrigConf::MSGTC::Level
Level
Definition
Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition
Config.h:22
Generated on
for ATLAS Offline Software by
1.17.0