Changeset 4386 for trunk


Ignore:
Timestamp:
07/15/04 11:20:42 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msignal
Files:
4 edited

Legend:

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

    r4381 r4386  
    8181// - fNSBFilterLimit to fgNSBFilterLimit
    8282// - fResolution to fgResolution
    83 // - fExtractionType to kAmplitude
     83// - fExtractionType to 0.
    8484//
    8585// Calls:
     
    103103  SetFirst();
    104104  SetLast();
    105 
    106   SetExtractionType();
    107105
    108106  Clear();
     
    138136// - fModified to kFALSE
    139137// - fBlindPixelIdx to 0
     138// - fExtractionType to 0
    140139//
    141140// Calls:
     
    150149{
    151150
    152   fModified = kFALSE;
     151  fModified       = kFALSE;
     152  fExtractionType = 0;
    153153
    154154  fBlindPixelIdx.Set(0);
     
    245245  {
    246246      fModified = kTRUE;
     247      SetExtractionType(kAmplitude);
    247248      SetRange(fFirst,fLast);
    248249      for (Int_t i=0;i<3;i++)
     
    256257      fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(0));
    257258      SetExtractionType(kIntegral);
     259      SetExtractionType(kFilter);
    258260  }
    259261
    260   fBlindPixel->SetUsedFADCSlices(fHiGainFirst, fHiGainLast);
    261  
     262  fBlindPixel->SetExtractionType(fExtractionType);
     263
    262264  for (Int_t i=0;i<fBlindPixelIdx.GetSize();i++)
    263265  {
     
    293295    }
    294296
    295   Int_t lastdesired   = (Int_t)fHiGainLast;
    296   lastavailable = (Int_t)fRunHeader->GetNumSamplesHiGain()-1;
     297  const Int_t lastdesired   = (Int_t)fHiGainLast;
    297298 
    298299  if (lastdesired > lastavailable)
     
    311312                << Form("%s%2i",": Will reduce upper limit by ",diff)
    312313                << endl;
    313           fHiGainLast = (Int_t)fRunHeader->GetNumSamplesLoGain() - 1;
    314           diff        = (Int_t)fRunHeader->GetNumSamplesLoGain() - 1;
     314          diff        = (Int_t)fRunHeader->GetNumSamplesLoGain();
    315315        }
    316316
     317      fHiGainLast = (Int_t)fRunHeader->GetNumSamplesHiGain() - 1;
    317318      fHiLoLast = diff;
    318319    }
     
    334335        << " to (including)  "
    335336        << Form("%s%2i",fHiLoLast ? "Low Gain slice " : " High Gain slice ",
    336                 fHiLoLast ?  (Int_t)fHiLoLast : (Int_t)fHiGainLast )
     337                fHiLoLast ?  (Int_t)fHiLoLast-1 : (Int_t)fHiGainLast )
    337338        << endl;
     339
     340
     341  fBlindPixel->SetUsedFADCSlices(fHiGainFirst, range);
    338342
    339343  return kTRUE;
     
    380384            sat++;
    381385    }
     386
    382387  sum = (Float_t)summ;
    383388}
     
    437442     
    438443      p    = logain + fHiLoFirst;
    439       end  = logain + fHiLoLast + 1;
     444      end  = logain + fHiLoLast;
    440445     
    441446      while (p<end)
     
    700705}
    701706
     707// ------------------------------------------------------------------------------------
     708//
     709// Returns true if the extraction type. Available are: kAmplitude, kIntegral and kFilter
     710// The flags kIntegral and kFilter may be set both.
     711//
     712Bool_t MExtractBlindPixel::IsExtractionType( const ExtractionType_t typ )
     713{
     714 
     715  return TESTBIT( fExtractionType, typ );
     716
     717}
     718
    702719// --------------------------------------------------------------------------
    703720//
    704721// Sets the extraction type. Available are: kAmplitude and kIntegral
    705722//
    706 Bool_t MExtractBlindPixel::IsExtractionType( const ExtractionType_t typ )
    707 {
    708  
    709   return TESTBIT( fExtractionType, typ );
    710 
    711 }
    712 
    713 // --------------------------------------------------------------------------
    714 //
    715 // Sets the extraction type. Available are: kAmplitude and kIntegral
    716 //
    717723void MExtractBlindPixel::SetExtractionType( const ExtractionType_t typ )
    718724{
    719  
    720   fExtractionType = 0;
    721725  SETBIT( fExtractionType, typ );
    722 
    723 }
     726}
  • trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h

    r4385 r4386  
    4646
    4747public:
    48   enum ExtractionType_t { kAmplitude, kIntegral };
     48  enum ExtractionType_t { kAmplitude, kIntegral, kFilter };
    4949
    5050
  • trunk/MagicSoft/Mars/msignal/MExtractedSignalBlindPixel.cc

    r4374 r4386  
    4444using namespace std;
    4545
    46 static const Int_t gkSignalInitializer = 99999;
    47 
     46const Int_t MExtractedSignalBlindPixel::gkSignalInitializer = 99999;
    4847// ------------------------------------------------------------------------
    4948//
     
    5453// - the dimenstion of fNumSaturated to 1
    5554// - the dimenstion of fPed. to 1;     
    56 // - the dimenstion of fPedErr. to 1;)   
     55// - the dimenstion of fPedErr. to 1;
    5756// - the dimenstion of fPedRms. to 1;   
    5857// - the dimenstion of fPedRmsErr. to 1;
     
    131130    }
    132131}
     132
     133// ------------------------------------------------------------------------------------
     134//
     135// Returns true if the extraction type. Available are: kAmplitude, kIntegral and kFilter
     136// The flags kIntegral and kFilter may be set both.
     137//
     138Bool_t MExtractedSignalBlindPixel::IsExtractionType( const MExtractBlindPixel::ExtractionType_t typ )
     139{
     140 
     141  return TESTBIT( fExtractionType, typ );
     142
     143}
  • trunk/MagicSoft/Mars/msignal/MExtractedSignalBlindPixel.h

    r4373 r4386  
    1414#endif
    1515
     16#ifndef MARS_MExtractBlindPixel
     17#include <MExtractBlindPixel.h>
     18#endif
     19
    1620class MExtractedSignalBlindPixel : public MParContainer
    1721{
    1822private:
    1923
    20   static const UInt_t gkNumBlindPixels;  //! Current Number of blind pixels in the camera 
    21  
    22   TArrayI fBlindPixelIdx;                // Array Blind Pixel IDs
    23   TArrayF fExtractedSignal;              // Array Extracted signals per Blind Pixel ID
    24   TArrayI fNumSaturated;                 // Array Number of saturated slices per Blind Pixel ID
    25  
    26   TArrayF fPed;                          // Array Pedestal per Blind Pixel IDs                               
    27   TArrayF fPedErr;                       // Array Pedestal Error per Blind Pixel ID         
    28   TArrayF fPedRms;                       // Array Pedestal RMS per Blind Pixel ID
    29   TArrayF fPedRmsErr;                    // Array Pedestal RMS Error per Blind Pixel ID
     24  static const Int_t gkSignalInitializer; //! Initializer for variables
    3025
    31   Byte_t  fFirst;                        // First FADC extraction slice
    32   Byte_t  fNumFADCSamples;               // Number of summed FADC slices
    33 
     26  TArrayI fBlindPixelIdx;                 // Array Blind Pixel IDs
     27  TArrayF fExtractedSignal;               // Array Extracted signals per Blind Pixel ID
     28  TArrayI fNumSaturated;                  // Array Number of saturated slices per Blind Pixel ID
     29                                         
     30  TArrayF fPed;                           // Array Pedestal per Blind Pixel IDs                               
     31  TArrayF fPedErr;                        // Array Pedestal Error per Blind Pixel ID         
     32  TArrayF fPedRms;                        // Array Pedestal RMS per Blind Pixel ID
     33  TArrayF fPedRmsErr;                     // Array Pedestal RMS Error per Blind Pixel ID
     34                                         
     35  Byte_t  fFirst;                         // First FADC extraction slice
     36  Byte_t  fNumFADCSamples;                // Number of summed FADC slices
     37  Byte_t  fExtractionType;                // What extraction type has been chosen?
    3438 
    3539public:
     
    4751  Byte_t  GetNumFADCSamples  ()                   const { return fNumFADCSamples         ; }
    4852
    49   Float_t GetPed       ( const Int_t i=0 )  const { return fPed.At(i);      }
    50   Float_t GetPedErr    ( const Int_t i=0 )  const { return fPedErr.At(i);    }
    51   Float_t GetPedRms    ( const Int_t i=0 )  const { return fPedRms.At(i);    }
    52   Float_t GetPedRmsErr ( const Int_t i=0 )  const { return fPedRmsErr.At(i); }
     53  Float_t GetPed             ( const Int_t i=0 )  const { return fPed.At(i)              ; }
     54  Float_t GetPedErr          ( const Int_t i=0 )  const { return fPedErr.At(i)           ; }
     55  Float_t GetPedRms          ( const Int_t i=0 )  const { return fPedRms.At(i)           ; }
     56  Float_t GetPedRmsErr       ( const Int_t i=0 )  const { return fPedRmsErr.At(i)        ; }
    5357
    54   Bool_t  IsValid      ( const Int_t i=0 )  const;   
     58  Bool_t  IsExtractionType   ( const MExtractBlindPixel::ExtractionType_t typ );
     59  Bool_t  IsValid            ( const Int_t i=0 )  const;   
    5560
    5661  // Setter
    57   void SetUsedFADCSlices( const Byte_t first, const Byte_t num);
    58   void SetNumFADCSamples( const Byte_t num )    { fNumFADCSamples  = num;     }   
     62  void SetExtractionType( const Byte_t b=0 )            { fExtractionType  = b           ; }
     63  void SetNumFADCSamples( const Byte_t num )            { fNumFADCSamples  = num         ; }   
     64  void SetUsedFADCSlices( const Byte_t first, const Byte_t num );
    5965
    6066  void SetBlindPixelIdx  ( const Int_t i,   const Int_t nr=0)      {
     
    8793    fPedRmsErr.AddAt(f,nr); }
    8894
    89   ClassDef(MExtractedSignalBlindPixel, 2)       // Storage Container for extracted signal of Blind Pixel
     95  ClassDef(MExtractedSignalBlindPixel, 3)       // Storage Container for extracted signal of Blind Pixel
    9096};
    9197
Note: See TracChangeset for help on using the changeset viewer.