]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/Correlations/JCORRAN/AliJBaseCard.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / Correlations / JCORRAN / AliJBaseCard.h
CommitLineData
9dc4f671 1//=================================================
2// AliJBaseCard.h
3// last modified FK 6.NOV 2009
4//=================================================
5
6#ifndef ALIJBASECARD_H
7#define ALIJBASECARD_H
8
9#include <TObject.h>
10
11#include <iostream>
12#include <fstream>
13
14#include <TString.h>
15#include <TVector.h>
16#include <TMath.h>
17#include <TObjArray.h>
18#include <TObjString.h>
19#include <TFile.h>
20#include <TF1.h>
21#include <vector>
22#include <THashList.h>
23#include <TNamed.h>
24
25using namespace std;
26#ifndef AliJMaxDimBuffer
27#define AliJMaxDimBuffer
28const int kMaxDimBuffer = 300;//max length of a line read to a buffe
29#endif
30
31class AliJBaseCard {
32
33 //==== M e m b e r F u n c t i o n s ========
34
35public:
36
37 AliJBaseCard(); // constructor
38 AliJBaseCard(const char *filename); // constructor
39 AliJBaseCard& operator=(const AliJBaseCard& obj);
40
41 virtual ~AliJBaseCard();
42
43 void AddToKeyTable( TString key, int index ){
44 TNamed * ko = new TNamed(key.Data(),"");
45 ko->SetUniqueID(index);
46 fKeyTable.Add(ko);// TODO check duplicate
47 }
48
49 float Get(TString keyword, int VectorComponent=0); //get TVector component
50 TString GetStr(TString keyword ); //get TVector component
51 TVector* GetVector( TString keyword );
52 int GetN(TString keyword); //get TVector dimension
53 void PrintOut();
54 void WriteCard(TDirectory *file);
55
56 virtual void InitCard();
57 void FinishCard();
58 void ReadInputLine( const char* buffer );
71f2359b 59 void ReadLine( const char * buffer );
9dc4f671 60
61protected:
62 void ReadInputCard();
63
64 int GetNwithIndex(int i){ return fValuesVector[i].GetNrows(); }
65
66 unsigned int GetTVectorIndex(TString keyword, int tol=0);
67
68 //==== D a t a M e m b e r s ========
69
70 char fcardname[255]; // file name
71 int fnentry; //Number of lines in cfg file
72 std::vector< TString > fKeyWordVector; //array of key words
73 std::vector< TVector > fValuesVector; //array of float number confg parameter vectors
74 std::vector< TString > fValueString; // Storage of raw inut string for each item
75 //std::map< TString, unsigned int > MapKeyWordToTVector;//mapping keywords to TVector
76 THashList fKeyTable; // key map with hash algorithm
77
78 //ClassDef(AliJBaseCard, 1); // EMCAL for jcorran
79};
80
81#endif
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103