| 1 | #include "MPedest.h" | 
|---|
| 2 |  | 
|---|
| 3 | #include <iostream.h> | 
|---|
| 4 |  | 
|---|
| 5 | ClassImp(MPedest) | 
|---|
| 6 |  | 
|---|
| 7 | MPedest::MPedest( Int_t iPix ) | 
|---|
| 8 | { | 
|---|
| 9 | //  default destructor | 
|---|
| 10 |  | 
|---|
| 11 | fName  = "MPedest" ; | 
|---|
| 12 | fTitle = "Container for Pedestals" ; | 
|---|
| 13 |  | 
|---|
| 14 |  | 
|---|
| 15 | fNumPix  = iPix  ; | 
|---|
| 16 | fHighPed = new MPixPedest[fNumPix] ; | 
|---|
| 17 | fLowPed  = new MPixPedest[fNumPix] ; | 
|---|
| 18 |  | 
|---|
| 19 | } | 
|---|
| 20 |  | 
|---|
| 21 | MPedest::~MPedest() | 
|---|
| 22 | { | 
|---|
| 23 | //  default destructor | 
|---|
| 24 |  | 
|---|
| 25 | delete fHighPed ; | 
|---|
| 26 | delete fLowPed ; | 
|---|
| 27 |  | 
|---|
| 28 | } | 
|---|
| 29 |  | 
|---|
| 30 | void MPedest::SetAllHigh( Int_t iPix, Float_t mean, Float_t errMean, Float_t sig, Float_t errSig ) { | 
|---|
| 31 | //   set the value of one pixel | 
|---|
| 32 |  | 
|---|
| 33 | fHighPed[iPix].SetMean(mean) ; | 
|---|
| 34 | fHighPed[iPix].SetErrMean(errMean) ; | 
|---|
| 35 | fHighPed[iPix].SetSigma(sig); | 
|---|
| 36 | fHighPed[iPix].SetErrSigma(errSig) ; | 
|---|
| 37 | } | 
|---|
| 38 |  | 
|---|
| 39 | void MPedest::SetAllLow( Int_t iPix, Float_t mean, Float_t errMean, Float_t sig, Float_t errSig ) { | 
|---|
| 40 | //   set the value of one pixel | 
|---|
| 41 |  | 
|---|
| 42 | fLowPed[iPix].SetMean(mean) ; | 
|---|
| 43 | fLowPed[iPix].SetErrMean(errMean) ; | 
|---|
| 44 | fLowPed[iPix].SetSigma(sig); | 
|---|
| 45 | fLowPed[iPix].SetErrSigma(errSig) ; | 
|---|
| 46 | } | 
|---|
| 47 |  | 
|---|
| 48 |  | 
|---|
| 49 |  | 
|---|
| 50 | void MPedest::Print() | 
|---|
| 51 | { | 
|---|
| 52 | //   information about the content on screen | 
|---|
| 53 |  | 
|---|
| 54 | cout << " content of Pedestal " << endl ; | 
|---|
| 55 | cout << " HIGH gain " << endl ; | 
|---|
| 56 |  | 
|---|
| 57 | for ( Int_t i=0; i< fNumPix; i++ ) { | 
|---|
| 58 | cout << " Pixel: " << i << " High" ; | 
|---|
| 59 | fHighPed[i].Print() ; | 
|---|
| 60 | } | 
|---|
| 61 |  | 
|---|
| 62 | cout << " LOW gain " << endl ; | 
|---|
| 63 |  | 
|---|
| 64 | for ( Int_t i=0; i< fNumPix; i++ ) { | 
|---|
| 65 | cout << " Pixel: " << i << " High" ; | 
|---|
| 66 | fLowPed[i].Print() ; | 
|---|
| 67 | } | 
|---|
| 68 |  | 
|---|
| 69 | } | 
|---|
| 70 |  | 
|---|