]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONPedestal.h
Speeding up the DA a bit
[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     void MakePed(Int_t bp,Int_t manu,Int_t ch,Int_t charge);
48
49     /// set specific  DA prefixname
50     void SetprefixDA(char* folder) {sprintf(fprefixDA,"%s",folder);}
51     /// set the index of calibration runs
52     void SetAliIndex(Int_t ind) {fIndex = ind;}
53     /// Compute the pedestal data (mean, sigma)
54     void Finalize();
55     /// Create String to be put into file or AMORE DB
56     void MakeASCIIoutput(ostream& out) const;
57     /// Fill Histograms
58     void MakeControlHistos();
59
60   protected:
61     Int_t fN; ///<
62     Int_t fNEvents; ///< Number of events
63     Int_t fRunNumber; ///< run number
64     Int_t fNChannel; ///< Nb of channels (pads)
65     Int_t fNManu; ///<  Nb of Manu
66     AliMUONVStore* fErrorBuspatchTable; ///< Table for buspatches with parity errors 
67     AliMUONVStore* fManuBuspatchTable; ///< Occupancy rate for each (buspatch, manu)
68  
69     TTimeStamp* fDate; ///< date
70     ofstream* fFilcout; ///< .log output file
71     Char_t fHistoFileName[256]; ///< .root histo file
72     AliMUONVStore* fPedestalStore; ///< 
73     Int_t fIndex; ///< calibration run index
74     Char_t fprefixDA[256]; ///< specific DA prefixname
75
76   private:
77     /// Not implemented
78     AliMUONPedestal(const AliMUONPedestal& rhs);
79     /// Not implemented
80     AliMUONPedestal& operator = (const AliMUONPedestal& rhs);
81
82   ClassDef(AliMUONPedestal,2) // 
83 };
84
85 #endif