Changeset 5723 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
01/07/05 16:22:52 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5722 r5723  
    2525     - Added #include "TSystem.h", otherwise gSystem is not recognized
    2626       in Mac OSX.
     27
    2728   * manalysis/MMakePadHistograms.cc
    2829     - Changed badcalc.SetNamePedPhotContainer to
    2930       badcalc.SetNamePedPhotCam
     31
     32
    3033
    3134 2005/01/07 Thomas Bretz
     
    5861   * manalysis/Makefile:
    5962     - removed unintantionally introduced wrong include
     63
     64   * msignal/MExtractTimeAndChargeDigitalFilter.cc:
     65     - a small acceleration discussed with Hendrik by replacing a
     66       counter in a loop by pointer arithmetics
    6067
    6168
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc

    r5701 r5723  
    227227  Byte_t maxpos = 0;
    228228  Byte_t max    = 0;
    229   Int_t count   = 0;
    230229
    231230  //
     
    235234  const Float_t ABoffs = ped.GetPedestalABoffset();
    236235
    237   Float_t pedmean[2];
    238   pedmean[0] = pedes + ABoffs;
    239   pedmean[1] = pedes - ABoffs;
     236  const Float_t pedmean[2] = { pedes + ABoffs, pedes - ABoffs };
    240237
    241238  //
    242239  // Check for saturation in all other slices
    243240  //
     241  Int_t ids = fHiGainFirst;
     242  Float_t *sample = fHiGainSignal.GetArray();
    244243  while (p<end)
    245244    {
    246 
    247       const Int_t ids      = fHiGainFirst + count ;
    248       const Float_t signal = (Float_t)*p - pedmean[(ids+abflag) & 0x1];
    249       fHiGainSignal[count] = signal;
    250 
    251       count++;
     245      *sample++ = (Float_t)*p - pedmean[(ids++ + abflag) & 0x1];
    252246
    253247      if (*p > max)
     
    266260      end = logain + fHiLoLast;
    267261
     262      ids = fHiGainFirst;
     263      sample = fHiGainSignal.GetArray();
    268264      while (logain<end)
    269265        {
    270266
    271           const Int_t ids      = fHiGainFirst + range ;
    272           const Float_t signal = (Float_t)*logain - pedmean[(ids+abflag) & 0x1];
    273           fHiGainSignal[range] = signal;
     267          *sample++ = (Float_t)*logain - pedmean[(ids++ + abflag) & 0x1];
    274268          range++;
    275269
     
    402396  Byte_t maxpos = 0;
    403397  Byte_t max    = 0;
    404   Int_t count   = 0;
    405398
    406399  //
     
    410403  const Float_t ABoffs = ped.GetPedestalABoffset();
    411404       
    412   Float_t pedmean[2];
    413   pedmean[0] = pedes + ABoffs;
    414   pedmean[1] = pedes - ABoffs;
     405  const Float_t pedmean[2] = { pedes + ABoffs, pedes - ABoffs };
    415406
    416407  //
    417408  // Check for saturation in all other slices
    418409  //
     410  Float_t *sample = fLoGainSignal.GetArray();
     411  Int_t    ids    = fLoGainFirst;
    419412  while (p<end)
    420413    {
    421 
    422       const Int_t ids      = fLoGainFirst + count ;
    423       const Float_t signal = (Float_t)*p - pedmean[(ids+abflag) & 0x1];
    424       fLoGainSignal[count] = signal;
    425 
    426       count++;
     414      *sample++ = (Float_t)*p - pedmean[(ids++ + abflag) & 0x1];
    427415
    428416      if (*p > max)
Note: See TracChangeset for help on using the changeset viewer.