1 #ifndef ALIMUONPEDESTAL_H
2 #define ALIMUONPEDESTAL_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONPedestal
11 /// \brief Implementation of the pedestal computing
13 // Author Alberto Baldisseri, JL Charvet
26 class AliMUONPedestal : public TObject
30 AliMUONPedestal(TRootIOCtor* dummy);
31 virtual ~AliMUONPedestal();
33 /// return the number of current events
34 void SetAliNCurrentEvents(Int_t events) {fNCurrentEvents = events;}
35 /// return the number of events
36 void SetAliNEvents(Int_t events) {fNEvents = events;}
37 /// return the Run number
38 void SetAliRunNumber(Int_t run) {fRunNumber = run;}
39 /// return the total number of channels (or pads)
40 void SetAliNChannel(Int_t nch) {fNChannel = nch;}
41 /// output .log file of DAs
42 void SetAlifilcout(ofstream* stream) {fFilcout = stream;}
43 /// return date and time
44 TTimeStamp* GetDate() const {return fDate;}
45 /// Count parity errors per Buspatch
46 AliMUONVStore* GetErrorBuspatchTable() const {return fErrorBuspatchTable;}
47 /// return the name of DAPedestal .root file
48 const char* GetHistoFileName() const;
49 /// load MuonTrk configuration from ascii dbfile
50 void LoadConfig(const char* dbfile);
51 /// sum pedestal values for mean and sigma determination
52 void MakePed(Int_t bp,Int_t manu,Int_t ch,Int_t charge);
55 void SetconfigDA(Int_t ind) {fConfig = ind;}
56 /// set Nb of evt threshold to calculate pedestal
57 void SetnEvthreshold(Int_t ind) {fNEvthreshold = ind;}
59 void SetnSorting(Int_t ind) {fSorting = ind;}
60 /// set specific DA prefixname
61 void SetprefixDA(const char* folder) { fPrefixDA=folder;}
62 /// set the index of calibration runs
63 void SetAliIndex(Int_t ind) {fIndex = ind;}
64 /// Compute the pedestal data (mean, sigma)
66 /// Create String to be put into file or AMORE DB
67 void MakeASCIIoutput(ostream& out) const;
69 void MakeControlHistos();
71 Int_t ADCMax() const { return 4095; }
75 Int_t fNCurrentEvents; ///< Number of current events
76 Int_t fNEvthreshold; ///< Nbevt threshold (pedestal calculation)
77 Int_t fSorting; ///< sorting flag (pedestal values)
78 Int_t fNEvents; ///< Number of events
79 Int_t fRunNumber; ///< run number
80 Int_t fNChannel; ///< Nb of channels (pads)
81 Int_t fNManu; ///< Nb of Manu
82 Int_t fNManuConfig; ///< Nb of Manu in the current detector configuration
83 Int_t fConfig; ///< flag 1(0) for reading(or not) configuration ascii file
84 AliMUONVStore* fErrorBuspatchTable; ///< Table for buspatches with parity errors
85 AliMUONVStore* fManuBuspatchTable; ///< Occupancy rate for each (buspatch, manu)
86 AliMUONVStore* fManuBPoutofconfigTable; ///< (buspatch, manu) out of config
88 TTimeStamp* fDate; ///< date
89 ofstream* fFilcout; ///< .log output file
90 TString fHistoFileName; ///< .root histo file
91 AliMUONVStore* fPedestalStore; ///< data container: (Pedmean,sigma) values for each (BP,manuId)
92 Int_t fIndex; ///< calibration run index
93 TString fPrefixDA; ///< specific DA prefixname
95 static const Int_t fgkADCMax; ///< max channel count
99 AliMUONPedestal(const AliMUONPedestal& rhs);
101 AliMUONPedestal& operator = (const AliMUONPedestal& rhs);
103 ClassDef(AliMUONPedestal,5) // Pedestal computing for DA