Ignore:
Timestamp:
04/30/04 17:11:54 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r3905 r3913  
    3939//
    4040// Different signal extractors can be set with the command SetExtractor()
    41 // Only extractor deriving from MExtractor can be set, default is MExtractSlidingWindow
     41// Only extractors deriving from MExtractor can be set, default is MExtractSlidingWindow
     42//
     43// Different arrival time extractors can be set with the command SetTimeExtractor()
     44// Only extractors deriving from MTimeExtractor can be set, default is MExtractTimeSpline
    4245//
    4346// At the end of the eventloop, plots and results are displayed, depending on
     
    116119#include "MBadPixelsMerge.h"
    117120#include "MBadPixelsCam.h"
     121#include "MTimeExtractor.h"
    118122#include "MExtractor.h"
    119123#include "MExtractPINDiode.h"
    120124#include "MExtractBlindPixel.h"
    121125#include "MExtractSlidingWindow.h"
     126#include "MExtractTimeSpline.h"
    122127#include "MFCosmics.h"
    123128#include "MContinue.h"
     
    139144// Default constructor.
    140145//
    141 // Sets fRuns to 0, fExtractor to NULL, fColor to kNONE, fDisplay to kNormalDisplay,
    142 // fRelTime to kFALSE, fDataCheck to kFALSE
     146// Sets fRuns to 0, fExtractor to NULL, fTimeExtractor to NULL, fColor to kNONE,
     147// fDisplay to kNormalDisplay, fRelTime to kFALSE, fDataCheck to kFALSE
    143148//
    144149MJCalibration::MJCalibration(const char *name, const char *title)
    145     : fRuns(0), fExtractor(NULL), fColor(MCalibrationCam::kNONE), fDisplayType(kNormalDisplay),
    146       fRelTimes(kFALSE), fDataCheck(kFALSE), fArrivalTimeLevel(2)
     150    : fRuns(0), fExtractor(NULL), fTimeExtractor(NULL),
     151      fColor(MCalibrationCam::kNONE), fDisplayType(kNormalDisplay),
     152      fRelTimes(kFALSE), fDataCheck(kFALSE)
    147153{
    148154  fName  = name  ? name  : "MJCalibration";
     
    761767//   5)  MExtractPINDiode
    762768//   6)  MExtractBlindPixel
    763 //   7)  MArrivalTimeCalc, MArrivalTimeCalc2, depending on fArrivalTimeLevel (only if flag fRelTimes is chosen)
     769//   7)  MTimeExtractor (only if flag fRelTimes is chosen)
    764770//   8)  MContinue(MFCosmics)
    765771//   9)  MFillH("MHCalibrationChargePINDiode", "MExtractedSignalPINDiode")
     
    833839  MExtractBlindPixel       blindext;
    834840  MExtractSlidingWindow    extract2;
    835   MArrivalTimeCalc         tmecalc1;
    836   MArrivalTimeCalc2        tmecalc2;
     841  MExtractTimeSpline       timespline;
    837842  MCalibrationChargeCalc   calcalc;
    838843 
     
    879884    {
    880885      plist.AddToList(&fRelTimeCam);
    881       if (fArrivalTimeLevel <= 1)
    882         tlist.AddToList(&tmecalc1);
    883       else if (fArrivalTimeLevel == 2)
    884         tlist.AddToList(&tmecalc2);
     886
     887      if (fTimeExtractor)
     888        tlist.AddToList(fTimeExtractor);
    885889      else
    886890        {
    887           *fLog << err << GetDescriptor()
    888                 << ": No valid Signal ArrivalTime Level has been chosen, have only: " << fArrivalTimeLevel
    889                 << " aborting..." << endl;
    890           return kFALSE;
     891          *fLog << warn << GetDescriptor()
     892                << ": No extractor has been chosen, take default MTimeExtractSpine " << endl;
     893          tlist.AddToList(&timespline);
    891894        }
    892895    }
     
    900903  if (fRelTimes)
    901904    tlist.AddToList(&filltme);
    902  
     905
    903906  // Create and setup the eventloop
    904907  MEvtLoop evtloop(fName);
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.h

    r3875 r3913  
    2222class MPedestalCam;
    2323class MExtractor;
     24class MTimeExtractor;
    2425class MJCalibration : public MParContainer, public MGCamDisplays
    2526{
     
    3031  TString fOutputPath;                                     // Path to the output files
    3132 
    32   MRunIter   *fRuns;                                       // Calibration files
    33   MExtractor *fExtractor;                                  // Signal extractor
     33  MRunIter       *fRuns;                                   // Calibration files
     34  MExtractor     *fExtractor;                              // Signal extractor
     35  MTimeExtractor *fTimeExtractor;                          // Arrival Time extractor
    3436 
    3537  MBadPixelsCam          fBadPixels;                       // Bad Pixels cam, can be set from previous runs
     
    4648  Bool_t fRelTimes;                                        // Flag if relative times have to be calibrated
    4749  Bool_t fDataCheck;                                       // Flag if the data check is run on raw data
    48   UInt_t fArrivalTimeLevel;                                // Level arr. time extractor (e.g. MArrivalTimeCalc2)
    4950 
    5051  void   DisplayResult(MParList &plist);
     
    6970  void SetBadPixels(const MBadPixelsCam &bad)     { bad.Copy(fBadPixels);   }
    7071  void SetExtractor(MExtractor* ext)              { fExtractor = ext; }
     72  void SetTimeExtractor(MTimeExtractor* ext)       { fTimeExtractor = ext; }
    7173  void SetQECam    (const MCalibrationQECam &qe) { qe.Copy(fQECam);        }   
    7274  void SetColor    (const MCalibrationCam::PulserColor_t color) { fColor = color; }
     
    8385  void SetDataCheck         (const Bool_t b=kTRUE) { fDataCheck        = b; SetDataCheckDisplay(); }
    8486
    85   // Extractors
    86   void SetArrivalTimeLevel  (const UInt_t i=1    ) { fArrivalTimeLevel = i; } 
    87  
    8887  Bool_t ReadCalibrationCam();
    8988  Bool_t ProcessFile( MPedestalCam &pedcam );
Note: See TracChangeset for help on using the changeset viewer.