![]() |
AliRoot Core
v5-06-30 (35d6c57)
|
Class for Parsing simple text configuration files. More...
#include <AliTPCConfigParser.h>
Public Member Functions | |
AliTPCConfigParser () | |
AliTPCConfigParser (const char *cfgfile) | |
AliTPCConfigParser (const AliTPCConfigParser &cfg) | |
AliTPCConfigParser & | operator= (const AliTPCConfigParser &cfg) |
virtual | ~AliTPCConfigParser () |
Int_t | ParseConfigFileTxt (const char *cfgfile) |
Float_t | GetValue (const char *key, UInt_t position=0) |
Float_t | GetValue (const TObject *key, UInt_t position=0) |
const char * | GetData (const char *key, UInt_t position=0) |
const char * | GetData (const TObject *key, UInt_t position=0) |
Int_t | GetNumberOfValues (const char *key) const |
Int_t | GetNumberOfValues (TObject *key) const |
const TList * | GetConfigurationMap () const |
void | ResetMap () |
const TList * | operator() () const |
const TObject * | operator() (Int_t pos) const |
const TObject * | operator() (const char *key) const |
const TObject * | operator() (TObject *key) const |
void | ResetIter () |
TObject * | NextKey () |
TObject * | NextValue (const char *key) |
TObject * | NextValue (TObject *key) |
Private Member Functions | |
TObject * | NextValueIter (TObjArray *obj) |
Private Attributes | |
TList * | fConfigMap |
TIterator * | fKeyIter |
TIterator * | fValIter |
Class for Parsing simple text configuration files.
It produces a TList for the TObjArrays with the name of the Key the TObjArray contain the Values, split from kommas, as found in the Configutation file.
The configuration file has a simple structure:
Currently the class is used in the TPC DAs to allow an adjustment of the most relevant parameters without recompiling the DAs
Definition at line 12 of file AliTPCConfigParser.h.
AliTPCConfigParser::AliTPCConfigParser | ( | ) |
default constructor
Definition at line 46 of file AliTPCConfigParser.cxx.
Referenced by operator=().
AliTPCConfigParser::AliTPCConfigParser | ( | const char * | cfgfile | ) |
default constructor using the config file name as input parameter
Definition at line 69 of file AliTPCConfigParser.cxx.
AliTPCConfigParser::AliTPCConfigParser | ( | const AliTPCConfigParser & | cfg | ) |
copy constructor
Definition at line 57 of file AliTPCConfigParser.cxx.
|
virtual |
dtor
Definition at line 92 of file AliTPCConfigParser.cxx.
|
inline |
Definition at line 31 of file AliTPCConfigParser.h.
const char * AliTPCConfigParser::GetData | ( | const char * | key, |
UInt_t | position = 0 |
||
) |
Get value for the speciefied key
Definition at line 170 of file AliTPCConfigParser.cxx.
Referenced by AliTPCCalibViewerGUItime::FillCalibTypes(), AliTPCCalibViewerGUItime::GetHistogramTitle(), AliTPCCalibViewerGUItime::Reload(), and AliTPCCalibViewerGUItime::UpdateParName().
const char * AliTPCConfigParser::GetData | ( | const TObject * | key, |
UInt_t | position = 0 |
||
) |
Get value for the speciefied key
Definition at line 191 of file AliTPCConfigParser.cxx.
Int_t AliTPCConfigParser::GetNumberOfValues | ( | const char * | key | ) | const |
return the number of values for key
Definition at line 202 of file AliTPCConfigParser.cxx.
Int_t AliTPCConfigParser::GetNumberOfValues | ( | TObject * | key | ) | const |
return the number of values for key
Definition at line 209 of file AliTPCConfigParser.cxx.
Float_t AliTPCConfigParser::GetValue | ( | const char * | key, |
UInt_t | position = 0 |
||
) |
Get value for the speciefied key
Definition at line 160 of file AliTPCConfigParser.cxx.
Referenced by AliTPCCalibViewerGUItime::Reload().
Float_t AliTPCConfigParser::GetValue | ( | const TObject * | key, |
UInt_t | position = 0 |
||
) |
Get value for the speciefied key
Definition at line 181 of file AliTPCConfigParser.cxx.
TObject * AliTPCConfigParser::NextKey | ( | ) |
Definition at line 216 of file AliTPCConfigParser.cxx.
Referenced by AliTPCCalibViewerGUItime::FillCalibTypes().
TObject * AliTPCConfigParser::NextValue | ( | const char * | key | ) |
Definition at line 226 of file AliTPCConfigParser.cxx.
TObject * AliTPCConfigParser::NextValue | ( | TObject * | key | ) |
Definition at line 230 of file AliTPCConfigParser.cxx.
|
private |
Definition at line 234 of file AliTPCConfigParser.cxx.
Referenced by NextValue().
|
inline |
Definition at line 34 of file AliTPCConfigParser.h.
|
inline |
Definition at line 35 of file AliTPCConfigParser.h.
|
inline |
Definition at line 36 of file AliTPCConfigParser.h.
|
inline |
Definition at line 37 of file AliTPCConfigParser.h.
AliTPCConfigParser & AliTPCConfigParser::operator= | ( | const AliTPCConfigParser & | cfg | ) |
assignment operator
Definition at line 82 of file AliTPCConfigParser.cxx.
Int_t AliTPCConfigParser::ParseConfigFileTxt | ( | const char * | cfgfile | ) |
Function to parse a configuration file
Definition at line 101 of file AliTPCConfigParser.cxx.
Referenced by AliTPCConfigParser(), and AliTPCCalibViewerGUItime::UseConfigFile().
|
inline |
Definition at line 39 of file AliTPCConfigParser.h.
Referenced by AliTPCCalibViewerGUItime::FillCalibTypes().
void AliTPCConfigParser::ResetMap | ( | ) |
Reset the map with the configuration values
Definition at line 250 of file AliTPCConfigParser.cxx.
Referenced by ParseConfigFileTxt().
|
private |
Definition at line 46 of file AliTPCConfigParser.h.
Referenced by AliTPCConfigParser(), GetConfigurationMap(), GetData(), GetNumberOfValues(), GetValue(), NextKey(), NextValue(), operator()(), ParseConfigFileTxt(), ResetMap(), and ~AliTPCConfigParser().
|
private |
Definition at line 47 of file AliTPCConfigParser.h.
Referenced by NextKey(), ResetIter(), and ~AliTPCConfigParser().
|
private |
Definition at line 48 of file AliTPCConfigParser.h.
Referenced by NextValueIter(), ResetIter(), and ~AliTPCConfigParser().