AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliTPCConfigParser Class Reference

Class for Parsing simple text configuration files. More...

#include <AliTPCConfigParser.h>

Inheritance diagram for AliTPCConfigParser:

Public Member Functions

 AliTPCConfigParser ()
 
 AliTPCConfigParser (const char *cfgfile)
 
 AliTPCConfigParser (const AliTPCConfigParser &cfg)
 
AliTPCConfigParseroperator= (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
 

Detailed Description

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:

  • Lines starting with a # or empty lines are ignored
  • Key and Value are separated either by a <tab> or <space>es

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.

Constructor & Destructor Documentation

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.

AliTPCConfigParser::~AliTPCConfigParser ( )
virtual

dtor

Definition at line 92 of file AliTPCConfigParser.cxx.

Member Function Documentation

const TList* AliTPCConfigParser::GetConfigurationMap ( ) const
inline

Definition at line 31 of file AliTPCConfigParser.h.

const char * AliTPCConfigParser::GetData ( const char *  key,
UInt_t  position = 0 
)
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.

TObject * AliTPCConfigParser::NextValueIter ( TObjArray obj)
private

Definition at line 234 of file AliTPCConfigParser.cxx.

Referenced by NextValue().

const TList* AliTPCConfigParser::operator() ( ) const
inline

Definition at line 34 of file AliTPCConfigParser.h.

const TObject* AliTPCConfigParser::operator() ( Int_t  pos) const
inline

Definition at line 35 of file AliTPCConfigParser.h.

const TObject* AliTPCConfigParser::operator() ( const char *  key) const
inline

Definition at line 36 of file AliTPCConfigParser.h.

const TObject* AliTPCConfigParser::operator() ( TObject *  key) const
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().

void AliTPCConfigParser::ResetIter ( )
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().

Member Data Documentation

TIterator* AliTPCConfigParser::fKeyIter
private

Definition at line 47 of file AliTPCConfigParser.h.

Referenced by NextKey(), ResetIter(), and ~AliTPCConfigParser().

TIterator* AliTPCConfigParser::fValIter
private

Definition at line 48 of file AliTPCConfigParser.h.

Referenced by NextValueIter(), ResetIter(), and ~AliTPCConfigParser().


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