ATLAS Offline Software
Loading...
Searching...
No Matches
Config.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
11
12#ifndef TRIGPSC_CONFIG_H
13#define TRIGPSC_CONFIG_H
14
15#include <map>
16#include <string>
17#include <vector>
18#include <sstream>
19#include <boost/property_tree/ptree.hpp>
20
21namespace TrigConf
22{
24}
25
26namespace psc {
27
31 class Config
32 {
33 public:
34 Config(const boost::property_tree::ptree& config);
35
36 void prepareWorker(const boost::property_tree::ptree& args);
37
41 std::string dumpOptions() const;
42
47 std::string getOption(const std::string& key, bool quiet=false) const;
48
53 std::string toPython(const std::string& dictName) const;
54
59 std::string getLogLevelAsNumStr() const;
60
64 bool didUserSetLogLevel() const;
65
66 public:
67
71 std::map<std::string, std::string> optmap;
72
76 std::vector<uint32_t> enabled_robs;
77 std::vector<uint32_t> enabled_SubDets;
78
79 private:
80
81 // setup needed optmap defaults for options that may not always be filled
83
84 // fill in options for HLTImplementationJobOptions
85 void fillopt_jo(const boost::property_tree::ptree& hlt);
86
87 // fill in options for HLTImplementationDB
88 void fillopt_db(const boost::property_tree::ptree& hlt);
89
90 // fill in options for HLTImplementationDBPython
91 void fillopt_dbpy(const boost::property_tree::ptree& hlt);
92
93 // fill in what is common to jo and dbpy
94 void fillopt_py(const boost::property_tree::ptree& hlt);
95
96 // fill in common options
97 void fillopt_common(const boost::property_tree::ptree& hlt);
98
99 // fill in athenaHLT specific options
100 void fillopt_athenaHLT();
101
102 // sets fields with info on this process
103 void setPInfo();
104
105 // fill the vector of enabled ROBs and sub-detectors and the vectors of MET ROBs for
106 // LAr and Tile
107 void fill_enabled_robs(const boost::property_tree::ptree& ros2robs);
108 void fill_enabled_dets(const boost::property_tree::ptree& ros2robs);
109
110 void updatePids();
111 void updateSeed();
112
113 private:
114 const boost::property_tree::ptree& m_config;
115
116 };
117}
118
119#endif /* TRIGPSC_CONFIG_H */
void updateSeed()
Definition Config.cxx:400
void fill_enabled_dets(const boost::property_tree::ptree &ros2robs)
Definition Config.cxx:381
void fillopt_db(const boost::property_tree::ptree &hlt)
Definition Config.cxx:282
std::vector< uint32_t > enabled_SubDets
Definition Config.h:77
std::string getLogLevelAsNumStr() const
Get a string representing the actual number value of the first LOGLEVEL in this configuration.
Definition Config.cxx:240
bool didUserSetLogLevel() const
Returns whether the user specified an explicit log level.
Definition Config.cxx:245
std::vector< uint32_t > enabled_robs
Lists of statically enabled ROBs and sub-detectors.
Definition Config.h:76
void setup_optmap_defaults()
Definition Config.cxx:253
void fillopt_common(const boost::property_tree::ptree &hlt)
Definition Config.cxx:312
std::string toPython(const std::string &dictName) const
Incredibly simple minded way to access this object from python.
Definition Config.cxx:222
void setPInfo()
Definition Config.cxx:354
const boost::property_tree::ptree & m_config
Definition Config.h:114
void fillopt_py(const boost::property_tree::ptree &hlt)
Definition Config.cxx:305
void prepareWorker(const boost::property_tree::ptree &args)
Definition Config.cxx:144
void updatePids()
Definition Config.cxx:393
void fill_enabled_robs(const boost::property_tree::ptree &ros2robs)
Definition Config.cxx:369
void fillopt_jo(const boost::property_tree::ptree &hlt)
Definition Config.cxx:263
void fillopt_athenaHLT()
Definition Config.cxx:339
std::string getOption(const std::string &key, bool quiet=false) const
Gets an option in a "safer" way.
Definition Config.cxx:208
std::map< std::string, std::string > optmap
Map with name/value pairs of parameters.
Definition Config.h:71
Config(const boost::property_tree::ptree &config)
Definition Config.cxx:107
std::string dumpOptions() const
Returns a string with all options which are held in the options cache.
Definition Config.cxx:155
void fillopt_dbpy(const boost::property_tree::ptree &hlt)
Definition Config.cxx:298
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22
Definition Config.h:26