Changeset 1303 for trunk/MagicSoft/Mars
- Timestamp:
- 04/26/02 10:17:49 (23 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1301 r1303 1 1 -*-*- END -*-*- 2 2002/04/26: Thomas Bretz 3 4 * mhist/MHFadcCam.cc: 5 - start numbering of pixels with 1 6 7 * mhist/MHFadcPix.[h,cc]: 8 - overloaded clone to get rid of the histograms in any directory 9 - removed some unnecessary StrDup calls 10 - changed binning (Thanks to Abelardo) 11 12 13 2 14 2002/04/25: Thomas Bretz 3 15 -
trunk/MagicSoft/Mars/mhist/MHFadcCam.cc
r1211 r1303 60 60 61 61 for (Int_t i=0; i<577; i++) 62 (*fArray)[i] = new MHFadcPix(i );62 (*fArray)[i] = new MHFadcPix(i+1); 63 63 } 64 64 -
trunk/MagicSoft/Mars/mhist/MHFadcPix.cc
r1082 r1303 48 48 MHFadcPix::MHFadcPix(UInt_t pixid) : fPixId(pixid) 49 49 { 50 Char_t *name = StrDup(pixid ? Form("HiGain%03d", pixid) : "HiGain"); 51 Char_t *title = StrDup(pixid ? Form("Hi Gain Pixel #%d", pixid) : "Hi Gain Samples"); 52 53 fHistHi = new TH1F(name, title, 256, 0, 255); 50 fHistHi = new TH1F(pixid ? Form("HiGain%03d", pixid) : "HiGain", 51 pixid ? Form("Hi Gain Pixel #%d", pixid) : "Hi Gain Samples", 52 256, -.5, 255.5); 54 53 55 54 fHistHi->SetDirectory(NULL); … … 57 56 fHistHi->SetYTitle("Count"); 58 57 59 delete [] name; 60 delete [] title; 61 62 name = StrDup(pixid ? Form("LoGain%03d", pixid) : "LoGain"); 63 title = StrDup(pixid ? Form("Lo Gain Pixel #%d", pixid) : "Lo Gain Samples"); 64 65 fHistLo = new TH1F(name, title, 256, 0, 255); 58 fHistLo = new TH1F(pixid ? Form("LoGain%03d", pixid) : "LoGain", 59 pixid ? Form("Lo Gain Pixel #%d", pixid) : "Lo Gain Samples", 60 256, -.5, 255.5); 66 61 67 62 fHistLo->SetDirectory(NULL); 68 63 fHistLo->SetXTitle("Signal/FADC Units"); 69 64 fHistLo->SetYTitle("Count"); 70 71 delete [] name;72 delete [] title;73 65 } 74 66 … … 105 97 106 98 // -------------------------------------------------------------------------- 99 // 100 // We need our own clone function to get rid of the histogram in any 101 // directory 102 // 103 TObject *MHFadcPix::Clone(const char *) const 104 { 105 MHFadcPix &pix = *(MHFadcPix*)TObject::Clone(); 106 107 pix.fHistHi->SetDirectory(NULL); 108 pix.fHistLo->SetDirectory(NULL); 109 110 return &pix; 111 } 112 113 // -------------------------------------------------------------------------- 107 114 void MHFadcPix::Draw(Option_t *) 108 115 { … … 110 117 { 111 118 const char *name = StrDup(fPixId ? Form("Pixel #%d", fPixId) : "Pixel"); 112 const char *title = StrDup(fPixId ? Form("%s FADC Samples", name) : "FADC Samples"); 113 MH::MakeDefCanvas(name, title); 119 MH::MakeDefCanvas(name, fPixId ? Form("%s FADC Samples", name) : "FADC Samples"); 114 120 delete [] name; 115 delete [] title;116 121 } 117 122 -
trunk/MagicSoft/Mars/mhist/MHFadcPix.h
r1015 r1303 29 29 void DrawLo(); 30 30 31 TObject *Clone(const char *) const; 32 31 33 void Draw(Option_t *opt=NULL); 32 34
Note:
See TracChangeset
for help on using the changeset viewer.