Increased the default window for the TOF signal visualization
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDCalib.h
CommitLineData
21f61e25 1#ifndef AliHMPIDCalib_h
2#define AliHMPIDCalib_h
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6// Class of HMPID to manage digits ---> pads
7//.
8//.
9//.
3e60bb92 10
11//#include "TTreePlayer.h"
12//#include <TTree.h>
21f61e25 13#include <TH1.h>
0f1281b2 14#include <TH2.h>
606697a8 15//#include <TH1S.h>
3e60bb92 16#include <TMath.h>
3c8e86a0 17#include <TFile.h>
cdd8604a 18#include <TString.h>
0f1281b2 19#include "AliHMPIDParam.h"
20#include "AliHMPIDRawStream.h"
21f61e25 21
3c8e86a0 22class TFile;
21f61e25 23class AliHMPIDCalib: public TObject {
24
25
26public:
27 AliHMPIDCalib();
28 virtual ~AliHMPIDCalib();
29 void Init();
0f1281b2 30 void FillPedestal(Int_t pad,Int_t q); //absolute pad number and the charge of the pad
3c8e86a0 31 void FillErrors(Int_t nDDL,Int_t nErrType, Int_t nErr); //Fill the errors from RawStream
ee812b5b 32 void FillDDLCnt(Int_t iddl,Int_t inDDL, Int_t outDDL); //Fill the errors from RawStream
3c8e86a0 33 Bool_t CalcPedestal(Int_t nDDL, Char_t* name, Int_t nEv); //number of the DDL, name of the output file and the number of events processed
cdd8604a 34 Bool_t CalcPedestalPaolo(Int_t nDDL, Char_t* name, Int_t nEv); //number of the DDL, name of the output file and the number of events processed
35
3c8e86a0 36 Bool_t WriteErrors(Int_t nDDL, Char_t* name, Int_t nEv); //number of the DDL, name of the output file and the number of events processed
37 void InitHisto(Int_t q,Int_t histocnt,Char_t* name); //Init the pad histograms
38 void FillHisto(Int_t histocnt,Int_t q); //Fill the ADC histograms
77e40af5 39 void InitFile(Int_t inVal); //Init the ADC histo output file (one per LDC or one per DDL)
40 void CloseFile(); //Close the file
3c8e86a0 41 void SetRunParams(ULong_t runNum,Int_t timeStamp, Int_t ldcId); //Set Run Parameters such as Run Number, TimeStamp, LDCid
b38ac33a 42 void SetSigCut(Int_t nSigCut) { fSigCut=nSigCut;} //Set Sigma Cuts from Setter
3c8e86a0 43 void SetSigCutFromFile(Char_t* name); //Set Sigma Cuts from File
cdd8604a 44 void SetSigCutFromShell(Char_t* name); //Set Sigma Cuts from Bash Shell
45 void SetDaOutFromShell(Char_t* name); //Set out dir. of DA from Bash Shell
46 void SetFeeInFromShell(Char_t* name); //Set out dir. for Fe2C from Bash Shell
47
48 TString GetDaOutFromShell() {return fDaOut;} //Get out dir. of DA from Bash Shell
49 TString GetFeeInFromShell() {return fFeeIn;} //Get out dir. for Fe2C from Bash Shell
b38ac33a 50 void SetWriteHistoPads(Bool_t isOn) {fWritePads=isOn;} //Set wether ADC histos of pads are written or not
51 void SetWriteHistoPads(Bool_t isOn,Bool_t isLarge,Int_t nDDL) {fWritePads=isOn;fLargeHisto=isLarge;fSelectDDL=nDDL;} //Set wether ADC histos of pads are written or not
52 Bool_t GetWritePads() const{return fWritePads;} //Set wether ADC histos of pads are written or not
53 Bool_t GetLargePads() const{return fLargeHisto;} //Set wether ADC histos of pads are written or not
54 Bool_t GetSelectedDDL() const{return fSelectDDL;} //Set wether ADC histos of pads are written or not
21f61e25 55protected:
3c8e86a0 56
ee812b5b 57 Bool_t *faddl; //check is ddl is filled
58 Float_t ****fsq; //Sum of pad Q
59 Float_t ****fsq2; //Sum of pad Q^2
60 Int_t ****fnpc; //# of the pad was called with non zero charge
61 Int_t ****fpedQ0; //Check how many times a pad gives 0 charge in pedestal runs
62 Int_t **fErr; // Store the numner of errors for a given error type and a given DDL
63 TH1I **fPadAdc; //Charge distribution for pads
64 Bool_t *fIsPad; //Check if the ADC histo for the pad is booked or not
65 TFile *fFile; //ADC histo output file (one per LDC)
66 UInt_t fLdcId; //Ldc ID
67 UInt_t fTimeStamp; //Time Stamp
68 Int_t fRunNum; //Run Number
69 Int_t fSigCut; //n. of pedestal distribution sigmas used to create zero suppresion table
70 Bool_t fWritePads; //Select wether to write ADC pad histograms or not
71 Int_t *fnDDLInStream; // if the DDL is in the raw data
72 Int_t *fnDDLOutStream; // if the DDL is in the raw data
73 Bool_t fLargeHisto; //Default is kFALSE.if kTRUE then write large pad histograms with 4093 bins!!!! Only if you have 2GB of RAM!!!
74 Int_t fSelectDDL; //Select the DDL to write for the in the large histograms. Only ONE at one time!
cdd8604a 75
76 TString fDaOut; //Store the DA output files in this directory
77 TString fFeeIn; //
b38ac33a 78private:
79 AliHMPIDCalib(const AliHMPIDCalib& c); //dummy copy constructor
80 AliHMPIDCalib &operator=(const AliHMPIDCalib& c); //dummy assignment operator
81
ee812b5b 82 ClassDef(AliHMPIDCalib,3) //HMPID calibration and pedestal class
21f61e25 83};
84#endif