71 #ifndef STAR_StHistUtil
72 #define STAR_StHistUtil
95 const int maxPathLen = 1024;
101 TCanvas* m_HistCanvas;
102 TCanvas* m_HistCanvasR;
107 TString m_FirstHistName;
108 TString m_LastHistName;
109 TString m_OutFileName;
110 TString m_CurFileName;
111 TString m_CurFileNameR;
113 Bool_t m_OutMultiPage;
114 TString m_OutIndividuals;
115 Bool_t m_QAShiftMode;
118 TString m_GlobalTitle;
123 TList* m_ListOfPrint;
125 TFile* m_PntrToPlainFile;
130 Char_t m_dirName[maxPathLen];
131 Bool_t ignorePrefixes;
132 Int_t numOfPosPrefixes;
133 const Char_t** possiblePrefixes;
134 const Char_t** possibleSuffixes;
137 TList* m_ItemsToClear;
141 Char_t m_refResultsFile[maxPathLen];
142 Char_t m_refOutFile[maxPathLen];
147 virtual void CloseOutFile();
148 virtual TString StripPrefixes(
const Char_t* histName, Int_t& prenum, Int_t mode=1);
149 virtual Bool_t CheckOutFile(
const Char_t* histName);
150 virtual TList* TrimListByPrefix(TList* dList,
const Char_t* withPrefix);
151 virtual TH1* FlipAxes(TH1* hist);
152 virtual void PathCopy(
char *destination,
const char* source);
158 virtual void Clear();
159 virtual void SetDebug(Bool_t dbg=kTRUE) { debug=dbg; }
160 virtual Bool_t Debug() {
return debug; }
161 virtual Int_t DrawHists(
const Char_t *dirName=
"EventQA");
162 virtual Int_t ListHists(
const Char_t *dirName=
"EventQA");
163 virtual TList* FindHists(
const Char_t *dirName=
"EventQA",
164 const Char_t *withPrefix=0);
165 virtual TList* FindHists(TFile* histFile,
const Char_t* withPrefix=0);
166 virtual Int_t CopyHists(TList *dirList);
167 virtual Int_t AddHists(TList *dirList, Int_t nHistCopy=-1);
168 virtual void IgnorePrefixes(Bool_t ignore=kTRUE) {ignorePrefixes = ignore;}
169 virtual Int_t PrintInfoHists(TList *dirList,
const Char_t *fname=
"printinfo.out");
172 virtual void SetRefAnalysis(
const Char_t* refOutFile,
const Char_t* refResultsFile,
173 const Char_t* refCutsFile=0,
const Char_t* refInFile=0);
175 virtual void SetDefaultLogYList(
const Char_t *dirName=
"EventQA");
176 virtual Int_t AddToLogYList(
const Char_t *HistName=
"");
177 virtual Int_t RemoveFromLogYList(
const Char_t *HistName=
"");
178 virtual Int_t ExamineLogYList();
180 virtual void SetDefaultLogXList(
const Char_t *dirName=
"EventQA");
181 virtual Int_t AddToLogXList(
const Char_t *HistName=
"");
182 virtual Int_t RemoveFromLogXList(
const Char_t *HistName=
"");
183 virtual Int_t ExamineLogXList();
185 virtual void SetDefaultPrintList(
const Char_t *dirName=
"EventQA",
186 const Char_t *analType=
"FullTable");
187 virtual Int_t AddToPrintList(
const Char_t *HistName=
"");
188 virtual Int_t RemoveFromPrintList(
const Char_t *HistName=
"");
189 virtual Int_t ExaminePrintList();
191 virtual Int_t Overlay1D(Char_t *dirName,Char_t *inHist1,Char_t *inHist2);
192 virtual Int_t Overlay2D(Char_t *dirName,Char_t *inHist1,Char_t *inHist2);
194 virtual Int_t GetRunYear(
const Char_t *filename);
196 virtual void SetDetectors(
const Char_t *detectors);
197 virtual Bool_t DetectorIn(
const Char_t *detector);
200 void SetHistsNamesDraw(
const Char_t *firstName=
"*",
const Char_t *lastName=
"*");
201 void SetZones(Int_t columns=2, Int_t rows=3);
203 void SetPaperSize(Int_t width=20, Int_t height=24);
206 void SetOutFile(
const Char_t *fileName=
"",
const Char_t* type=0);
207 void SetPostScriptFile(
const Char_t *psFileName=
"");
208 void SetPDFFile(
const Char_t *pdfFileName=
"");
210 void SetPntrToMaker(
StMaker *m1);
211 void SetPntrToPlainFile(TFile *m1);
212 void SetGlobalTitle(
const Char_t *globalTitle=
"");
214 Int_t getNewHistSize();
216 Int_t GetNumOfPosPrefixes() {
return numOfPosPrefixes;}
217 const Char_t* GetPrefix(Int_t n) {
return possiblePrefixes[n];}
218 const Char_t* GetSuffix(Int_t n) {
return possibleSuffixes[n];}
221 virtual const char *GetCVS()
const
222 {
static const char cvs[]=
"Tag $Name: $ $Id: StHistUtil.h,v 2.20 2016/06/13 20:31:11 genevb Exp $ built " __DATE__
" " __TIME__ ;
return cvs;}
227 inline void StHistUtil::SetHistsNamesDraw(
const Char_t *firstName,
const Char_t *lastName)
228 { m_FirstHistName = firstName; m_LastHistName = lastName; }
230 inline void StHistUtil::SetZones(Int_t columns, Int_t rows)
231 { m_PadColumns =columns; m_PadRows = rows;}
233 inline void StHistUtil::SetPaperSize(Int_t width, Int_t height)
234 { m_PaperWidth = width; m_PaperHeight = height;}
236 inline void StHistUtil::SetPostScriptFile(
const Char_t *psFileName)
237 { SetOutFile(psFileName,
"ps"); }
239 inline void StHistUtil::SetPDFFile(
const Char_t *pdfFileName)
240 { SetOutFile(pdfFileName,
"pdf"); }
242 inline void StHistUtil::SetPntrToMaker(
StMaker *m1)
243 {m_PntrToMaker = m1;}
245 inline void StHistUtil::SetPntrToPlainFile(TFile *m1)
246 {m_PntrToPlainFile = m1;}
248 inline void StHistUtil::SetGlobalTitle(
const Char_t *globalTitle)
249 { m_GlobalTitle = globalTitle;}
251 inline TH1** StHistUtil::getNewHist()
254 inline Int_t StHistUtil::getNewHistSize()
255 {
return maxHistCopy; }
260 StHistUtilRef(
const char* name,
const char* opts,
const int mode,
const double cut);
263 virtual const char* Options() {
return GetTitle(); }