Changeset 3913 for trunk/MagicSoft


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

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3911 r3913  
    4646   * msignal/MExtractPINDiode.[h,cc]
    4747     - now deriving from MExtractor
     48
     49   * msignal/Makefile
     50   * msignal/SignalLinkDef.h
     51   * msignal/MExtractTimeSpline.[h,cc]
     52   * msignal/MExtractTimeHighestIntegral.[h,cc]
     53     - replacements for MArrivalTimeCalc and MArrivalTimeCalc2
     54
     55   * mjobs/MJCalibration.[h,cc]
     56     - Set time extractor by pointer
    4857
    4958
  • trunk/MagicSoft/Mars/macros/calibration.C

    r3906 r3913  
    5555//
    5656/////////////////////////////////////////////////////////////////////////////
    57 //static const TString inpath = "/home/rootdata/Calib/2004_04_16/";
    58 static const TString inpath = "/mnt/Data/rootdata/CrabNebula/2003_12_01/";
    59 static const Int_t pedrun  = 3340;
    60 static const Int_t calrun1 = 3341;
     57static const TString inpath = "/mnt/Data/rootdata/Miscellaneous/2004_03_03/";
     58static const Int_t pedrun  = 20123;
     59static const Int_t calrun1 = 20126;
    6160static const Int_t calrun2 = 0;
    62 /*
    63 static const Int_t pedrun  = 22265;
    64 static const Int_t calrun1 = 22300;
    65 static const Int_t calrun2 = 0;
    66 */
     61
    6762void calibration(const Int_t prun=pedrun, const Int_t crun1=calrun1, const Int_t crun2=calrun2)
    6863{
    6964
    7065  MExtractFixedWindowPeakSearch extractor;
    71   extractor.SetRange(0,6,0,6);
     66  //  extractor.SetRange(0,14,0,14);
    7267
    73   /*
    74   MExtractTimeSpline timeext;
    75   timeext.SetRange(0,14,6,14);
    76   */
     68  // MExtractSlidingWindow  extractor;   
     69  // MExtractFixedWindow    extractor;   
     70
     71  MExtractTimeHighestIntegral timeext;
     72
     73  // MExtractTimeSpline timeext;
     74  // timeext.SetRange(0,14,6,14);
    7775
    7876  MRunIter pruns;
     
    137135  calloop.SetRelTimeCalibration();
    138136  calloop.SetExtractor(&extractor);
    139   //  calloop.SetArrivalTimeLevel(1);
    140   //  calloop.SetTimeExtractor(&timeext);
     137  calloop.SetTimeExtractor(&timeext);
    141138  calloop.SetInput(&cruns);
    142139  calloop.SetDisplay(display);
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimeCam.cc

    r3904 r3913  
    159159{
    160160
     161 
    161162  fCam = (MCalibrationCam*)pList->FindObject("MCalibrationRelTimeCam");
    162163  if (!fCam)
     
    172173    }
    173174 
     175
    174176  MArrivalTimeCam *signal = (MArrivalTimeCam*)pList->FindObject("MArrivalTimeCam");
    175177  if (!signal)
     
    193195      }
    194196  }
    195  
    196197 
    197198  if (fLoGainArray->GetEntries()==0)
  • 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 );
  • trunk/MagicSoft/Mars/msignal/Makefile

    r3899 r3913  
    5050           MTimeExtractor.cc \
    5151           MExtractTimeSpline.cc \
     52           MExtractTimeHighestIntegral.cc \
    5253           MArrivalTime.cc \
    5354           MArrivalTimeCalc.cc \
  • trunk/MagicSoft/Mars/msignal/SignalLinkDef.h

    r3899 r3913  
    2424#pragma link C++ class MTimeExtractor+;
    2525#pragma link C++ class MExtractTimeSpline+;
     26#pragma link C++ class MExtractTimeHighestIntegral+;
    2627#pragma link C++ class MArrivalTimeCam;
    2728#pragma link C++ class MArrivalTimePix;
Note: See TracChangeset for help on using the changeset viewer.