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/msignal/MExtractTimeAndCharge.cc

    r8661 r8891  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndCharge.cc,v 1.68 2007-08-10 11:21:21 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndCharge.cc,v 1.69 2008-05-15 18:37:27 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    219219Int_t MExtractTimeAndCharge::Process()
    220220{
     221    const Int_t nums = fSignal->GetNumSamples();
     222
    221223    const Int_t numh = fRunHeader->GetNumSamplesHiGain();
    222224    const Int_t numl = fRunHeader->GetNumSamplesLoGain();
    223225
     226    // Some sanity checks to get rid of some weird behaviour of the simulation
     227    if (nums!=numh+numl)
     228    {
     229        *fLog << err << "MExtractTimeAndCharge::Process: ERROR - Number of samples in event ";
     230        *fLog << "(" << nums << ")" << endl << " doesn't match number in run-header ";
     231        *fLog << "(" << numh+numl << ")" << endl;
     232        *fLog << " In case you are processing real data you have just found a bug." << endl;
     233        *fLog << " If you process Monte Carlo data, it means probably that the length" << endl;
     234        *fLog << " of the arrays in MRawEvtData are inconsistent with the run-header." << endl;
     235        return kERROR;
     236    }
     237
     238    // Start extraction
    224239    const UInt_t satlim = fSaturationLimit*fRunHeader->GetScale();
    225240
Note: See TracChangeset for help on using the changeset viewer.