2 #ifndef ALIHEPDATAPARSER_H
3 #define ALIHEPDATAPARSER_H
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
8 //-------------------------------------------------------------------------
9 // Implementation of Class AliHEPDataParser
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 //-------------------------------------------------------------------------
22 class AliHEPDataParser : public TObject{
27 AliHEPDataParser(TH1 * hStat, TH1 * hSyst);
28 AliHEPDataParser(TGraph * grStat, TGraph * grSyst);
29 AliHEPDataParser(const char * hepfileName);
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);
39 void SetName(const char * name) { fValueName = name;}
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;}
50 Double_t RoundToSignificantFigures(double num, int n) ;
51 TString GetFixWidthCol(Double_t number, Int_t width) ;
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
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
67 ClassDef(AliHEPDataParser, 2);
72 AliHEPDataParser(const AliHEPDataParser&);
73 AliHEPDataParser& operator=(const AliHEPDataParser&);