Changeset 2333
- Timestamp:
- 09/12/03 16:08:56 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2332 r2333 7 7 information can be found in the comments there. 8 8 9 * mhist/MHFadcCam. cc:9 * mhist/MHFadcCam.[h,cc]: 10 10 - skip MC events which have no FADC information stored 11 11 - better output in case of changes in the number of slices 12 13 * mhist/MHFadcPix.cc: 12 - added size argument to constructor to support ECO100, too. 13 - removed all fixed numbers and replaced them by the corresponding 14 function 15 - fixed pixel numbering to be consistent with the software pixel 16 numbering in the rest of Mars 17 18 * mhist/MHFadcPix.[h,cc]: 14 19 - fixed the missing y-axis (UseCurrentStyle()) 20 - fixed pixel numbering by changing default arument of pixid in 21 constructor from 0 to -1 15 22 16 23 * mmain/MDataCheck.cc 17 24 - added 'Time Spectra of Cosmics' button 25 - added size argument to instatiation of MHFadcCam 26 18 27 19 28 -
trunk/MagicSoft/Mars/mhist/MHFadcCam.cc
r2331 r2333 49 49 // creates an a list of histograms for all pixels and both gain channels 50 50 // 51 MHFadcCam::MHFadcCam( MHFadcPix::Type_t t, const char *name, const char *title)51 MHFadcCam::MHFadcCam(const Int_t n, MHFadcPix::Type_t t, const char *name, const char *title) 52 52 : fNumHiGains(-1), fNumLoGains(-1), fType(t) 53 53 { 54 54 // 55 // 55 // set the name and title of this object 56 56 // 57 57 fName = name ? name : "MHFadcCam"; … … 59 59 60 60 // 61 // 62 // 63 // 61 // loop over all Pixels and create two histograms 62 // one for the Low and one for the High gain 63 // connect all the histogram with the container fHist 64 64 // 65 fArray = new TObjArray( 577);65 fArray = new TObjArray(n); 66 66 67 for (Int_t i=0; i< 577; i++)68 (*fArray)[i] = new MHFadcPix(i +1, fType);67 for (Int_t i=0; i<n; i++) 68 (*fArray)[i] = new MHFadcPix(i, fType); 69 69 } 70 70 … … 82 82 TObject *MHFadcCam::Clone(const char *) const 83 83 { 84 MHFadcCam *cam = new MHFadcCam;84 const Int_t n = fArray->GetSize(); 85 85 86 for (int i=0; i<577; i++) 86 // 87 // FIXME, this might be done faster and more elegant, by direct copy. 88 // 89 MHFadcCam *cam = new MHFadcCam(n); 90 91 for (int i=0; i<n; i++) 87 92 { 88 93 delete (*cam->fArray)[i]; … … 100 105 Bool_t MHFadcCam::Fill(const MRawEvtData *par) 101 106 { 107 const Int_t n = fArray->GetSize(); 108 102 109 if (fType==MHFadcPix::kSlices) 103 110 { … … 113 120 114 121 // 115 // First call 122 // First call with nhi!=0 116 123 // 117 124 if (fNumHiGains<0) 118 for (int i=0; i< 577; i++)125 for (int i=0; i<n; i++) 119 126 (*this)[i].Init(nhi, nlo); 120 127 else … … 136 143 } 137 144 138 for (int i=0; i< 577; i++)145 for (int i=0; i<n; i++) 139 146 if (!(*this)[i].Fill(*par)) 140 147 return kFALSE; … … 145 152 void MHFadcCam::ResetHistograms() 146 153 { 147 for (Int_t i=0; i<577; i++) 154 const Int_t n = fArray->GetSize(); 155 for (Int_t i=0; i<n; i++) 148 156 ResetEntry(i); 149 157 } … … 154 162 GetHistLo(i)->Reset(); 155 163 } 156 -
trunk/MagicSoft/Mars/mhist/MHFadcCam.h
r2173 r2333 33 33 34 34 public: 35 MHFadcCam( MHFadcPix::Type_t t=MHFadcPix::kValue, const char *name=NULL, const char *title=NULL);35 MHFadcCam(const Int_t n=577, MHFadcPix::Type_t t=MHFadcPix::kValue, const char *name=NULL, const char *title=NULL); 36 36 ~MHFadcCam(); 37 37 -
trunk/MagicSoft/Mars/mhist/MHFadcPix.cc
r2331 r2333 48 48 // Creates the histograms for lo and hi gain of one pixel 49 49 // 50 MHFadcPix::MHFadcPix( UInt_t pixid, Type_t t)50 MHFadcPix::MHFadcPix(Int_t pixid, Type_t t) 51 51 : fPixId(pixid), fType(t) 52 52 { 53 fHistHi.SetName(pixid ? Form("HiGain%03d", pixid) : "HiGain");54 fHistHi.SetTitle(pixid ? Form("Hi Gain Pixel #%d", pixid) : "Hi Gain Samples");53 fHistHi.SetName(pixid>=0 ? Form("HiGain%03d", pixid) : "HiGain"); 54 fHistHi.SetTitle(pixid>=0 ? Form("Hi Gain Pixel #%d", pixid) : "Hi Gain Samples"); 55 55 fHistHi.SetDirectory(NULL); 56 56 fHistHi.UseCurrentStyle(); 57 57 58 fHistLo.SetName(pixid ? Form("LoGain%03d", pixid) : "LoGain");59 fHistLo.SetTitle(pixid ? Form("Lo Gain Pixel #%d", pixid) : "Lo Gain Samples");58 fHistLo.SetName(pixid>=0 ? Form("LoGain%03d", pixid) : "LoGain"); 59 fHistLo.SetTitle(pixid>=0 ? Form("Lo Gain Pixel #%d", pixid) : "Lo Gain Samples"); 60 60 fHistLo.SetDirectory(NULL); 61 61 fHistLo.UseCurrentStyle(); -
trunk/MagicSoft/Mars/mhist/MHFadcPix.h
r1652 r2333 26 26 27 27 public: 28 MHFadcPix( UInt_t pixid=0, Type_t t=kValue);28 MHFadcPix(Int_t pixid=-1, Type_t t=kValue); 29 29 30 30 TH1F *GetHistHi() { return &fHistHi; } -
trunk/MagicSoft/Mars/mmain/MDataCheck.cc
r2331 r2333 120 120 read.DisableAutoScheme(); 121 121 122 MHFadcCam hist( t);122 MHFadcCam hist(577, t); 123 123 plist.AddToList(&hist); 124 124
Note:
See TracChangeset
for help on using the changeset viewer.