]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONPedestal.h
In MUONRecoCheck.C:
[u/mrichter/AliRoot.git] / MUON / AliMUONPedestal.h
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
15 #ifndef ROOT_TObject
16 #  include <TObject.h>
17 #endif
18 #ifndef ROOT_TString
19 #  include <TString.h>
20 #endif
21
22 class AliMUONVStore;
23
24 class TTimeStamp;
25
26 class AliMUONPedestal : public TObject
27 {
28   public:
29     AliMUONPedestal();
30     virtual ~AliMUONPedestal();
31     
32     /// return the number of current events
33     void SetAliNCurrentEvents(Int_t events) {fNCurrentEvents = events;}
34     /// return the number of events
35     void SetAliNEvents(Int_t events) {fNEvents = events;}
36     /// return the Run number
37     void SetAliRunNumber(Int_t run) {fRunNumber = run;}
38     /// return the total number of channels (or pads)
39     void SetAliNChannel(Int_t nch) {fNChannel = nch;}
40     /// output .log file of DAs
41     void SetAlifilcout(ofstream* stream) {fFilcout = stream;}
42     /// return date and time
43     TTimeStamp* GetDate() const {return fDate;}
44     /// Count parity errors per Buspatch
45     AliMUONVStore* GetErrorBuspatchTable() const {return fErrorBuspatchTable;}
46     /// return the name of DAPedestal .root file
47     const char* GetHistoFileName() const;
48     /// load MuonTrk configuration from ascii dbfile
49     void LoadConfig(const char* dbfile);
50     /// sum pedestal values for mean and sigma determination
51     void MakePed(Int_t bp,Int_t manu,Int_t ch,Int_t charge);
52
53     /// set config flag
54     void SetconfigDA(Int_t ind) {fConfig = ind;}
55     /// set Nb of evt threshold to calculate pedestal
56     void SetnEvthreshold(Int_t ind) {fNEvthreshold = ind;}
57     /// set specific  DA prefixname
58     void SetprefixDA(const char* folder) { fPrefixDA=folder;}
59     /// set the index of calibration runs
60     void SetAliIndex(Int_t ind) {fIndex = ind;}
61     /// Compute the pedestal data (mean, sigma)
62     void Finalize();
63     /// Create String to be put into file or AMORE DB
64     void MakeASCIIoutput(ostream& out) const;
65     /// Fill Histograms
66     void MakeControlHistos();
67
68   Int_t ADCMax() const { return 4095; }
69
70 protected:
71     //    Int_t fN; ///<
72     Int_t fNCurrentEvents; ///< Number of current events
73     Int_t fNEvthreshold; ///< Nbevt threshold (pedestal calculation)
74     Int_t fNEvents; ///< Number of events
75     Int_t fRunNumber; ///< run number
76     Int_t fNChannel; ///< Nb of channels (pads)
77     Int_t fNManu; ///<  Nb of Manu
78     Int_t fNManuConfig; ///<  Nb of Manu in the current detector configuration
79     Int_t fConfig; ///< flag 1(0) for reading(or not) configuration ascii file
80     AliMUONVStore* fErrorBuspatchTable; ///< Table for buspatches with parity errors 
81     AliMUONVStore* fManuBuspatchTable; ///< Occupancy rate for each (buspatch, manu)
82     AliMUONVStore* fManuBPoutofconfigTable; ///< (buspatch, manu) out of config
83  
84     TTimeStamp* fDate; ///< date
85     ofstream* fFilcout; ///< .log output file
86     TString fHistoFileName; ///< .root histo file
87     AliMUONVStore* fPedestalStore; ///< data container:  (Pedmean,sigma) values for each (BP,manuId)
88     Int_t fIndex; ///< calibration run index
89     TString fPrefixDA; ///< specific DA prefixname
90
91   static const Int_t fgkADCMax; ///< max channel count
92   
93   private:
94     /// Not implemented
95     AliMUONPedestal(const AliMUONPedestal& rhs);
96     /// Not implemented
97     AliMUONPedestal& operator = (const AliMUONPedestal& rhs);
98
99   ClassDef(AliMUONPedestal,5) // Pedestal computing for DA 
100 };
101
102 #endif