Changeset 665 for trunk/MagicSoft/Mars/mdatacheck/MHistosAdc.cc
- Timestamp:
- 03/02/01 12:09:07 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mdatacheck/MHistosAdc.cc
r462 r665 23 23 // 24 24 25 fHistHigh = new TObjArray(577);26 fHistLow = new TObjArray(577);27 28 25 // 29 26 // set the name and title of this object … … 38 35 // connect all the histogram with the container fHist 39 36 // 37 fHistHi = new TObjArray(577); 38 fHistLo = new TObjArray(577); 40 39 41 40 Char_t tmp1[40]; 42 41 Char_t tmp2[40]; 43 TH1F *h1;44 42 45 43 for ( Int_t i = 0 ; i < 577 ; i++) … … 48 46 sprintf ( tmp2, "high gain Pixel %d", i ) ; 49 47 50 h1 = new TH1F ( tmp1, tmp2, 256, 0., 255. ) ; 51 52 fHistHigh->Add( h1 ) ; 48 fHistHi->Add( new TH1F ( tmp1, tmp2, 256, 0., 255. ) ) ; 53 49 54 50 sprintf ( tmp1, "low %d", i ) ; 55 51 sprintf ( tmp2, "low gain Pixel %d", i ) ; 56 52 57 h1 = new TH1F ( tmp1, tmp2, 256, 0., 255. ) ; 58 59 fHistLow->Add( h1 ) ; 53 fHistLo->Add( new TH1F ( tmp1, tmp2, 256, 0., 255. ) ) ; 60 54 61 55 } … … 67 61 // default destructor 68 62 // 69 delete fHistHi gh ;70 delete fHistLo w ;63 delete fHistHi ; 64 delete fHistLo ; 71 65 } 72 66 … … 75 69 for ( Int_t i = 0 ; i < 576 ; i++) 76 70 { 77 fHistHi gh[i].Print() ;71 fHistHi[i].Print() ; 78 72 } 79 73 } 80 74 81 void MHistosAdc::FillAdcHistHi gh( Int_t iPix, Byte_t data)75 void MHistosAdc::FillAdcHistHi ( Int_t iPix, Byte_t data) 82 76 { 83 77 // 84 78 85 ((TH1F*) (fHistHigh->At(iPix)))->Fill( (Float_t) data ) ;79 GetHistHi(iPix)->Fill( (Float_t) data ) ; 86 80 } 87 81 88 void MHistosAdc::FillAdcHistLo w( Int_t iPix, Byte_t data)82 void MHistosAdc::FillAdcHistLo ( Int_t iPix, Byte_t data) 89 83 { 90 84 // 91 85 92 ((TH1F*) (fHistLow->At(iPix)))->Fill( (Float_t) data ) ;86 GetHistLo(iPix)->Fill( (Float_t) data ) ; 93 87 } 94 88 … … 99 93 // 100 94 95 // 96 // FIXME: Don't open a file and write to this file! 97 // just Fill the current container (or the two histograms 98 // to an open file. The user must choose a file before. 99 // 101 100 TFile out( name, "recreate") ; 102 101 … … 105 104 // 106 105 107 fHistLo w->Write() ;108 fHistHi gh->Write() ;106 fHistLo->Write() ; 107 fHistHi->Write() ; 109 108 } 110 109
Note:
See TracChangeset
for help on using the changeset viewer.