1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
4 ///////////////////////////////////////////////////////////////////////////////
6 // (see AliQAHistNavigator.cxx for details)
8 // Origin: Mikolaj Krzewicki, Nikhef, Mikolaj.Krzewicki@cern.ch
10 //////////////////////////////////////////////////////////////////////////////
12 #ifndef ALIQAHISTNAVIGATOR_H
13 #define ALIQAHISTNAVIGATOR_H
16 #include "Riostream.h"
20 #include "TObjString.h"
31 class AliQADirListItem;
32 class AliQAHistNavigator;
34 class AliQADirList : public TNamed{
37 virtual ~AliQADirList();
38 TList* GetItems() {return fPItems;}
39 TList* GetDirs() {return fPDirs;}
40 AliQADirList* GetParent() {return fPParent;}
41 void SetParent(AliQADirList* l) {fPParent = l;}
44 AliQADirList* fPParent; //pointer to parent folder
45 TList* fPItems; //List of items contained in the list
46 TList* fPDirs; //List of dirs
47 AliQADirList(const AliQADirList&); // Not implemented
48 AliQADirList& operator=(const AliQADirList&); // Not implemented
50 ClassDef(AliQADirList,999) //AliQADirListDir
53 class AliQADirListItem : public TObjString {
55 AliQADirListItem(const char* s="");
56 virtual ~AliQADirListItem();
57 AliQADirList* GetParent() {return fPParent;}
58 void SetParent(AliQADirList* parent) {fPParent=parent;}
61 AliQADirList* fPParent;
62 AliQADirListItem(const AliQADirListItem&); // Not implemented
63 AliQADirListItem& operator=(const AliQADirListItem&); // Not implemented
65 ClassDef(AliQADirListItem,999)
68 class AliQAHistNavigator {
71 AliQAHistNavigator( Int_t run=0 );
72 virtual ~AliQAHistNavigator();
74 Bool_t GetHistogram(TH1*& hist);
78 Bool_t SetFile (TString file );
79 Bool_t SetFile (Int_t file );
80 Bool_t SetDetector( TString detector );
81 Bool_t SetDetector( Int_t detector );
82 Bool_t SetLevel( TString type );
83 Bool_t SetLevel( Int_t type );
84 Bool_t SetItem( TString histo );
85 Bool_t SetItem( Int_t histo );
87 void SetLoopAllFiles( const Bool_t s=kTRUE ) {fLoopAllFiles=s;}
88 void SetLoopAllDetectors( const Bool_t s=kTRUE ) {fLoopAllDetectors=s;}
89 void SetLoopAllLevels( const Bool_t s=kTRUE ) {fLoopAllLevels=s;}
91 TString GetDetectorName();
92 TString GetLevelName();
93 TString GetItemName();
94 TString GetFileName();
96 TString GetPath(AliQADirListItem* item);
98 AliQADirList* GetFileList() {return fPListOfFiles;}
99 AliQADirList* GetDetectorList() {return fPCurrFile;}
100 AliQADirList* GetLevelList() {return fPCurrDetector;}
101 TList* GetItemList();
102 AliQADirList* GetCurrListOfFiles() {return fPListOfFiles;}
103 AliQADirList* GetCurrFile() {return fPCurrFile;}
104 AliQADirList* GetCurrDetector() {return fPCurrDetector;}
105 AliQADirList* GetCurrLevel() {return fPCurrLevel;}
106 AliQADirListItem* GetCurrItem() {return fPCurrItem;}
108 Bool_t InitOK() {return fInitOK;}
109 Bool_t ReReadFiles();
110 void SetExpertMode(Bool_t mode);
112 Bool_t CloneDirStructure();
116 Bool_t OpenCurrentFile();
117 Bool_t OpenCurrentDirectory();
118 Bool_t GetListOfFiles();
119 Bool_t Crawl(AliQADirList* parent);
121 TFile* fPFile; //pointer to current open file
122 TFile* fPCORRFile; //pointer to file with ntuple
123 TFile* fPQAResultFile; //pointer to file with AliQA object
124 Int_t fRun; //runnumber
126 //The state of the navigator, these help navigate the "tree"
127 AliQADirList* fPCurrFile; //current list holding detectors
128 AliQADirList* fPCurrDetector; //current list holding levels
129 AliQADirList* fPCurrLevel; //current list holding histograms
130 AliQADirListItem* fPCurrItem; //current histogram name
132 AliQADirList* fPListOfFiles; //Tree-like structure of lists within lists mirroring the layout of histogtams in files
134 Bool_t fLoopAllFiles; //whether to loop over all files
135 Bool_t fLoopAllDetectors; //whether to loop over all detectors
136 Bool_t fLoopAllLevels; //whether to loop over all levels
138 Bool_t fInitOK; //whether there is data to navigate
139 Bool_t fExpertMode; //expert histogram mode
140 TString fExpertDirName; //expert dir name
143 AliQAHistNavigator(const AliQAHistNavigator&); // Not implemented
144 AliQAHistNavigator& operator=(const AliQAHistNavigator&); // Not implemented
146 ClassDef(AliQAHistNavigator,999) //AliQAHistNavigator class