Switch to the new raw reader (Julian, Raphaelle)
[u/mrichter/AliRoot.git] / TRD / AliTRDCalibChamberStatus.h
CommitLineData
6c1053a8 1#ifndef ALITRDCALIBCHAMBERSTATUS_H
2#define ALITRDCALIBCHAMBERSTATUS_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliTRDCalibChamberStatus.h 34340 2009-08-20 07:48:28Z cblume $ */
7
8///////////////////////////////////////////////////////////////////////////////
9// //
10// TRD calibration class for online calibration //
11// //
12///////////////////////////////////////////////////////////////////////////////
13
14#ifndef ROOT_THnSparse
15#include <THnSparse.h>
fd50bb14 16#include <TCanvas.h>
17#include <TH2.h>
6c1053a8 18#endif
19
20class AliRawReader;
21
22class AliTRDCalChamberStatus;
23class AliRawReader;
24class AliTRDCalDCS;
25
26
27struct eventHeaderStruct;
28
29class AliTRDCalibChamberStatus : public TObject {
30
31public:
32
33 AliTRDCalibChamberStatus();
34 AliTRDCalibChamberStatus(const AliTRDCalibChamberStatus &ped);
35 virtual ~AliTRDCalibChamberStatus();
36
37 AliTRDCalibChamberStatus& operator = (const AliTRDCalibChamberStatus &source);
38
39 void ProcessEvent(AliRawReader *rawReader, Int_t nevents_physics);
fd50bb14 40 void ProcessEvent3(AliRawReader *rawReader, Int_t nevents_physics);
6c1053a8 41
42 void Init();
43 void AnalyseHisto();
44 void CheckEORStatus(AliTRDCalDCS *calDCS);
45
46 void Add(AliTRDCalibChamberStatus *calibChamberStatus);
47
48 Int_t GetNumberEventNotEmpty() const { return fCounterEventNotEmpty; };
fd50bb14 49
6c1053a8 50 THnSparseI *GetSparseI() const {return fHnSparseI;};
51 THnSparseI *GetSparseHCM() const {return fHnSparseHCM;};
52 // for fDebugLevel>0
53 THnSparseI *GetSparseEvtDet() const {return fHnSparseEvtDet;};
54 THnSparseI *GetSparseDebug() const {return fHnSparseDebug;};
55 THnSparseI *GetSparseMCM() const {return fHnSparseMCM;};
56
57
58 AliTRDCalChamberStatus *GetCalChamberStatus() const {return fCalChamberStatus;};
59
60 void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
61
62 Bool_t TestEventHisto(Int_t nevent);
63
fd50bb14 64 // Plot
65 TH2D *PlotSparseI(Int_t sm, Int_t side); // Plot fStatus for sm
66 TH2F *MakeHisto2DSmPlEORStatus(AliTRDCalDCS *calDCS, Int_t sm, Int_t pl);
67 TCanvas *PlotHistos2DSmEORStatus(AliTRDCalDCS *calDCS,Int_t sm, const Char_t *name);
68
6c1053a8 69 // Debug
70 void SetDebugLevel(Short_t level) { fDebugLevel = level; }
71
72 private:
73
74 Int_t fDetector; // Current detector
75 Int_t fNumberOfTimeBins; // Current number of time bins
76 Int_t fCounterEventNotEmpty; // Counter Events Not Empty
77
78 AliTRDCalChamberStatus *fCalChamberStatus; // AliTRDCalChamberStatus result
79
80 THnSparseI *fHnSparseI; // THnSparse for entries in half chambers
81 THnSparseI *fHnSparseHCM; // THnSparse for DCS half chamber status
82
83 // for fDebugLevel>0
84 THnSparseI *fHnSparseEvtDet; // THnSparse for entries in half chambers per events
85 THnSparseI *fHnSparseDebug; // THnSparse for half chambers satuts
86 THnSparseI *fHnSparseMCM; // THnSparse for DCS MCM status
87
fd50bb14 88 TCanvas *fC1;
89
6c1053a8 90 Short_t fDebugLevel; // Flag for debugging
91
92 ClassDef(AliTRDCalibChamberStatus,1)
93
94};
fd50bb14 95#endif