]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MONITOR/AliQAHistNavigator.h
New code for visualization of QA histos. Will be embedded in AliEve (Mikolaj)
[u/mrichter/AliRoot.git] / MONITOR / AliQAHistNavigator.h
CommitLineData
923f55ee 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
30class AliQAHistNavigator {
31
32public:
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
70 Bool_t CloneDirStructure();
71
72private:
73
74 Bool_t OpenCurrentFile();
75 Bool_t OpenCurrentDirectory();
76 Bool_t GetListOfFiles();
77 Bool_t Crawl(TList* parent);
78
79 TFile* fPFile; //pointer to current open file
80 Int_t fRun; //runnumber
81 Int_t fCyc; //Cycle number
82
83 //The state of the navigator, these help navigate the "tree"
84 TList* fPCurrFile; //current list holding detectors
85 TList* fPCurrDetector; //current list holding levels
86 TList* fPCurrLevel; //current list holding histograms
87 TObjString* fPCurrHistName; //current histogram name
88
89 TList* fPListOfFiles; //Tree-like structure of lists within lists mirroring the layout of histogtams in files
90
91 Bool_t fLoopAllFiles; //whether to loop over all files
92 Bool_t fLoopAllDetectors; //whether to loop over all detectors
93 Bool_t fLoopAllLevels; //whether to loop over all levels
94
95 ClassDef(AliQAHistNavigator,999) //AliQAHistNavigator class
96};
97
98#endif
99