Changeset 1032 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 11/06/01 13:27:04 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
r1010 r1032 62 62 63 63 AddToBranchList("fHiGainPixId"); 64 //AddToBranchList("fLoGainPixId");64 AddToBranchList("fLoGainPixId"); 65 65 AddToBranchList("fHiGainFadcSamples"); 66 //AddToBranchList("fLoGainFadcSamples"); 66 AddToBranchList("fLoGainFadcSamples"); 67 67 68 } 68 69 … … 77 78 // - MCerPhotEvt 78 79 // 79 Bool_t MCerPhotCalc::PreProcess( MParList *pList)80 Bool_t MCerPhotCalc::PreProcess(MParList *pList) 80 81 { 81 82 fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData"); … … 107 108 Bool_t MCerPhotCalc::Process() 108 109 { 109 fCerPhotEvt->Clear();110 111 110 MRawEvtPixelIter pixel(fRawEvt); 112 111 113 112 while (pixel.Next()) 114 113 { 114 115 115 const UInt_t pixid = pixel.GetPixelId(); 116 116 -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
r1003 r1032 44 44 MCerPhotEvt::MCerPhotEvt(const char *name, const char *title) : fNumPixels(0) 45 45 { 46 47 fName = name ? name : "MCerPhotEvt"; 48 fTitle = title ? title : "(Number of Photon)-Event Information"; 49 50 fPixels = new TClonesArray ("MCerPhotPix", 577) ; 51 52 // 53 // FIXME: is this really necessary? 54 // 55 fPixels->Clear(); 46 fName = name ? name : "MCerPhotEvt"; 47 fTitle = title ? title : "(Number of Photon)-Event Information"; 48 49 fPixels = new TClonesArray ("MCerPhotPix", 577); 50 51 // 52 // FIXME: is this really necessary? 53 // 54 Reset(); 56 55 } 57 56 … … 82 81 { 83 82 // TClonesArray -> 'operator new with placement' should be used 83 84 fPixels->ExpandCreate(fNumPixels); 84 85 new ((*fPixels)[fNumPixels++]) MCerPhotPix(id, nph, err); 85 86 } … … 89 90 // reset counter and delete netries in list. 90 91 // 91 void MCerPhotEvt:: Clear(Option_t *)92 void MCerPhotEvt::Reset() 92 93 { 93 94 fNumPixels = 0; 94 fPixels->Clear();95 // fPixels->Delete(); 95 96 } 96 97 … … 108 109 << endl ; 109 110 110 for (Int_t i l=0; il<entries; il++ )111 (*this)[i l].Print();111 for (Int_t i=0; i<entries; i++ ) 112 (*this)[i].Print(); 112 113 } 113 114 … … 120 121 const Int_t entries = fPixels->GetEntries(); 121 122 122 for (Int_t i l=0; il<entries; il++)123 { 124 if (id == (*this)[i l].GetPixId())123 for (Int_t i=0; i<entries; i++) 124 { 125 if (id == (*this)[i].GetPixId()) 125 126 return kTRUE; 126 127 } … … 137 138 const Int_t entries = fPixels->GetEntries(); 138 139 139 for (Int_t i l=0; il<entries; il++)140 { 141 MCerPhotPix &pix = (*this)[il];140 for (Int_t i=0; i<entries; i++) 141 { 142 const MCerPhotPix &pix = (*this)[i]; 142 143 143 144 if (id == pix.GetPixId() && pix.IsPixelUsed()) … … 156 157 const Int_t entries = fPixels->GetEntries(); 157 158 158 for (Int_t i l=0; il<entries; il++)159 { 160 MCerPhotPix &pix = (*this)[il];159 for (Int_t i=0; i<entries; i++) 160 { 161 const MCerPhotPix &pix = (*this)[i]; 161 162 162 163 if (id == pix.GetPixId() && pix.IsCorePixel()) … … 178 179 Float_t minval = (*this)[0].GetNumPhotons(); 179 180 180 Float_t testval;181 181 for (UInt_t i=1; i<fNumPixels; i++) 182 182 { 183 testval = (*this)[i].GetNumPhotons();183 const Float_t testval = (*this)[i].GetNumPhotons(); 184 184 185 185 if (testval < minval) … … 201 201 Float_t maxval = (*this)[0].GetNumPhotons(); 202 202 203 Float_t testval;204 203 for (UInt_t i=1; i<fNumPixels; i++) 205 204 { 206 testval = (*this)[i].GetNumPhotons();205 const Float_t testval = (*this)[i].GetNumPhotons(); 207 206 208 207 if (testval > maxval) -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
r1014 r1032 21 21 ~MCerPhotEvt() { delete fPixels; } 22 22 23 void Draw(Option_t* option = "");24 25 23 UInt_t GetNumPixels() const { return fNumPixels; } 26 27 void AddPixel(Int_t id, Float_t nph, Float_t err); 28 29 void Clear(Option_t *opt=NULL); 30 void Print(Option_t *opt=NULL) const; 24 void AddPixel(Int_t id, Float_t nph, Float_t err); 31 25 32 26 Bool_t IsPixelExisting(Int_t id) const; … … 40 34 MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->At(i)); } 41 35 36 void Reset(); 37 38 void Draw(Option_t* option = ""); 39 void Print(Option_t *opt=NULL) const; 40 void Clear(Option_t *opt=NULL) { Reset(); } 41 42 42 ClassDef(MCerPhotEvt, 1) // class for an event containing cerenkov photons 43 43 };
Note:
See TracChangeset
for help on using the changeset viewer.