]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MONITOR/AliQAHistNavigator.h
remove debugging MC label calculations
[u/mrichter/AliRoot.git] / MONITOR / AliQAHistNavigator.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 ///////////////////////////////////////////////////////////////////////////////
5 //
6 //     (see AliQAHistNavigator.cxx for details)
7 //
8 //     Origin: Mikolaj Krzewicki, Nikhef, Mikolaj.Krzewicki@cern.ch
9 //
10 //////////////////////////////////////////////////////////////////////////////
11
12 #ifndef ALIQAHISTNAVIGATOR_H
13 #define ALIQAHISTNAVIGATOR_H
14
15 #include "TSystem.h"
16 #include "Riostream.h"
17 #include "TH1D.h"
18 #include "TF1.h"
19 #include "TList.h"
20 #include "TObjString.h"
21 #include "TString.h"
22 #include "TFile.h"
23 #include "TRegexp.h"
24 #include "TPRegexp.h"
25 #include "TKey.h"
26 #include "TText.h"
27 #include <list>
28 #include <string>
29
30 class AliQAHistNavigator {
31
32 public:
33     AliQAHistNavigator( Int_t run=0, Int_t rev=0 );
34
35     Bool_t GetHistogram(TH1*& hist);
36     Bool_t GetNextHistogram(TH1*& hist);
37     Bool_t GetPrevHistogram(TH1*& hist);
38     Bool_t Next();
39     Bool_t Prev();
40     void PrintDebugInfo();
41     Bool_t DumpList(TString file="AliQAHistNavigator.conf");
42     Bool_t ReadList(TString file="AliQAHistNavigator.conf");
43
44     Bool_t SetFile (TString file ); 
45     Bool_t SetFile (Int_t file ); 
46     Bool_t SetDetector( TString detector );
47     Bool_t SetDetector( Int_t detector );
48     Bool_t SetLevel( TString type );
49     Bool_t SetLevel( Int_t type );
50     Bool_t SetHist( TString histo );
51     Bool_t SetHist( Int_t histo );
52     void SetLoopAllFiles( const Bool_t s=kTRUE ) {fLoopAllFiles=s;}
53     void SetLoopAllDetectors( const Bool_t s=kTRUE ) {fLoopAllDetectors=s;}
54     void SetLoopAllLevels( const Bool_t s=kTRUE ) {fLoopAllLevels=s;}
55     TString GetDetectorName();
56     TString GetLevelName();
57     TString GetHistName();
58     TString GetFileName();
59     TString GetDirName();
60     TList* GetFileList() {return fPListOfFiles;}
61     TList* GetDetectorList() {return fPCurrFile;}
62     TList* GetLevelList() {return fPCurrDetector;}
63     TList* GetHistList() {return fPCurrLevel;}
64     TList* GetCurrListOfFiles() {return fPListOfFiles;}
65     TList* GetCurrFile() {return fPCurrFile;}
66     TList* GetCurrDetector() {return fPCurrDetector;}
67     TList* GetCurrLevel() {return fPCurrLevel;}
68     TObjString* GetCurrHistName() {return fPCurrHistName;}
69     Bool_t InitOK() {return fInitOK;}
70     Bool_t ReReadFiles();
71
72     Bool_t CloneDirStructure();
73
74 private:
75
76     Bool_t OpenCurrentFile();
77     Bool_t OpenCurrentDirectory();
78     Bool_t GetListOfFiles();
79     Bool_t Crawl(TList* parent);
80     
81     TFile* fPFile;  //pointer to current open file
82     Int_t fRun;     //runnumber
83     Int_t fCyc;     //Cycle number
84
85     //The state of the navigator, these help navigate the "tree"
86     TList* fPCurrFile;  //current list holding detectors
87     TList* fPCurrDetector; //current list holding levels
88     TList* fPCurrLevel;  //current list holding histograms
89     TObjString* fPCurrHistName;  //current histogram name
90     
91     TList* fPListOfFiles; //Tree-like structure of lists within lists mirroring the layout of histogtams in files
92
93     Bool_t fLoopAllFiles;  //whether to loop over all files
94     Bool_t fLoopAllDetectors;  //whether to loop over all detectors
95     Bool_t fLoopAllLevels;   //whether to loop over all levels
96     
97     Bool_t fInitOK;  //whether there is data to navigate
98
99     ClassDef(AliQAHistNavigator,999)     //AliQAHistNavigator class
100 };
101
102 #endif
103