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