Ignore:
Timestamp:
05/15/08 19:37:27 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r8888 r8891  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1.10 2008-05-14 11:03:24 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1.11 2008-05-15 18:37:26 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    158158Int_t MPedestalSubtract::Process()
    159159{
     160    // Please note:
     161    //   - for data with only hi-gain samples numl is 0
     162    //   - for data with hi- and lo-gain samples
     163    //     numl is 0 if read from a raw-data file or a new MC root-file(?)
     164    //     numl is not 0 if read from an old MC root-file
     165
    160166    // Total number of samples
    161167    const Int_t numh = fRawEvt->GetNumHiGainSamples();
     
    167173
    168174    // Check for consistency (our simulation can do weird things!)
    169     if (numh!=fRunHeader->GetNumSamplesHiGain())
    170     {
    171         *fLog << warn << "WARNING - Number of hi-gain samples (" << numh << ") ";
    172         *fLog << " doesn't match run-header (" << fRunHeader->GetNumSamplesHiGain() << ")." << endl;
    173     }
    174     if (numl!=fRunHeader->GetNumSamplesLoGain())
    175     {
    176         *fLog << warn << "WARNING - Number of lo-gain samples (" << numl << ") ";
    177         *fLog << " doesn't match run-header (" << fRunHeader->GetNumSamplesLoGain() << ")." << endl;
     175    if (numh+numl!=fRunHeader->GetNumSamplesHiGain()+fRunHeader->GetNumSamplesLoGain())
     176    {
     177        *fLog << err << "MPedestalSubtract::Process: ERROR - Number of samples in event ";
     178        *fLog << "(hi+lo=" << numh+numl << ")" << endl << " doesn't match number in run-header ";
     179        *fLog << "(" << fRunHeader->GetNumSamplesHiGain()+fRunHeader->GetNumSamplesLoGain() << ")" << endl;
     180        *fLog << " In case you are processing real data you have just found a bug." << endl;
     181        *fLog << " If you process Monte Carlo data, it means probably that the length" << endl;
     182        *fLog << " of the arrays in MRawEvtData are inconsistent with the run-header." << endl;
     183        return kERROR;
    178184    }
    179185
Note: See TracChangeset for help on using the changeset viewer.