#ifndef ALIQAHISTNAVIGATOR_H
#define ALIQAHISTNAVIGATOR_H
-#include "TSystem.h"
-#include "Riostream.h"
-#include "TH1D.h"
-#include "TF1.h"
-#include "TList.h"
-#include "TObjString.h"
-#include "TString.h"
-#include "TFile.h"
-#include "TRegexp.h"
-#include "TPRegexp.h"
-#include "TKey.h"
-#include "TText.h"
-#include <list>
-#include <string>
+#include <TNamed.h>
+#include <TObjString.h>
+
+class TList;
+class TFile;
+class TString;
+class TH1;
+
+class AliQADirList : public TNamed{
+public:
+ AliQADirList();
+ virtual ~AliQADirList();
+ TList* GetItems() const {return fPItems;}
+ TList* GetDirs() const {return fPDirs;}
+ AliQADirList* GetParent() const {return fPParent;}
+ void SetParent(AliQADirList* const l) {fPParent = l;}
+
+private:
+ AliQADirList* fPParent; //pointer to parent folder
+ TList* fPItems; //List of items contained in the list
+ TList* fPDirs; //List of dirs
+ AliQADirList(const AliQADirList&); // Not implemented
+ AliQADirList& operator=(const AliQADirList&); // Not implemented
+
+ ClassDef(AliQADirList,999) //AliQADirListDir
+};
+
+class AliQADirListItem : public TObjString{
+public:
+ AliQADirListItem(const char* s="");
+ virtual ~AliQADirListItem();
+ AliQADirList* GetParent() {return fPParent;}
+ void SetParent(AliQADirList* const parent) {fPParent=parent;}
+
+private:
+ AliQADirList* fPParent;
+ AliQADirListItem(const AliQADirListItem&); // Not implemented
+ AliQADirListItem& operator=(const AliQADirListItem&); // Not implemented
+
+ ClassDef(AliQADirListItem,999)
+};
class AliQAHistNavigator {
public:
- AliQAHistNavigator( Int_t run=0, Int_t rev=0 );
+ AliQAHistNavigator( Int_t run=0 );
+ virtual ~AliQAHistNavigator();
Bool_t GetHistogram(TH1*& hist);
- Bool_t GetNextHistogram(TH1*& hist);
- Bool_t GetPrevHistogram(TH1*& hist);
Bool_t Next();
Bool_t Prev();
- void PrintDebugInfo();
- Bool_t DumpList(TString file="AliQAHistNavigator.conf");
- Bool_t ReadList(TString file="AliQAHistNavigator.conf");
Bool_t SetFile (TString file );
Bool_t SetFile (Int_t file );
Bool_t SetDetector( Int_t detector );
Bool_t SetLevel( TString type );
Bool_t SetLevel( Int_t type );
- Bool_t SetHist( TString histo );
- Bool_t SetHist( Int_t histo );
+ Bool_t SetItem( TString histo );
+ Bool_t SetItem( Int_t histo );
+
void SetLoopAllFiles( const Bool_t s=kTRUE ) {fLoopAllFiles=s;}
void SetLoopAllDetectors( const Bool_t s=kTRUE ) {fLoopAllDetectors=s;}
void SetLoopAllLevels( const Bool_t s=kTRUE ) {fLoopAllLevels=s;}
+
TString GetDetectorName();
TString GetLevelName();
- TString GetHistName();
+ TString GetItemName();
TString GetFileName();
TString GetDirName();
- TList* GetFileList() {return fPListOfFiles;}
- TList* GetDetectorList() {return fPCurrFile;}
- TList* GetLevelList() {return fPCurrDetector;}
- TList* GetHistList() {return fPCurrLevel;}
- TList* GetCurrListOfFiles() {return fPListOfFiles;}
- TList* GetCurrFile() {return fPCurrFile;}
- TList* GetCurrDetector() {return fPCurrDetector;}
- TList* GetCurrLevel() {return fPCurrLevel;}
- TObjString* GetCurrHistName() {return fPCurrHistName;}
+ TString GetPath(AliQADirListItem* const item);
+
+ AliQADirList* GetFileList() const {return fPListOfFiles;}
+ AliQADirList* GetDetectorList() const {return fPCurrFile;}
+ AliQADirList* GetLevelList() const {return fPCurrDetector;}
+ TList* GetItemList();
+ AliQADirList* GetCurrListOfFiles() const {return fPListOfFiles;}
+ AliQADirList* GetCurrFile() const {return fPCurrFile;}
+ AliQADirList* GetCurrDetector() const {return fPCurrDetector;}
+ AliQADirList* GetCurrLevel() const {return fPCurrLevel;}
+ AliQADirListItem* GetCurrItem() const {return fPCurrItem;}
+
+ Bool_t InitOK() const {return fInitOK;}
+ Bool_t ReReadFiles();
+ void SetExpertMode(Bool_t mode);
Bool_t CloneDirStructure();
Bool_t OpenCurrentFile();
Bool_t OpenCurrentDirectory();
Bool_t GetListOfFiles();
- Bool_t Crawl(TList* parent);
+ Bool_t Crawl(AliQADirList* parent);
TFile* fPFile; //pointer to current open file
+ TFile* fPCORRFile; //pointer to file with ntuple
+ TFile* fPQAResultFile; //pointer to file with AliQA object
Int_t fRun; //runnumber
- Int_t fCyc; //Cycle number
//The state of the navigator, these help navigate the "tree"
- TList* fPCurrFile; //current list holding detectors
- TList* fPCurrDetector; //current list holding levels
- TList* fPCurrLevel; //current list holding histograms
- TObjString* fPCurrHistName; //current histogram name
+ AliQADirList* fPCurrFile; //current list holding detectors
+ AliQADirList* fPCurrDetector; //current list holding levels
+ AliQADirList* fPCurrLevel; //current list holding histograms
+ AliQADirListItem* fPCurrItem; //current histogram name
- TList* fPListOfFiles; //Tree-like structure of lists within lists mirroring the layout of histogtams in files
+ AliQADirList* fPListOfFiles; //Tree-like structure of lists within lists mirroring the layout of histogtams in files
Bool_t fLoopAllFiles; //whether to loop over all files
Bool_t fLoopAllDetectors; //whether to loop over all detectors
Bool_t fLoopAllLevels; //whether to loop over all levels
+
+ Bool_t fInitOK; //whether there is data to navigate
+ Bool_t fExpertMode; //expert histogram mode
+ TString fExpertDirName; //expert dir name
+ TList* fPEmptyList; //just an empty list
+
+ AliQAHistNavigator(const AliQAHistNavigator&); // Not implemented
+ AliQAHistNavigator& operator=(const AliQAHistNavigator&); // Not implemented
ClassDef(AliQAHistNavigator,999) //AliQAHistNavigator class
};