CbmRoot
Loading...
Searching...
No Matches
CbmConfigBase< Config_t, Obj_t > Class Template Reference

#include <CbmConfigBase.h>

Inheritance diagram for CbmConfigBase< Config_t, Obj_t >:
[legend]

Public Types

using TagSet_t = std::set<std::string>
 

Public Member Functions

virtual ~CbmConfigBase ()=default
 

Static Public Member Functions

static bool Load (Obj_t &obj, const std::string &path)
 
static bool Load (Obj_t &obj, const pt::ptree &tree)
 
static void LoadFromFile (const std::string &path, pt::ptree &tree)
 
static bool Validate (const pt::ptree &tree)
 
static void ParseTree (const pt::ptree &pt, std::string key, TagSet_t &treeSet)
 
static void PrintAvailableTags ()
 
static ECbmModuleId stringToECbmModuleId (std::string s)
 
static std::string GetStringValue (boost::optional< std::string > opt)
 
static std::string GetStringValue (pt::ptree tree, std::string key, std::string fallback)
 
static std::string ParseString (std::string s)
 
static void SetLogLevel (const pt::ptree &moduleTree)
 

Detailed Description

template<class Config_t, class Obj_t>
class CbmConfigBase< Config_t, Obj_t >

Definition at line 27 of file CbmConfigBase.h.

Member Typedef Documentation

◆ TagSet_t

template<class Config_t , class Obj_t >
using CbmConfigBase< Config_t, Obj_t >::TagSet_t = std::set<std::string>

Definition at line 30 of file CbmConfigBase.h.

Constructor & Destructor Documentation

◆ ~CbmConfigBase()

template<class Config_t , class Obj_t >
virtual CbmConfigBase< Config_t, Obj_t >::~CbmConfigBase ( )
virtualdefault

Member Function Documentation

◆ GetStringValue() [1/2]

template<class Config_t , class Obj_t >
static std::string CbmConfigBase< Config_t, Obj_t >::GetStringValue ( boost::optional< std::string > opt)
inlinestatic

Definition at line 139 of file CbmConfigBase.h.

References CbmConfigBase< Config_t, Obj_t >::ParseString().

◆ GetStringValue() [2/2]

template<class Config_t , class Obj_t >
static std::string CbmConfigBase< Config_t, Obj_t >::GetStringValue ( pt::ptree tree,
std::string key,
std::string fallback )
inlinestatic

Definition at line 141 of file CbmConfigBase.h.

References CbmConfigBase< Config_t, Obj_t >::ParseString().

◆ Load() [1/2]

template<class Config_t , class Obj_t >
static bool CbmConfigBase< Config_t, Obj_t >::Load ( Obj_t & obj,
const pt::ptree & tree )
inlinestatic

◆ Load() [2/2]

template<class Config_t , class Obj_t >
static bool CbmConfigBase< Config_t, Obj_t >::Load ( Obj_t & obj,
const std::string & path )
inlinestatic

◆ LoadFromFile()

template<class Config_t , class Obj_t >
static void CbmConfigBase< Config_t, Obj_t >::LoadFromFile ( const std::string & path,
pt::ptree & tree )
inlinestatic

Definition at line 55 of file CbmConfigBase.h.

Referenced by CbmConfigBase< Config_t, Obj_t >::Load().

◆ ParseString()

template<class Config_t , class Obj_t >
static std::string CbmConfigBase< Config_t, Obj_t >::ParseString ( std::string s)
inlinestatic

◆ ParseTree()

template<class Config_t , class Obj_t >
static void CbmConfigBase< Config_t, Obj_t >::ParseTree ( const pt::ptree & pt,
std::string key,
TagSet_t & treeSet )
inlinestatic

◆ PrintAvailableTags()

template<class Config_t , class Obj_t >
static void CbmConfigBase< Config_t, Obj_t >::PrintAvailableTags ( )
inlinestatic

Definition at line 109 of file CbmConfigBase.h.

Referenced by CbmConfigBase< Config_t, Obj_t >::Validate().

◆ SetLogLevel()

template<class Config_t , class Obj_t >
static void CbmConfigBase< Config_t, Obj_t >::SetLogLevel ( const pt::ptree & moduleTree)
inlinestatic

Definition at line 161 of file CbmConfigBase.h.

Referenced by CbmConfigBase< Config_t, Obj_t >::Load().

◆ stringToECbmModuleId()

template<class Config_t , class Obj_t >
static ECbmModuleId CbmConfigBase< Config_t, Obj_t >::stringToECbmModuleId ( std::string s)
inlinestatic

Definition at line 117 of file CbmConfigBase.h.

References kBmon, kCave, kFsd, kHodo, kMagnet, kMuch, kMvd, kNotExist, kPipe, kPlatform, kPsd, kRich, kShield, kSts, kTarget, kTof, and kTrd.

◆ Validate()

template<class Config_t , class Obj_t >
static bool CbmConfigBase< Config_t, Obj_t >::Validate ( const pt::ptree & tree)
inlinestatic

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