]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONPedestal.h
adding eta:phi tracks and clusters histograms
[u/mrichter/AliRoot.git] / MUON / AliMUONPedestal.h
CommitLineData
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
22class AliMUONVStore;
23
24class TTimeStamp;
493c5a63 25class TTree;
26class TFile;
5253c153 27
b80faac0 28using std::ofstream;
29using std::ostream;
30
5253c153 31class AliMUONPedestal : public TObject
32{
33 public:
34 AliMUONPedestal();
71432c59 35 AliMUONPedestal(TRootIOCtor* dummy);
5253c153 36 virtual ~AliMUONPedestal();
37
f9e83f1d 38 /// return the number of current events
39 void SetAliNCurrentEvents(Int_t events) {fNCurrentEvents = events;}
5431405e 40 /// return the number of events
5253c153 41 void SetAliNEvents(Int_t events) {fNEvents = events;}
5431405e 42 /// return the Run number
5253c153 43 void SetAliRunNumber(Int_t run) {fRunNumber = run;}
5431405e 44 /// return the total number of channels (or pads)
5253c153 45 void SetAliNChannel(Int_t nch) {fNChannel = nch;}
5431405e 46 /// output .log file of DAs
5253c153 47 void SetAlifilcout(ofstream* stream) {fFilcout = stream;}
5431405e 48 /// return date and time
f3cfa63e 49 TTimeStamp* GetDate() const {return fDate;}
5431405e 50 /// Count parity errors per Buspatch
f3cfa63e 51 AliMUONVStore* GetErrorBuspatchTable() const {return fErrorBuspatchTable;}
5431405e 52 /// return the name of DAPedestal .root file
f3cfa63e 53 const char* GetHistoFileName() const;
1b15b395 54 /// load MuonTrk configuration from ascii dbfile
f3cfa63e 55 void LoadConfig(const char* dbfile);
1b15b395 56 /// sum pedestal values for mean and sigma determination
5253c153 57 void MakePed(Int_t bp,Int_t manu,Int_t ch,Int_t charge);
5253c153 58
1b15b395 59 /// set config flag
60 void SetconfigDA(Int_t ind) {fConfig = ind;}
493c5a63 61 /// set Histos flag
62 void SetHistos(Int_t ind) {fHistos = ind;}
63 /// set Nb of evt threshold to calculate pedestal
f9e83f1d 64 void SetnEvthreshold(Int_t ind) {fNEvthreshold = ind;}
9c2d4e89 65 /// set DA status (return code)
66 void SetStatusDA(Int_t ind) {fStatusDA = ind;}
67 /// get DA status (return code)
68 Int_t GetStatusDA() const {return fStatusDA;}
ff496840 69 /// sorting flag
70 void SetnSorting(Int_t ind) {fSorting = ind;}
5431405e 71 /// set specific DA prefixname
f3cfa63e 72 void SetprefixDA(const char* folder) { fPrefixDA=folder;}
9c2d4e89 73 /// set specific LDC prefixname
74 void SetprefixLDC(const char* folder) { fPrefixLDC=folder;}
75 /// set the index of calibration runs
5253c153 76 void SetAliIndex(Int_t ind) {fIndex = ind;}
dbbb2c64 77 /// Compute the pedestal data (mean, sigma)
78 void Finalize();
79 /// Create String to be put into file or AMORE DB
80 void MakeASCIIoutput(ostream& out) const;
493c5a63 81 /// Create Histograms
82 void CreateControlHistos();
dbbb2c64 83 /// Fill Histograms
84 void MakeControlHistos();
5253c153 85
9c2d4e89 86 Int_t ADCMax() const { return 4095; }
f3cfa63e 87
88protected:
89 // Int_t fN; ///<
f9e83f1d 90 Int_t fNCurrentEvents; ///< Number of current events
91 Int_t fNEvthreshold; ///< Nbevt threshold (pedestal calculation)
ff496840 92 Int_t fSorting; ///< sorting flag (pedestal values)
5431405e 93 Int_t fNEvents; ///< Number of events
94 Int_t fRunNumber; ///< run number
95 Int_t fNChannel; ///< Nb of channels (pads)
96 Int_t fNManu; ///< Nb of Manu
f3cfa63e 97 Int_t fNManuConfig; ///< Nb of Manu in the current detector configuration
1b15b395 98 Int_t fConfig; ///< flag 1(0) for reading(or not) configuration ascii file
9c2d4e89 99 Int_t fStatusDA; ///< DA return code (0=OK)
493c5a63 100 Int_t fHistos; ///< flag for Histograms (0,1=standard, 2=ntuple with charge)
a54854fc 101 AliMUONVStore* fErrorBuspatchTable; ///< Table for buspatches with parity errors
102 AliMUONVStore* fManuBuspatchTable; ///< Occupancy rate for each (buspatch, manu)
1b15b395 103 AliMUONVStore* fManuBPoutofconfigTable; ///< (buspatch, manu) out of config
5431405e 104
105 TTimeStamp* fDate; ///< date
106 ofstream* fFilcout; ///< .log output file
f3cfa63e 107 TString fHistoFileName; ///< .root histo file
108 AliMUONVStore* fPedestalStore; ///< data container: (Pedmean,sigma) values for each (BP,manuId)
5431405e 109 Int_t fIndex; ///< calibration run index
f3cfa63e 110 TString fPrefixDA; ///< specific DA prefixname
9c2d4e89 111 TString fPrefixLDC; ///< specific LDC prefixname
493c5a63 112 TFile* fHistoFile; ///< .root histo file
113 TTree* fTree ; ///< charge Tree
5253c153 114
f3cfa63e 115 static const Int_t fgkADCMax; ///< max channel count
116
5253c153 117 private:
118 /// Not implemented
119 AliMUONPedestal(const AliMUONPedestal& rhs);
120 /// Not implemented
121 AliMUONPedestal& operator = (const AliMUONPedestal& rhs);
122
493c5a63 123 ClassDef(AliMUONPedestal,6) // Pedestal computing for DA
5253c153 124};
125
126#endif