Record changes.
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibViewer.h
CommitLineData
39bcd65d 1#ifndef ALITPCCALIBVIEWER_H
2#define ALITPCCALIBVIEWER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliTPCCalibViewer.h,v */
7
8///////////////////////////////////////////////////
9// //
10// TPC calibration viewer/visualization class //
11// use Tree for visualization //
12///////////////////////////////////////////////////
13
14#include <TObject.h>
15#include <TTree.h>
16#include <TFile.h>
17#include "AliTPCCalPad.h"
18#include "AliTPCCalROC.h"
19#include "TFriendElement.h"
20
21
22class AliTPCCalibViewer : public TObject {
23public:
24 AliTPCCalibViewer();
25 AliTPCCalibViewer(const AliTPCCalibViewer &c);
26 AliTPCCalibViewer(TTree* tree);
27 AliTPCCalibViewer(char* fileName, char* treeName = "calPads");
28 AliTPCCalibViewer &operator = (const AliTPCCalibViewer & param);
29 virtual ~AliTPCCalibViewer();
30
31 virtual void Draw(Option_t* opt="") { fTree->Draw(opt); }
32 virtual Long64_t Draw(const char* varexp, const TCut& selection, Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0) { return fTree->Draw(varexp, selection, option, nentries, firstentry); };
33 virtual Long64_t Draw(const char* varexp, const char* selection, Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0) { return fTree->Draw(varexp, selection, option, nentries, firstentry); };
34
35 Int_t EasyDraw(const char* drawCommand, const char* sector, const char* cuts = 0, const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const; // easy drawing of data, use '~' for abbreviation of '.fElements'
36 Int_t EasyDraw(const char* drawCommand, Int_t sector, const char* cuts = 0, const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const; // easy drawing of data, use '~' for abbreviation of '.fElements'
37 Int_t EasyDraw1D(const char* drawCommand, const char* sector, const char* cuts = 0, const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const; // easy drawing of data, use '~' for abbreviation of '.fElements'
38 Int_t EasyDraw1D(const char* drawCommand, Int_t sector, const char* cuts = 0, const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const; // easy drawing of data, use '~' for abbreviation of '.fElements'
39 Int_t DrawHisto1D(const char* type, Int_t sector, TVectorF& nsigma, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE) const; // draws 1d histograms and superimposes mean, median, ltm and several sigma cuts
40 void SigmaCut(const char* type, Int_t sector, Float_t sigmaMax = 5, Float_t sigmaStep = 0.5, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE) const; // draws fraction of used pads over different sigma cuts
41
42 AliTPCCalPad* GetCalPad(const char* desiredData, char* cuts = "", char* calPadName = "NoName") const; // returns an AliTPCCalPad object containing the specified data with cuts applied
43 AliTPCCalROC* GetCalROC(const char* desiredData, UInt_t sector, char* cuts = "") const; // returns an AliTPCCalROC object containing the specified data for sector with cuts applied
44
45 TObjArray* GetArrayOfCalPads();
46 TObjArray* GetListOfVariables(Bool_t printList = kFALSE);
47 TObjArray* GetListOfNormalizationVariables(Bool_t printList = kFALSE);
48
49 static void MakeTreeWithObjects(const char * fileName, TObjArray * array, const char * mapFileName = 0);
50 static void MakeTree(const char * fileName, TObjArray * array, const char * mapFileName = 0, AliTPCCalPad* outlierPad = 0, Float_t ltmFraction = 0.9);
51
52 TFriendElement* AddReferenceTree(const char* filename, const char* treename = "calPads", const char* refname = "R");
53 TFriendElement* AddFriend(const char* treename, const char* filename) {return fTree->AddFriend(treename, filename);};
54 TFriendElement* AddFriend(TTree* tree, const char* alias, Bool_t warn=kFALSE) {return fTree->AddFriend(tree, alias, warn);};
55 TFriendElement* AddFriend(const char* treename, TFile* file) {return fTree->AddFriend(treename, file);};
56
57protected:
58 TTree* fTree; // tree containing visualization data (e.g. written by AliTPCCalPad::MakeTree(...)
59 TFile* fFile; // file that contains a calPads tree (e.g. written by AliTPCCalPad::MakeTree(...)
60 TObjArray* fListOfObjectsToBeDeleted; //Objects, that will be deleted when the destructor ist called
61
62 ClassDef(AliTPCCalibViewer,1) // TPC calibration viewer class
63};
64
65#endif