Changeset 8367 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
03/04/07 15:35:08 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/msignal/MExtractPINDiode.cc

    r8304 r8367  
    7373
    7474#include "MRawEvtData.h"
     75#include "MRawRunHeader.h"
    7576#include "MRawEvtPixelIter.h"
    7677
     
    273274
    274275  MRawEvtPixelIter pixel(fRawEvt);
    275  
     276
    276277  fPINDiode->Clear();
    277278  fSlices->Reset();
    278  
     279
    279280  pixel.Jump(fPINDiodeIdx);
    280  
     281
    281282  Byte_t sat  = 0;
    282283
    283   Int_t higainsamples = pixel.GetNumHiGainSamples();
    284   Int_t logainsamples = pixel.GetNumLoGainSamples();
    285  
     284  const Int_t higainsamples = fRunHeader->GetNumSamplesHiGain();
     285  const Int_t logainsamples = fRunHeader->GetNumSamplesLoGain();
     286
    286287  const Bool_t higainabflag = pixel.HasABFlag();
    287288  Byte_t *ptr = pixel.GetHiGainSamples()+fHiGainFirst;
    288289  Byte_t *end = ptr+higainsamples;
    289  
     290
    290291  Int_t cnt=0;
    291292
    292293  Float_t max = 0.;
    293294  Int_t maxpos = 0;
    294  
     295
    295296  while (ptr<end)
    296297    {
    297      
     298
    298299      if (*ptr >= fSaturationLimit)
    299300        {
     
    317318  cnt = 0;
    318319 
    319   if (pixel.HasLoGain() && !sat)
     320  if (logainsamples>0 && !sat)
    320321    {
    321322     
     
    323324      end = ptr+logainsamples;
    324325     
    325       const Bool_t logainabflag = (higainabflag + pixel.GetNumHiGainSamples()) & 0x1;
     326      const Bool_t logainabflag = (higainabflag + higainsamples) & 0x1;
    326327     
    327328      while (ptr<end)
Note: See TracChangeset for help on using the changeset viewer.