Ignore:
Timestamp:
09/25/04 14:01:50 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mpedestal/MHPedestalCam.cc

    r4996 r5137  
    113113#include "TH1.h"
    114114
     115#include <TOrdCollection.h>
     116
    115117ClassImp(MHPedestalCam);
    116118
     
    231233  fExtractLoGainSlices = sliceslo;
    232234
    233   if (fHiGainArray->GetEntries()==0)
    234   {
    235       fHiGainArray->Expand(npixels);
     235  if (fHiGainArray->GetSize()==0)
     236  {
    236237      for (Int_t i=0; i<npixels; i++)
    237238      {
    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);
    240242         
    241           if ((*fBadPixels)[i].IsBad())
     243      if ((*fBadPixels)[i].IsBad())
    242244            (*this)[i].SetExcluded();
    243245
     
    247249  }
    248250
    249   if (fLoGainArray->GetEntries()==0)
    250   {
    251       fLoGainArray->Expand(npixels);
     251  if (fLoGainArray->GetSize()==0)
     252  {
    252253      for (Int_t i=0; i<npixels; i++)
    253254      {
    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();
    259261      }
    260262  }
    261263
    262   if (fAverageHiGainAreas->GetEntries()==0)
    263   {
    264     fAverageHiGainAreas->Expand(nareas);
     264  if (fAverageHiGainAreas->GetSize()==0)
     265  {
    265266   
    266267    for (Int_t j=0; j<nareas; j++)
    267268      {
    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);
    273271
    274272        InitPedHists((MHPedestalPix&)GetAverageHiGainArea(j),j,fExtractHiGainSlices);
     
    277275  }
    278276
    279   if (fAverageLoGainAreas->GetEntries()==0)
    280   {
    281     fAverageLoGainAreas->Expand(nareas);
     277  if (fAverageLoGainAreas->GetSize()==0)
     278  {
    282279   
    283280    for (Int_t j=0; j<nareas; j++)
    284281      {
    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);
    290284
    291285        InitPedHists((MHPedestalPix&)GetAverageLoGainArea(j),j,fExtractLoGainSlices);
     
    294288  }
    295289
    296   if (fAverageHiGainSectors->GetEntries()==0)
    297   {
    298       fAverageHiGainSectors->Expand(nsectors);
     290  if (fAverageHiGainSectors->GetSize()==0)
     291  {
    299292
    300293      for (Int_t j=0; j<nsectors; j++)
    301294      {
    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);
    307297
    308298          InitPedHists((MHPedestalPix&)GetAverageHiGainSector(j),j,fExtractHiGainSlices);
    309 
    310299      }
    311300  }
    312301
    313   if (fAverageLoGainSectors->GetEntries()==0)
    314   {
    315       fAverageLoGainSectors->Expand(nsectors);
    316 
     302  if (fAverageLoGainSectors->GetSize()==0)
     303  {
    317304      for (Int_t j=0; j<nsectors; j++)
    318305      {
    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);
    324308
    325309          InitPedHists((MHPedestalPix&)GetAverageLoGainSector(j),j,fExtractLoGainSlices);
    326          
    327310      }
    328311  }
     
    347330
    348331  hist.InitBins();
    349   hist.ChangeHistId(i);
    350332  hist.SetEventFrequency(fPulserFrequency);
    351333
     
    355337  hist.SetProbLimit(0.);
    356338
    357   TH1F *h = hist.GetHGausHist();
    358   h->SetTitle( Form("%s%s", h->GetTitle()," Runs: "));
    359339}
    360340// -------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.