Changeset 4874 for trunk/MagicSoft/Mars/mbadpixels
- Timestamp:
- 09/07/04 10:49:04 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbadpixels/MHBadPixels.cc
r4841 r4874 82 82 return kFALSE; 83 83 } 84 *fLog << "MHBadPixels::SetupFill; fCam = " << fCam << endl; 84 85 85 86 fPointPos = (MPointingPos*)plist->FindObject("MPointingPos"); … … 98 99 return kFALSE; 99 100 } 100 //fPedPhot->InitSize(fCam->GetNumPixels());101 102 101 fPedPhot->InitSize(fCam->GetNumPixels()); 102 103 //---------------------------------------------------- 103 104 // Get Theta Binning 104 105 MBinning* binstheta = (MBinning*)plist->FindObject("BinningTheta", "MBinning"); … … 112 113 const UInt_t npix1 = fPedPhot->GetSize()+1; 113 114 115 *fLog << "MHBadPixels::SetupFill; npix1 = " << npix1 << endl; 116 114 117 MBinning binspix("BinningPixel"); 115 118 binspix.SetEdges(npix1, -0.5, npix1-0.5); … … 119 122 SetBinning(&fBadN, binstheta, &binspix); 120 123 124 //---------------------------------------------------- 125 *fLog << inf << "Name of MPedPhotCam container : " << fNamePedPhotCam 126 << endl; 127 121 128 return kTRUE; 122 129 } … … 124 131 // ------------------------------------------------------------------------ 125 132 // 126 // Drawing function. It creates its own canvas. 133 // Fill the histograms 134 // 135 136 Bool_t MHBadPixels::Fill(const MParContainer *par, const Stat_t w) 137 { 138 if (!par) 139 return kFALSE; 140 141 Double_t theta = fPointPos->GetZd(); 142 143 const MBadPixelsCam *fBadPixels = (MBadPixelsCam*)par; 144 145 const UInt_t entries = fPedPhot->GetSize(); 146 UInt_t nb = 0; 147 for (UInt_t i=0; i<entries; i++) 148 { 149 //*fLog << "MHBadPixels::Fill; i = " << i << endl; 150 151 if ( (*fBadPixels)[i].IsUnsuitable() ) 152 { 153 //*fLog << "MHBadPixels::Fill; (UnSuitable) " << endl; 154 155 fBadId.Fill(theta, i, w); 156 nb++; 157 } 158 } 159 fBadN.Fill(theta, nb, w); 160 161 return kTRUE; 162 } 163 164 // -------------------------------------------------------------------- 165 // 166 // Draw the histograms 127 167 // 128 168 void MHBadPixels::Draw(Option_t *option) … … 164 204 pad->Update(); 165 205 } 166 167 Bool_t MHBadPixels::Fill(const MParContainer *par, const Stat_t w) 168 { 169 if (!par) 170 return kFALSE; 171 172 Double_t theta = fPointPos->GetZd(); 173 174 const MBadPixelsCam *fBadPixels = (MBadPixelsCam*)par; 175 176 UShort_t entries = fCam->GetNumPixels(); 177 UInt_t nb = 0; 178 for (UInt_t i=0; i<entries; i++) 179 { 180 if ( (*fBadPixels)[i].IsUnsuitable() ) 181 { 182 fBadId.Fill(theta, i, w); 183 nb++; 184 } 185 } 186 fBadN.Fill(theta, nb, w); 187 188 return kTRUE; 189 } 190 191 192 193 194 195 196 197 198 199 200 201 206 //========================================================================== 207 208 209 210 211 212 213 214 215 216 217
Note:
See TracChangeset
for help on using the changeset viewer.