]>
Commit | Line | Data |
---|---|---|
a5ae512a | 1 | |
2 | #ifndef ALIHEPDATAPARSER_H | |
3 | #define ALIHEPDATAPARSER_H | |
4 | ||
5 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
6 | * See cxx source for full Copyright notice */ | |
7 | ||
8 | //------------------------------------------------------------------------- | |
9 | // Implementation of Class AliHEPDataParser | |
10 | // | |
11 | // This class is used to save the content of hisograms/graphs in the | |
12 | // HEP data format and viceversa | |
13 | // Author: Michele Floris, CERN | |
14 | //------------------------------------------------------------------------- | |
15 | ||
16 | #include "TObject.h" | |
17 | #include "TString.h" | |
18 | ||
19 | class TH1; | |
20 | class TGraph; | |
21 | ||
22 | class AliHEPDataParser : public TObject{ | |
23 | ||
24 | ||
25 | public: | |
26 | AliHEPDataParser(); | |
27 | AliHEPDataParser(TH1 * hStat, TH1 * hSyst); | |
28 | AliHEPDataParser(TGraph * grStat, TGraph * grSyst); | |
29 | AliHEPDataParser(const char * hepfileName); | |
30 | ||
31 | ~AliHEPDataParser(); | |
32 | ||
33 | TH1 * GetHistoStat() { return fHistStat;} | |
34 | TH1 * GetHistoSyst() { return fHistSyst;} | |
35 | TGraph * GetGraphStat() { return fGraphStat;} | |
36 | TGraph * GetGraphSyst() { return fGraphSyst;} | |
37 | void SaveHEPDataFile(const char * hepfileName, Bool_t trueUseGraphFalesUseHisto = 0); | |
38 | ||
39 | void SetName(const char * name) { fValueName = name;} | |
d5e9ea5e | 40 | void SetXaxisName (TString val) {fXaxisName = val ;} |
41 | void SetTitle(TString val) {fTitle = val;} | |
42 | void SetReaction(TString val) {fReaction = val;} | |
43 | void SetEnergy(TString val) {fEnergy = val;} | |
44 | void SetRapidityRange(TString val) {fRapidityRange = val;} | |
45 | void SetPrecision(Int_t val) {fPrecision = val;} | |
46 | ||
a5ae512a | 47 | |
48 | protected: | |
49 | ||
d5e9ea5e | 50 | Double_t RoundToSignificantFigures(double num, int n) ; |
51 | TString GetFixWidthCol(Double_t number, Int_t width) ; | |
52 | ||
53 | ||
a5ae512a | 54 | TH1 * fHistStat; // statistical errors (hist) |
55 | TH1 * fHistSyst; // systematic errors (hist) | |
56 | TGraph * fGraphStat; // statistical errors (hist) | |
57 | TGraph * fGraphSyst; // systematic errors (hist) | |
58 | TObjArray * fHEPDataFileLines;// TClones array of TObjString | |
59 | TString fValueName; // title for the y axis on the ascii file | |
d5e9ea5e | 60 | TString fXaxisName; // title for the y axis |
61 | TString fTitle; // title for the HEP DATA file | |
62 | TString fReaction; // Raction ,e.g. RE : Pb + Pb --> pbar + X | |
63 | TString fEnergy; // Raction ,e.g. sqrts : 2760 GeV | |
64 | TString fRapidityRange; // Rapidity ABS(YRAP) : 0.5' | |
65 | Int_t fPrecision; // number of significant figures for rounding | |
66 | ||
67 | ClassDef(AliHEPDataParser, 2); | |
a5ae512a | 68 | |
69 | private: | |
70 | ||
71 | ||
72 | AliHEPDataParser(const AliHEPDataParser&); | |
73 | AliHEPDataParser& operator=(const AliHEPDataParser&); | |
74 | }; | |
75 | ||
76 | #endif |