]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/Base/AliTPCConfigParser.h
- fix for TRD on-line track matching with tracks having TPCrefit but not TPCout ...
[u/mrichter/AliRoot.git] / TPC / Base / AliTPCConfigParser.h
CommitLineData
5312f439 1#ifndef AliTPCConfigParser_H
2#define AliTPCConfigParser_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5#include <TObject.h>
6
7class TObjArray;
8class TList;
9
10class AliTPCConfigParser : public TObject{
11
12public:
13 AliTPCConfigParser();
14 AliTPCConfigParser(const char* cfgfile);
15 AliTPCConfigParser(const AliTPCConfigParser &cfg);
16 AliTPCConfigParser& operator = (const AliTPCConfigParser &cfg);
17
18 virtual ~AliTPCConfigParser();
19
20 Int_t ParseConfigFileTxt(const char* cfgfile);
6fb51ca4 21 Float_t GetValue(const char* key, UInt_t position=0);
22 Float_t GetValue(const TObject *key, UInt_t position=0);
23 const char* GetData(const char* key, UInt_t position=0);
24 const char* GetData(const TObject* key, UInt_t position=0);
25
26 Int_t GetNumberOfValues(const char* key) const;
27 Int_t GetNumberOfValues(TObject* key) const;
28
5312f439 29 const TList* GetConfigurationMap() const {return fConfigMap;}
30 void ResetMap();
31
6fb51ca4 32 const TList* operator()() const {return fConfigMap;}
33 const TObject* operator()(Int_t pos) const {return fConfigMap->At(pos);}
5312f439 34 const TObject* operator()(const char* key) const {return fConfigMap->FindObject(key);}
35 const TObject* operator()(TObject* key) const {return fConfigMap->FindObject(key);}
6fb51ca4 36
37 void ResetIter() {delete fKeyIter; fKeyIter=0; delete fValIter; fValIter=0;}
38
5312f439 39 TObject* NextKey();
40 TObject* NextValue(const char *key);
41 TObject* NextValue(TObject *key);
42
43private:
44 TList *fConfigMap;
45 TIterator *fKeyIter;
46 TIterator *fValIter;
47
48 TObject *NextValueIter(TObjArray *obj);
49
50 ClassDef(AliTPCConfigParser, 1) // TPC DA configuration file parser
51};
52#endif