Changeset 5879 for trunk/MagicSoft/Mars/mtemp/mifae/library
- Timestamp:
- 01/18/05 10:53:10 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mtemp/mifae/library
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/mifae/library/MControlPlots.cc
r5379 r5879 63 63 fCameraHisto[kOn] = NULL; 64 64 fCameraHisto[kOff] = NULL; 65 65 66 } 66 67 // ------------------------------------------------------------------------- … … 70 71 MControlPlots::~MControlPlots() 71 72 { 72 if(fGeomCam) 73 delete fGeomCam; 73 Clear(); 74 74 75 75 if(fCameraHisto[kOn]) … … 79 79 } 80 80 81 void MControlPlots::Clear(const Option_t *o) 82 { 83 84 if(fGeomCam) 85 delete fGeomCam; 86 87 fGeomCam = NULL; 88 } 89 81 90 82 91 // ------------------------------------------------------------------------- … … 86 95 Int_t MControlPlots::PreProcess(MParList* pList) 87 96 { 97 98 Reset(); 99 88 100 // FIXME! only valid for Magic geometry for the time being! 89 101 fGeomCam = new MGeomCamMagic; … … 94 106 *fLog << warn << AddSerialNumber("MIslands") << " [MIslands] not found... Some control plots will not be produced" << endl; 95 107 else 96 fCameraHisto[fMode] = new MHCamera(*fGeomCam,"Survive","Pixels surviving Image Cleaning"); 108 { 109 if (fCameraHisto[fMode]) 110 { 111 *fLog << err << GetDescriptor() 112 << "Camera with mode " << fMode << " already existing " << endl; 113 return kFALSE; 114 } 115 TString name = ""; 116 switch (fMode) 117 { 118 case kOn: 119 name += "On"; 120 break; 121 case kOff: 122 name += "Off"; 123 break; 124 } 125 fCameraHisto[fMode] = new MHCamera(*fGeomCam, 126 name.Data(), 127 "Pixels surviving Image Cleaning"); 128 } 97 129 return kTRUE; 98 130 } … … 105 137 if(!fIslands) return kTRUE; 106 138 107 MImgIsland *imgIsl = new MImgIsland;139 MImgIsland *imgIsl = NULL; 108 140 TIter Next(fIslands->GetList()); 109 141 … … 111 143 Int_t idPix = -1; 112 144 113 while ((imgIsl=(MImgIsland*)Next())) {114 115 pixNum = imgIsl->GetPixNum();116 117 for(Int_t k = 0; k<pixNum; k++)118 119 idPix = imgIsl->GetPixList(k);120 fCameraHisto[fMode]->Fill(idPix,1);121 fCameraHisto[fMode]->SetUsed(idPix);122 123 }145 while ((imgIsl=(MImgIsland*)Next())) 146 { 147 pixNum = imgIsl->GetPixNum(); 148 149 for(Int_t k = 0; k<pixNum; k++) 150 { 151 idPix = imgIsl->GetPixList(k); 152 fCameraHisto[fMode]->Fill(idPix,1.); 153 fCameraHisto[fMode]->SetUsed(idPix); 154 } 155 } 124 156 125 157 /* for (UInt_t i=0;i<fGeomCam->GetNumPixels();i++) … … 142 174 Int_t MControlPlots::PostProcess() 143 175 { 144 fCameraHisto[fMode]->SetEntries(fGeomCam->GetNumPixels());145 146 176 if(!fProduceFile) return kTRUE; 147 177 if(fProduceFile && !fFileName.Length()) … … 165 195 if(fCameraHisto[kOn] && fCameraHisto[kOff]) 166 196 { 167 diff = new MHCamera(*fGeomCam,"Diff"," Pixels surviving Image Cleaning");197 diff = new MHCamera(*fGeomCam,"Diff","Difference of pixels surviving Image Cleaning"); 168 198 169 199 // Normalize Off to On -
trunk/MagicSoft/Mars/mtemp/mifae/library/MControlPlots.h
r5170 r5879 15 15 { 16 16 public: 17 enum OnOffMode_t {kOn=0,kOff };17 enum OnOffMode_t {kOn=0,kOff=1}; 18 18 19 19 private: … … 34 34 virtual ~MControlPlots(); 35 35 36 void Reset() { Clear(); } 37 void Clear(const Option_t *o=""); 38 36 39 void SetFilename(TString fname) {fFileName=fname;} 37 40 void SetMode(OnOffMode_t mode) {fMode=mode;} -
trunk/MagicSoft/Mars/mtemp/mifae/library/MIslands.cc
r5186 r5879 24 24 25 25 fIslands = new TList; 26 26 fIslands->SetOwner(); 27 27 } 28 28 … … 33 33 MIslands::~MIslands() 34 34 { 35 fIslands->SetOwner();36 35 fIslands->Delete(); 37 36 }
Note:
See TracChangeset
for help on using the changeset viewer.