source: trunk/MagicSoft/MarsOctober/mrootformat/MPedest.cc@ 924

Last change on this file since 924 was 452, checked in by harald, 24 years ago
Further improvements in the layout of some guiclasses. Know the fundament for calculating the pedestals is created with the first implementation of the classes MPixPedest and MPedest. A first task for calculating the pedestals is set up (MCalcPed1).
File size: 1.4 KB
Line 
1#include "MPedest.h"
2
3#include <iostream.h>
4
5ClassImp(MPedest)
6
7MPedest::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
21MPedest::~MPedest()
22{
23 // default destructor
24
25 delete fHighPed ;
26 delete fLowPed ;
27
28}
29
30void 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
39void 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
50void 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
Note: See TracBrowser for help on using the repository browser.