1 // This class is used to print a table which can be pasted on a latex
4 #ifndef ALILATEXTABLE_H
5 #define ALILATEXTABLE_H
7 #if !defined(__CINT__) || defined(__MAKECINT__)
18 class AliLatexTable : public TObject {
22 AliLatexTable(Int_t ncol, TString format);
26 void LoadTeXFromFileAndPrintASCII(const char * filename);
27 // first you set the value of each column
28 void SetNextCol(Int_t val);
29 void SetNextCol(Int_t val, Int_t err);
31 void SetNextCol(Double_t val, Int_t scientificNotation = -1, Bool_t rounding = kTRUE); // if different from -1 gives significant digits
32 void SetNextCol(Double_t val, Double_t err, Int_t scientificNotation = -1, Bool_t rounding = kTRUE);
33 void SetNextCol(Double_t val, Double_t err, Double_t errSyst, Int_t scientificNotation = -1, Bool_t rounding = kTRUE);
35 void SetNextCol(TString val);
36 // // allows to use printf syntax
37 // void SetNextColPrintf(const char *va_(fmt), ...);
39 // Then you add the row (it's up to user make sure all columns are
44 // insert a row without building it up with the methods. May be
45 // usefull for header or multcol rows
46 void InsertCustomRow(TString row);
51 void PrintTable(Option_t * opt = "");
52 // void ParseExponent(TString &expo);
53 void GetMantissaAndExpBase10(Double_t num, Double_t &man, Double_t &exp) ;
55 // used to print columns with correct width
56 Int_t * GetColWidths();
57 void StripLatex(TString &row, TString format) ;
62 Int_t fNcol; // number of columns
63 TString fFormat; // latex format (es "c|ccc")
65 TObjArray * fRows; // rows
66 TObjArray * fCols; // columns
68 Int_t fNcolReady; // number of cols ready to be insert
71 AliLatexTable(const AliLatexTable&);
72 AliLatexTable& operator=(const AliLatexTable&);
74 ClassDef(AliLatexTable, 1)