Changeset 5137 for trunk/MagicSoft/Mars/mpedestal
- Timestamp:
- 09/25/04 14:01:50 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpedestal/MHPedestalCam.cc
r4996 r5137 113 113 #include "TH1.h" 114 114 115 #include <TOrdCollection.h> 116 115 117 ClassImp(MHPedestalCam); 116 118 … … 231 233 fExtractLoGainSlices = sliceslo; 232 234 233 if (fHiGainArray->GetEntries()==0) 234 { 235 fHiGainArray->Expand(npixels); 235 if (fHiGainArray->GetSize()==0) 236 { 236 237 for (Int_t i=0; i<npixels; i++) 237 238 { 238 (*fHiGainArray)[i] = new MHPedestalPix; 239 InitPedHists((MHPedestalPix&)(*this)[i],i,fExtractHiGainSlices); 239 fHiGainArray->AddAt(new MHPedestalPix(Form("%s%4i","MHPedestalHiGainPix",i), 240 Form("%s%4i","Pedestals High Gain Pixel",i)),i); 241 InitPedHists((MHPedestalPix&)(*this)[i],i,fExtractHiGainSlices); 240 242 241 243 if ((*fBadPixels)[i].IsBad()) 242 244 (*this)[i].SetExcluded(); 243 245 … … 247 249 } 248 250 249 if (fLoGainArray->GetEntries()==0) 250 { 251 fLoGainArray->Expand(npixels); 251 if (fLoGainArray->GetSize()==0) 252 { 252 253 for (Int_t i=0; i<npixels; i++) 253 254 { 254 (*fLoGainArray)[i] = new MHPedestalPix; 255 InitPedHists((MHPedestalPix&)(*this)(i),i,fExtractLoGainSlices); 256 257 if ((*fBadPixels)[i].IsBad()) 258 (*this)(i).SetExcluded(); 255 fLoGainArray->AddAt(new MHPedestalPix(Form("%s%4i","MHPedestalLoGainPix",i), 256 Form("%s%4i","Pedestals Low Gain Pixel",i)),i); 257 InitPedHists((MHPedestalPix&)(*this)(i),i,fExtractLoGainSlices); 258 259 if ((*fBadPixels)[i].IsBad()) 260 (*this)(i).SetExcluded(); 259 261 } 260 262 } 261 263 262 if (fAverageHiGainAreas->GetEntries()==0) 263 { 264 fAverageHiGainAreas->Expand(nareas); 264 if (fAverageHiGainAreas->GetSize()==0) 265 { 265 266 266 267 for (Int_t j=0; j<nareas; j++) 267 268 { 268 (*fAverageHiGainAreas)[j] = 269 new MHPedestalPix("AverageHiGainArea", 270 "Average Pedestals area idx "); 271 272 GetAverageHiGainArea(j).GetHGausHist()->SetTitle("Pedestals average Area Idx "); 269 fAverageHiGainAreas->AddAt(new MHPedestalPix(Form("%s%d","AverageHiGainArea",j), 270 Form("%s%d","Average Pedestals area idx ",j)),j); 273 271 274 272 InitPedHists((MHPedestalPix&)GetAverageHiGainArea(j),j,fExtractHiGainSlices); … … 277 275 } 278 276 279 if (fAverageLoGainAreas->GetEntries()==0) 280 { 281 fAverageLoGainAreas->Expand(nareas); 277 if (fAverageLoGainAreas->GetSize()==0) 278 { 282 279 283 280 for (Int_t j=0; j<nareas; j++) 284 281 { 285 (*fAverageLoGainAreas)[j] = 286 new MHPedestalPix("AverageLoGainArea", 287 "Pedestals average Area idx "); 288 289 GetAverageLoGainArea(j).GetHGausHist()->SetTitle("Pedestals average Area Idx "); 282 fAverageLoGainAreas->AddAt(new MHPedestalPix(Form("%s%d","AverageLoGainArea",j), 283 Form("%s%d","Pedestals average Area idx ",j)),j); 290 284 291 285 InitPedHists((MHPedestalPix&)GetAverageLoGainArea(j),j,fExtractLoGainSlices); … … 294 288 } 295 289 296 if (fAverageHiGainSectors->GetEntries()==0) 297 { 298 fAverageHiGainSectors->Expand(nsectors); 290 if (fAverageHiGainSectors->GetSize()==0) 291 { 299 292 300 293 for (Int_t j=0; j<nsectors; j++) 301 294 { 302 (*fAverageHiGainSectors)[j] = 303 new MHPedestalPix("AverageHiGainSector", 304 "Pedestals average sector "); 305 306 GetAverageHiGainSector(j).GetHGausHist()->SetTitle("Pedestals average Sector "); 295 fAverageHiGainSectors->AddAt(new MHPedestalPix(Form("%s%2i","AverageHiGainSector",j), 296 Form("%s%2i","Pedestals average sector ",j)),j); 307 297 308 298 InitPedHists((MHPedestalPix&)GetAverageHiGainSector(j),j,fExtractHiGainSlices); 309 310 299 } 311 300 } 312 301 313 if (fAverageLoGainSectors->GetEntries()==0) 314 { 315 fAverageLoGainSectors->Expand(nsectors); 316 302 if (fAverageLoGainSectors->GetSize()==0) 303 { 317 304 for (Int_t j=0; j<nsectors; j++) 318 305 { 319 (*fAverageLoGainSectors)[j] = 320 new MHPedestalPix("AverageLoGainSector", 321 "Pedestals average sector "); 322 323 GetAverageLoGainSector(j).GetHGausHist()->SetTitle("Pedestals average Sector "); 306 fAverageLoGainSectors->AddAt(new MHPedestalPix(Form("%s%2i","AverageLoGainSector",j), 307 Form("%s%2i","Pedestals average sector ",j)),j); 324 308 325 309 InitPedHists((MHPedestalPix&)GetAverageLoGainSector(j),j,fExtractLoGainSlices); 326 327 310 } 328 311 } … … 347 330 348 331 hist.InitBins(); 349 hist.ChangeHistId(i);350 332 hist.SetEventFrequency(fPulserFrequency); 351 333 … … 355 337 hist.SetProbLimit(0.); 356 338 357 TH1F *h = hist.GetHGausHist();358 h->SetTitle( Form("%s%s", h->GetTitle()," Runs: "));359 339 } 360 340 // -------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.