]>
Commit | Line | Data |
---|---|---|
5253c153 | 1 | #ifndef ALIMUONPEDESTAL_H |
2 | #define ALIMUONPEDESTAL_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | // $Id$ | |
8 | ||
9 | /// \ingroup calib | |
10 | /// \class AliMUONPedestal | |
11 | /// \brief Implementation of the pedestal computing | |
12 | /// | |
13 | // Author Alberto Baldisseri, JL Charvet | |
14 | ||
f3cfa63e | 15 | #ifndef ROOT_TObject |
16 | # include <TObject.h> | |
17 | #endif | |
18 | #ifndef ROOT_TString | |
19 | # include <TString.h> | |
20 | #endif | |
5253c153 | 21 | |
22 | class AliMUONVStore; | |
23 | ||
24 | class TTimeStamp; | |
5253c153 | 25 | |
5253c153 | 26 | class AliMUONPedestal : public TObject |
27 | { | |
28 | public: | |
29 | AliMUONPedestal(); | |
71432c59 | 30 | AliMUONPedestal(TRootIOCtor* dummy); |
5253c153 | 31 | virtual ~AliMUONPedestal(); |
32 | ||
f9e83f1d | 33 | /// return the number of current events |
34 | void SetAliNCurrentEvents(Int_t events) {fNCurrentEvents = events;} | |
5431405e | 35 | /// return the number of events |
5253c153 | 36 | void SetAliNEvents(Int_t events) {fNEvents = events;} |
5431405e | 37 | /// return the Run number |
5253c153 | 38 | void SetAliRunNumber(Int_t run) {fRunNumber = run;} |
5431405e | 39 | /// return the total number of channels (or pads) |
5253c153 | 40 | void SetAliNChannel(Int_t nch) {fNChannel = nch;} |
5431405e | 41 | /// output .log file of DAs |
5253c153 | 42 | void SetAlifilcout(ofstream* stream) {fFilcout = stream;} |
5431405e | 43 | /// return date and time |
f3cfa63e | 44 | TTimeStamp* GetDate() const {return fDate;} |
5431405e | 45 | /// Count parity errors per Buspatch |
f3cfa63e | 46 | AliMUONVStore* GetErrorBuspatchTable() const {return fErrorBuspatchTable;} |
5431405e | 47 | /// return the name of DAPedestal .root file |
f3cfa63e | 48 | const char* GetHistoFileName() const; |
1b15b395 | 49 | /// load MuonTrk configuration from ascii dbfile |
f3cfa63e | 50 | void LoadConfig(const char* dbfile); |
1b15b395 | 51 | /// sum pedestal values for mean and sigma determination |
5253c153 | 52 | void MakePed(Int_t bp,Int_t manu,Int_t ch,Int_t charge); |
5253c153 | 53 | |
1b15b395 | 54 | /// set config flag |
55 | void SetconfigDA(Int_t ind) {fConfig = ind;} | |
f9e83f1d | 56 | /// set Nb of evt threshold to calculate pedestal |
57 | void SetnEvthreshold(Int_t ind) {fNEvthreshold = ind;} | |
9c2d4e89 | 58 | /// set DA status (return code) |
59 | void SetStatusDA(Int_t ind) {fStatusDA = ind;} | |
60 | /// get DA status (return code) | |
61 | Int_t GetStatusDA() const {return fStatusDA;} | |
ff496840 | 62 | /// sorting flag |
63 | void SetnSorting(Int_t ind) {fSorting = ind;} | |
5431405e | 64 | /// set specific DA prefixname |
f3cfa63e | 65 | void SetprefixDA(const char* folder) { fPrefixDA=folder;} |
9c2d4e89 | 66 | /// set specific LDC prefixname |
67 | void SetprefixLDC(const char* folder) { fPrefixLDC=folder;} | |
68 | /// set the index of calibration runs | |
5253c153 | 69 | void SetAliIndex(Int_t ind) {fIndex = ind;} |
dbbb2c64 | 70 | /// Compute the pedestal data (mean, sigma) |
71 | void Finalize(); | |
72 | /// Create String to be put into file or AMORE DB | |
73 | void MakeASCIIoutput(ostream& out) const; | |
74 | /// Fill Histograms | |
75 | void MakeControlHistos(); | |
5253c153 | 76 | |
9c2d4e89 | 77 | Int_t ADCMax() const { return 4095; } |
f3cfa63e | 78 | |
79 | protected: | |
80 | // Int_t fN; ///< | |
f9e83f1d | 81 | Int_t fNCurrentEvents; ///< Number of current events |
82 | Int_t fNEvthreshold; ///< Nbevt threshold (pedestal calculation) | |
ff496840 | 83 | Int_t fSorting; ///< sorting flag (pedestal values) |
5431405e | 84 | Int_t fNEvents; ///< Number of events |
85 | Int_t fRunNumber; ///< run number | |
86 | Int_t fNChannel; ///< Nb of channels (pads) | |
87 | Int_t fNManu; ///< Nb of Manu | |
f3cfa63e | 88 | Int_t fNManuConfig; ///< Nb of Manu in the current detector configuration |
1b15b395 | 89 | Int_t fConfig; ///< flag 1(0) for reading(or not) configuration ascii file |
9c2d4e89 | 90 | Int_t fStatusDA; ///< DA return code (0=OK) |
a54854fc | 91 | AliMUONVStore* fErrorBuspatchTable; ///< Table for buspatches with parity errors |
92 | AliMUONVStore* fManuBuspatchTable; ///< Occupancy rate for each (buspatch, manu) | |
1b15b395 | 93 | AliMUONVStore* fManuBPoutofconfigTable; ///< (buspatch, manu) out of config |
5431405e | 94 | |
95 | TTimeStamp* fDate; ///< date | |
96 | ofstream* fFilcout; ///< .log output file | |
f3cfa63e | 97 | TString fHistoFileName; ///< .root histo file |
98 | AliMUONVStore* fPedestalStore; ///< data container: (Pedmean,sigma) values for each (BP,manuId) | |
5431405e | 99 | Int_t fIndex; ///< calibration run index |
f3cfa63e | 100 | TString fPrefixDA; ///< specific DA prefixname |
9c2d4e89 | 101 | TString fPrefixLDC; ///< specific LDC prefixname |
5253c153 | 102 | |
f3cfa63e | 103 | static const Int_t fgkADCMax; ///< max channel count |
104 | ||
5253c153 | 105 | private: |
106 | /// Not implemented | |
107 | AliMUONPedestal(const AliMUONPedestal& rhs); | |
108 | /// Not implemented | |
109 | AliMUONPedestal& operator = (const AliMUONPedestal& rhs); | |
110 | ||
f9e83f1d | 111 | ClassDef(AliMUONPedestal,5) // Pedestal computing for DA |
5253c153 | 112 | }; |
113 | ||
114 | #endif |