ATLAS Offline Software
Loading...
Searching...
No Matches
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
17
18#include "boost/property_tree/ptree.hpp"
19
20namespace TrigConf {
21
26 public:
27
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,
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
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
Messaging base class for TrigConf code shared with Lvl1 ( AthMessaging)
Base class for Trigger configuration data and wrapper around underlying representation.
bool saveFile(const std::string &filename, const DataStructure &data) const
Save content of DataStructure (underlying ptree) to a file.
bool checkTriggerLevel(const std::string &filename, std::string &level) const
Checks the trigger level of a given json file.
std::string findFile(const std::string &filename) const
MSGTC::Level outputLevel() const
void setLevel(MSGTC::Level lvl)
std::string getFileType(const std::string &filename) const
Checks the trigger level of a given json file.
bool loadFile(const std::string &filename, boost::property_tree::ptree &data, const std::string &pathToChild="") const
Load content of json file into a ptree.
virtual ~JsonFileLoader() override=default
Destructor.
void setLevel(MSGTC::Level lvl)
Set message level of stream.
MsgStreamTC & msg() const
The standard message stream.
TrigConfMessaging(const std::string &name)
Constructor with parameters.
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22