Ignore:
Timestamp:
05/03/04 18:43:29 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msignal
Files:
12 edited

Legend:

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

    r3924 r3951  
    4646#include <fstream>
    4747
     48#include "MExtractedSignalCam.h"
     49
    4850#include "MLog.h"
    4951#include "MLogManip.h"
     
    141143}
    142144
     145// --------------------------------------------------------------------------
     146//
     147// The ReInit calls:
     148// -  MExtractor::ReInit()
     149// -  fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples,
     150//                                fLoGainFirst, fLoGainLast, fNumLoGainSamples);
     151//
     152Bool_t MExtractFixedWindow::ReInit(MParList *pList)
     153{
     154
     155  MExtractor::ReInit(pList);
     156 
     157  fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples,
     158                              fLoGainFirst, fLoGainLast, fNumLoGainSamples);
     159
     160  return kTRUE;
     161 
     162}
    143163
    144164// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/msignal/MExtractFixedWindow.h

    r3924 r3951  
    2424  void   FindSignalHiGain(Byte_t *ptr, Byte_t *logain, Int_t &sum, Byte_t &sat) const;
    2525  void   FindSignalLoGain(Byte_t *ptr, Int_t &sum, Byte_t &sat) const;
    26 
    2726  void   StreamPrimitive(ofstream &out) const;
    2827 
     28  Bool_t ReInit(MParList *pList);
     29
    2930public:
    3031
  • trunk/MagicSoft/Mars/msignal/MExtractFixedWindowPeakSearch.cc

    r3925 r3951  
    211211}
    212212
     213
     214// --------------------------------------------------------------------------
     215//
     216// The ReInit calls:
     217// -  MExtractor::ReInit()
     218// -  fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples,
     219//                                fLoGainFirst, fLoGainLast, fNumLoGainSamples);
     220//
     221Bool_t MExtractFixedWindowPeakSearch::ReInit(MParList *pList)
     222{
     223
     224  MExtractor::ReInit(pList);
     225 
     226  fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples,
     227                              fLoGainFirst, fLoGainLast, fNumLoGainSamples);
     228
     229  return kTRUE;
     230 
     231}
     232
    213233// --------------------------------------------------------------------------
    214234//
  • trunk/MagicSoft/Mars/msignal/MExtractFixedWindowPeakSearch.h

    r3925 r3951  
    2929  void   FindPeak(Byte_t *ptr, Byte_t window, Byte_t &startslice, Int_t &signal, Int_t &sat) const;
    3030
     31  Bool_t  ReInit(MParList *pList);
    3132  Int_t  Process();
    3233 
  • trunk/MagicSoft/Mars/msignal/MExtractPINDiode.cc

    r3925 r3951  
    161161    return kFALSE;
    162162
    163   fPINDiode->SetUsedFADCSlices(fHiGainFirst, fLoGainLast);
    164 
    165163  const MPedestalPix &ped   = (*fPedestals)[fPINDiodeIdx];
    166164
     
    180178}
    181179
     180// --------------------------------------------------------------------------
     181//
     182// The ReInit calls:
     183// -  MExtractor::ReInit()
     184// -  fPINDiode->SetUsedFADCSlices(fHiGainFirst, fLoGainLast);
     185//
     186Bool_t MExtractPINDiode::ReInit(MParList *pList)
     187{
     188
     189  MExtractor::ReInit(pList);
     190 
     191  fPINDiode->SetUsedFADCSlices(fHiGainFirst, fLoGainLast);
     192 
     193  return kTRUE;
     194 
     195}
     196
     197
     198
    182199void MExtractPINDiode::FindSignalandVarianceHiGain(Byte_t *ptr, Int_t &sum, Int_t &sum2, Byte_t &sat) const
    183200{
  • trunk/MagicSoft/Mars/msignal/MExtractPINDiode.h

    r3911 r3951  
    3838
    3939  Int_t  PreProcess(MParList *pList);
     40  Bool_t ReInit(MParList *pList); 
    4041  Int_t  Process();
    4142  void   StreamPrimitive(ofstream &out) const;
  • trunk/MagicSoft/Mars/msignal/MExtractSlidingWindow.cc

    r3925 r3951  
    5858#include "MLogManip.h"
    5959
     60#include "MExtractedSignalCam.h"
    6061
    6162ClassImp(MExtractSlidingWindow);
     
    109110
    110111  SetWindowSize(fWindowSizeHiGain,fWindowSizeLoGain);
     112 
     113}
     114
     115
     116// --------------------------------------------------------------------------
     117//
     118// The ReInit calls:
     119// -  MExtractor::ReInit()
     120// -  fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples,
     121//                                fLoGainFirst, fLoGainLast, fNumLoGainSamples);
     122//
     123Bool_t MExtractSlidingWindow::ReInit(MParList *pList)
     124{
     125
     126  MExtractor::ReInit(pList);
     127 
     128  fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples,
     129                              fLoGainFirst, fLoGainLast, fNumLoGainSamples);
     130
     131  return kTRUE;
    111132 
    112133}
  • trunk/MagicSoft/Mars/msignal/MExtractSlidingWindow.h

    r3924 r3951  
    2323  void   FindSignalLoGain(Byte_t *ptr, Int_t &max, Byte_t &sat) const; 
    2424
     25  Bool_t  ReInit(MParList *pList);
    2526 
    2627public:
  • trunk/MagicSoft/Mars/msignal/MExtractTime.cc

    r3948 r3951  
    140140// --------------------------------------------------------------------------
    141141//
    142 // The ReInit searches for:
    143 // -  MRawRunHeader::GetNumSamplesHiGain()
    144 // -  MRawRunHeader::GetNumSamplesLoGain()
    145 //
    146 // In case that the variable fLoGainLast is smaller than
    147 // the even part of the number of samples obtained from the run header, a
    148 // warning is given an the range is set back accordingly. A call to: 
    149 // - SetRange(fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast-diff)
    150 // is performed in that case. The variable diff means here the difference
    151 // between the requested range (fLoGainLast) and the available one. Note that
    152 // the functions SetRange() are mostly overloaded and perform more checks,
    153 // modifying the ranges again, if necessary.
    154 //
    155 // In case that the variable fHiGainLast is smaller than the available range
    156 // obtained from the run header, a warning is given that a part of the low-gain
    157 // samples are used for the extraction of the high-gain signal.
     142// The ReInit calls:
     143// -  MExtractor::ReInit()
    158144//
    159145// Call:
    160146// - MArrivalTimeCam::SetUsedFADCSlices(fHiGainFirst, fHiGainLast, fNumHiGainSamples,
    161 //                                          fLoGainFirst, fLoGainLast, fNumLoGainSamples);
     147//                                      fLoGainFirst, fLoGainLast, fNumLoGainSamples);
    162148//
    163149Bool_t MExtractTime::ReInit(MParList *pList)
    164150{
    165151 
    166   Int_t lastdesired   = (Int_t)(fLoGainLast);
    167   Int_t lastavailable = (Int_t)fRunHeader->GetNumSamplesLoGain()-1;
    168  
    169   if (lastdesired > lastavailable)
    170     {
    171       const Int_t diff = lastdesired - lastavailable;
    172       *fLog << endl;
    173       *fLog << warn << GetDescriptor()
    174             << Form("%s%2i%s%2i%s%2i%s",": Selected Lo Gain FADC Window [",
    175                     (int)fLoGainFirst,",",lastdesired,
    176                     "] ranges out of the available limits: [0,",lastavailable,"].") << endl;
    177       *fLog << GetDescriptor() << ": Will reduce the upper edge to " << (int)(fLoGainLast - diff) << endl;
    178       SetRange(fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast-diff);
    179     }
    180 
    181   lastdesired   = (Int_t)fHiGainLast;
    182   lastavailable = (Int_t)fRunHeader->GetNumSamplesHiGain()-1;
    183  
    184   if (lastdesired > lastavailable)
    185     {
    186       const Int_t diff = lastdesired - lastavailable;
    187       *fLog << endl;
    188       *fLog << warn << GetDescriptor()
    189             << Form("%s%2i%s%2i%s%2i%s",": Selected Hi Gain FADC Window [",
    190                     (int)fHiGainFirst,",",lastdesired,
    191                     "] ranges out of the available limits: [0,",lastavailable,"].") << endl;
    192       *fLog << warn << GetDescriptor()
    193             << Form("%s%2i%s",": Will use ",diff," samples from the Low-Gain for the High-Gain extraction")
    194             << endl;
    195       fHiGainLast -= diff;
    196       fHiLoLast    = diff;
    197     }
    198 
     152  MExtractor::ReInit(pList);
    199153
    200154  fArrTime->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fLoGainFirst, fLoGainLast);
  • trunk/MagicSoft/Mars/msignal/MExtractor.cc

    r3924 r3951  
    101101 
    102102  fHiGainFirst = hifirst;
     103  fHiGainLast  = hilast;
     104
    103105  fLoGainFirst = lofirst;
    104  
    105   fHiGainLast  = hilast;
    106106  fLoGainLast  = lolast;
    107107
     
    212212    }
    213213
    214 
    215   fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples,
    216                               fLoGainFirst, fLoGainLast, fNumLoGainSamples);
    217 
    218214  return kTRUE;
    219215}
  • trunk/MagicSoft/Mars/msignal/Makefile

    r3943 r3951  
    3030SRCFILES = MExtractedSignalCam.cc \
    3131           MExtractedSignalPix.cc \
     32           MExtractedSignalPINDiode.cc \
     33           MExtractedSignalBlindPixel.cc \
    3234           MExtractor.cc \
    3335           MExtractFixedWindow.cc \
     
    3840           MExtractSignal3.cc \
    3941           MExtractPINDiode.cc \
    40            MExtractedSignalPINDiode.cc \
    4142           MExtractBlindPixel.cc \
    42            MExtractedSignalBlindPixel.cc \
    4343           MExtractTime.cc \
    4444           MExtractTimeSpline.cc \
  • trunk/MagicSoft/Mars/msignal/SignalLinkDef.h

    r3943 r3951  
    77#pragma link C++ class MExtractedSignalCam+;
    88#pragma link C++ class MExtractedSignalPix+;
     9#pragma link C++ class MExtractedSignalPINDiode++;
     10#pragma link C++ class MExtractedSignalBlindPixel++;
     11
    912#pragma link C++ class MExtractSignal+;
    1013#pragma link C++ class MExtractSignal2+;
     
    1518#pragma link C++ class MExtractSlidingWindow+;
    1619#pragma link C++ class MExtractFixedWindowPeakSearch+;
    17    
    18 
    1920#pragma link C++ class MExtractPINDiode++;
    20 #pragma link C++ class MExtractedSignalPINDiode++;
    2121#pragma link C++ class MExtractBlindPixel++;
    22 #pragma link C++ class MExtractedSignalBlindPixel++;
    2322
    2423#pragma link C++ class MExtractTime+;
Note: See TracChangeset for help on using the changeset viewer.