]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MONITOR/AliQAHistNavigator.h
fixes for coding violations
[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
21535372 15#include <TNamed.h>
16#include <TObjString.h>
17
18class TList;
19class TFile;
20class TString;
d3a269ff 21
22class AliQADirList : public TNamed{
23public:
24 AliQADirList();
25 virtual ~AliQADirList();
21535372 26 TList* GetItems() const {return fPItems;}
27 TList* GetDirs() const {return fPDirs;}
28 AliQADirList* GetParent() const {return fPParent;}
29 void SetParent(AliQADirList* const l) {fPParent = l;}
d3a269ff 30
31private:
32 AliQADirList* fPParent; //pointer to parent folder
33 TList* fPItems; //List of items contained in the list
34 TList* fPDirs; //List of dirs
35 AliQADirList(const AliQADirList&); // Not implemented
36 AliQADirList& operator=(const AliQADirList&); // Not implemented
37
38 ClassDef(AliQADirList,999) //AliQADirListDir
39};
40
21535372 41class AliQADirListItem : public TObjString{
d3a269ff 42public:
43 AliQADirListItem(const char* s="");
44 virtual ~AliQADirListItem();
45 AliQADirList* GetParent() {return fPParent;}
21535372 46 void SetParent(AliQADirList* const parent) {fPParent=parent;}
d3a269ff 47
48private:
49 AliQADirList* fPParent;
50 AliQADirListItem(const AliQADirListItem&); // Not implemented
51 AliQADirListItem& operator=(const AliQADirListItem&); // Not implemented
52
53 ClassDef(AliQADirListItem,999)
54};
55
923f55ee 56class AliQAHistNavigator {
57
58public:
d3a269ff 59 AliQAHistNavigator( Int_t run=0 );
60 virtual ~AliQAHistNavigator();
923f55ee 61
62 Bool_t GetHistogram(TH1*& hist);
923f55ee 63 Bool_t Next();
64 Bool_t Prev();
923f55ee 65
66 Bool_t SetFile (TString file );
67 Bool_t SetFile (Int_t file );
68 Bool_t SetDetector( TString detector );
69 Bool_t SetDetector( Int_t detector );
70 Bool_t SetLevel( TString type );
71 Bool_t SetLevel( Int_t type );
d3a269ff 72 Bool_t SetItem( TString histo );
73 Bool_t SetItem( Int_t histo );
74
923f55ee 75 void SetLoopAllFiles( const Bool_t s=kTRUE ) {fLoopAllFiles=s;}
76 void SetLoopAllDetectors( const Bool_t s=kTRUE ) {fLoopAllDetectors=s;}
77 void SetLoopAllLevels( const Bool_t s=kTRUE ) {fLoopAllLevels=s;}
d3a269ff 78
923f55ee 79 TString GetDetectorName();
80 TString GetLevelName();
d3a269ff 81 TString GetItemName();
923f55ee 82 TString GetFileName();
83 TString GetDirName();
21535372 84 TString GetPath(AliQADirListItem* const item);
d3a269ff 85
21535372 86 AliQADirList* GetFileList() const {return fPListOfFiles;}
87 AliQADirList* GetDetectorList() const {return fPCurrFile;}
88 AliQADirList* GetLevelList() const {return fPCurrDetector;}
d3a269ff 89 TList* GetItemList();
21535372 90 AliQADirList* GetCurrListOfFiles() const {return fPListOfFiles;}
91 AliQADirList* GetCurrFile() const {return fPCurrFile;}
92 AliQADirList* GetCurrDetector() const {return fPCurrDetector;}
93 AliQADirList* GetCurrLevel() const {return fPCurrLevel;}
94 AliQADirListItem* GetCurrItem() const {return fPCurrItem;}
d3a269ff 95
21535372 96 Bool_t InitOK() const {return fInitOK;}
7b852582 97 Bool_t ReReadFiles();
d3a269ff 98 void SetExpertMode(Bool_t mode);
923f55ee 99
100 Bool_t CloneDirStructure();
101
102private:
103
104 Bool_t OpenCurrentFile();
105 Bool_t OpenCurrentDirectory();
106 Bool_t GetListOfFiles();
d3a269ff 107 Bool_t Crawl(AliQADirList* parent);
923f55ee 108
109 TFile* fPFile; //pointer to current open file
d3a269ff 110 TFile* fPCORRFile; //pointer to file with ntuple
111 TFile* fPQAResultFile; //pointer to file with AliQA object
923f55ee 112 Int_t fRun; //runnumber
923f55ee 113
114 //The state of the navigator, these help navigate the "tree"
d3a269ff 115 AliQADirList* fPCurrFile; //current list holding detectors
116 AliQADirList* fPCurrDetector; //current list holding levels
117 AliQADirList* fPCurrLevel; //current list holding histograms
118 AliQADirListItem* fPCurrItem; //current histogram name
923f55ee 119
d3a269ff 120 AliQADirList* fPListOfFiles; //Tree-like structure of lists within lists mirroring the layout of histogtams in files
923f55ee 121
122 Bool_t fLoopAllFiles; //whether to loop over all files
123 Bool_t fLoopAllDetectors; //whether to loop over all detectors
124 Bool_t fLoopAllLevels; //whether to loop over all levels
7b852582 125
126 Bool_t fInitOK; //whether there is data to navigate
d3a269ff 127 Bool_t fExpertMode; //expert histogram mode
128 TString fExpertDirName; //expert dir name
21535372 129 TList* fPEmptyList; //just an empty list
d3a269ff 130
131 AliQAHistNavigator(const AliQAHistNavigator&); // Not implemented
132 AliQAHistNavigator& operator=(const AliQAHistNavigator&); // Not implemented
923f55ee 133
134 ClassDef(AliQAHistNavigator,999) //AliQAHistNavigator class
135};
136
137#endif
138