Ignore:
Timestamp:
03/02/01 12:09:07 (24 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mdatacheck/MFillAdcSpect.cc

    r531 r665  
    2525  // connect the raw data with this task
    2626 
     27  fHistos = (MHistosAdc*)pList->FindObject("MHistosAdc");
     28  if (!fHistos)
     29    {
     30        cout << "MRawFileRead::PreProcess - WARNING: MHistosAdc not found... creating." << endl;
     31        fHistos = new MHistosAdc;
     32        pList->AddToList(fHistos);
     33    }
     34
    2735  fRawEvtData = (MRawEvtData*)pList->FindObject("MRawEvtData");
    28  
    2936  if (!fRawEvtData)
    3037    {
    31       cout << "MRawFileRead::PreProcess - WARNING: MRawEvtData not found... creating." << endl;
    32       return kFALSE ;
     38        cout << "MRawFileRead::PreProcess - WARNING: MRawEvtData not found... exit." << endl;
     39        return kFALSE;
    3340    }
    3441
    3542  fPixelIter = new MRawEvtPixelIter( fRawEvtData );
    36  
    37   fHistos = (MHistosAdc*)pList->FindObject("MHistosAdc");
    38  
    39   if (!fHistos)
    40     {
    41       cout << "MRawFileRead::PreProcess - WARNING: MHistosAdc not found... exit..." << endl;
    42       return kFALSE ; 
    43     }
    44 
    4543
    4644  return kTRUE ;
     
    5553  fPixelIter->Reset() ;
    5654
    57   Int_t iHighSamples = fRawEvtData->GetNumHiGainSamples() ;
    58   Int_t iLowSamples  = fRawEvtData->GetNumLoGainSamples() ;
     55  const Int_t nhisamples = fRawEvtData->GetNumHiGainSamples() ;
     56  const Int_t nlosamples = fRawEvtData->GetNumLoGainSamples() ;
    5957
    6058  //  cout << "HighSamples " << iHighSamples ;
     
    6260  while ( fPixelIter->Next() )
    6361    {
    64       for (Int_t i=0 ; i< iHighSamples ; i++ )
     62      for (Int_t i=0 ; i<nhisamples ; i++ )
    6563        {
    66           fHistos->FillAdcHistHigh ( fPixelIter->GetPixelId(),
     64          fHistos->FillAdcHistHi ( fPixelIter->GetPixelId(),
    6765                                     fPixelIter->GetHiGainFadcSamples()[i] );
    6866        }
    6967
    70       for (Int_t i=0 ; i< iLowSamples ; i++ )
     68      for (Int_t i=0 ; i<nlosamples ; i++ )
    7169        {
    72           fHistos->FillAdcHistLow ( fPixelIter->GetPixelId(),
     70          fHistos->FillAdcHistLo ( fPixelIter->GetPixelId(),
    7371                                    fPixelIter->GetLoGainFadcSamples()[i] );
    7472        }
Note: See TracChangeset for help on using the changeset viewer.