]>
Commit | Line | Data |
---|---|---|
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> | |
16 | #include <TCanvas.h> | |
17 | #include <TH2.h> | |
18 | #endif | |
19 | ||
20 | #include <AliTRDtrackV1.h> | |
21 | ||
22 | class AliRawReader; | |
23 | ||
24 | class AliTRDCalChamberStatus; | |
25 | class AliRawReader; | |
26 | class AliTRDCalDCSv2; | |
27 | ||
28 | ||
29 | struct eventHeaderStruct; | |
30 | ||
31 | class AliTRDCalibChamberStatus : public TObject { | |
32 | ||
33 | public: | |
34 | ||
35 | AliTRDCalibChamberStatus(); | |
36 | AliTRDCalibChamberStatus(const AliTRDCalibChamberStatus &ped); | |
37 | virtual ~AliTRDCalibChamberStatus(); | |
38 | ||
39 | AliTRDCalibChamberStatus& operator = (const AliTRDCalibChamberStatus &source); | |
40 | ||
41 | void ProcessTrack(const AliTRDtrackV1 * trdTrack); | |
42 | void ProcessEvent(AliRawReader *rawReader, Int_t nevents_physics); | |
43 | ||
44 | void Init(); | |
45 | void AnalyseHisto(Int_t limit=200, Double_t chamberlimit=0.05); | |
46 | void CheckEORStatus(const AliTRDCalDCSv2 *calDCS); | |
47 | ||
48 | void Add(const AliTRDCalibChamberStatus *calibChamberStatus); | |
49 | ||
50 | Int_t GetNumberEventNotEmpty() const { return fCounterEventNotEmpty; }; | |
51 | ||
52 | THnSparseI *GetSparseI() const {return fHnSparseI;}; | |
53 | THnSparseI *GetSparseHCM() const {return fHnSparseHCM;}; | |
54 | // for fDebugLevel>0 | |
55 | THnSparseI *GetSparseEvtDet() const {return fHnSparseEvtDet;}; | |
56 | THnSparseI *GetSparseDebug() const {return fHnSparseDebug;}; | |
57 | THnSparseI *GetSparseMCM() const {return fHnSparseMCM;}; | |
58 | ||
59 | void SetSparseI(THnSparseI *sparse) { fHnSparseI=sparse; } | |
60 | ||
61 | AliTRDCalChamberStatus *GetCalChamberStatus() const {return fCalChamberStatus;}; | |
62 | ||
63 | void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE); | |
64 | ||
65 | Bool_t TestEventHisto(Int_t nevent); | |
66 | ||
67 | // Plot | |
68 | TH2D *PlotSparseI(Int_t sm, Int_t side); // Plot fStatus for sm | |
69 | TH2F *MakeHisto2DSmPlEORStatus(const AliTRDCalDCSv2 *calDCS, Int_t sm, Int_t pl); | |
70 | TCanvas *PlotHistos2DSmEORStatus(AliTRDCalDCSv2 *calDCS,Int_t sm, const Char_t *name); | |
71 | ||
72 | // Debug | |
73 | void SetDebugLevel(Short_t level) { fDebugLevel = level; } | |
74 | ||
75 | private: | |
76 | ||
77 | Int_t fDetector; // Current detector | |
78 | Int_t fNumberOfTimeBins; // Current number of time bins | |
79 | Int_t fCounterEventNotEmpty; // Counter Events Not Empty | |
80 | ||
81 | AliTRDCalChamberStatus *fCalChamberStatus; // AliTRDCalChamberStatus result | |
82 | ||
83 | THnSparseI *fHnSparseI; // THnSparse for entries in half chambers | |
84 | THnSparseI *fHnSparseHCM; // THnSparse for DCS half chamber status | |
85 | ||
86 | // for fDebugLevel>0 | |
87 | THnSparseI *fHnSparseEvtDet; // THnSparse for entries in half chambers per events | |
88 | THnSparseI *fHnSparseDebug; // THnSparse for half chambers satuts | |
89 | THnSparseI *fHnSparseMCM; // THnSparse for DCS MCM status | |
90 | ||
91 | TCanvas *fC1; // Canvas to plot | |
92 | ||
93 | Short_t fDebugLevel; // Flag for debugging | |
94 | ||
95 | ClassDef(AliTRDCalibChamberStatus,1) | |
96 | ||
97 | }; | |
98 | #endif | |
99 | ||
100 |