Changeset 6752


Ignore:
Timestamp:
03/04/05 16:59:58 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/callisto.cc

    r6731 r6752  
    508508        job2.SetDataType(kDataType);
    509509        job2.SetPulsePosCheck();
    510         // job1.SetPathOut(kOutpathC); // not yet needed
    511         // job1.SetPathIn(kInpathC);   // not yet needed
     510        job2.SetPathOut(kOutpathY); // for updating the extractor
    512511
    513512        job2.SetUseData();
  • trunk/MagicSoft/Mars/callisto.rc

    r6732 r6752  
    298298MJPedestalY3.MaxEvents: 500
    299299
     300# -------------------------------------------------------------------------
     301# Use Pulse Position check to define the extraction ranges for the data?
     302# -------------------------------------------------------------------------
     303#MJPedestalY2.PulsePosCheck: yes
     304#MJCalibrateSignal.ModifiedExtractWin: yes
     305# -------------------------------------------------------------------------
     306# Define the Pulse Position check parameters:
     307# -------------------------------------------------------------------------
     308#MJPedestalY2.MHCalibrationPulseTimeCam.SaturationLimit:  255
     309#MJPedestalY2.MHCalibrationPulseTimeCam.LowerSignalLimit: 100
     310#MJPedestalY2.MHCalibrationPulseTimeCam.NumPixelsRequired: 2
     311
    300312#MJPedestalY.ExtractPedestal: MPedCalcFromLoGain
    301313#MJPedestalY.ExtractPedestal.PedestalUpdate:   no
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r6731 r6752  
    122122// - fIsRelTimesUpdate to kFALSE
    123123// - fIsHiLoCalibration to kFALSE
     124// - fIsModifiedExtractWin to kTRUE
    124125// - fPulsePosCheck to kTRUE
    125126//
    126127MJCalibrateSignal::MJCalibrateSignal(const char *name, const char *title)
    127     : fIsInterlaced(kTRUE), fIsRelTimesUpdate(kFALSE), fIsHiLoCalibration(kFALSE)
     128    : fIsInterlaced(kTRUE), fIsRelTimesUpdate(kFALSE),
     129      fIsHiLoCalibration(kFALSE), fIsModifiedExtractWin(kTRUE)
    128130{
    129131    fName  = name  ? name  : "MJCalibrateSignal";
     
    207209    cont.Add(&cam);
    208210    return ReadContainer(cont);
     211}
     212
     213Bool_t MJCalibrateSignal::ReadExtractorCosmics(MExtractor* &ext1) const
     214{
     215
     216  const TString fname = Form("pedy%08d.root",fSequence.GetSequence());
     217
     218  *fLog << inf << "Reading from file: " << fname << endl;
     219
     220  TFile file(fname, "READ");
     221  if (!file.IsOpen())
     222    {
     223      *fLog << warn << "Could not find or open file " << fname << endl;
     224      return kFALSE;
     225    }
     226
     227  TObject *o = file.Get("ExtractSignal");
     228  if (o && !o->InheritsFrom(MExtractor::Class()))
     229    {
     230      *fLog << err << dbginf << "ERROR - ExtractSignal read from " << fname << " doesn't inherit from MExtractor!" << endl;
     231      return kFALSE;
     232    }
     233  if (o)
     234    {
     235      delete ext1;
     236      ext1 = (MExtractor*)o->Clone();
     237    }
     238  else
     239    *fLog << warn << "No signal extractor found in " << fname << endl;
     240
     241  file.Close();
     242  return kTRUE;
    209243}
    210244
     
    222256    SetRelTimesUpdate(GetEnv("RelTimesUpdate", fIsRelTimesUpdate));
    223257    SetHiLoCalibration(GetEnv("HiLoCalibration", fIsHiLoCalibration));
     258    SetModifiedExtractWin(GetEnv("ModifiedExtractWin", fIsModifiedExtractWin));
    224259
    225260    return MJCalib::CheckEnvLocal();
     
    339374        *fLog << endl;
    340375        extractor3 = (MExtractor*)extractor1->Clone();
     376       
    341377    }
    342378    else
     
    356392    else
    357393        *fLog << inf << "No Camera geometry found using default <MGeomCamMagic>" << endl;
     394
     395    if (fIsModifiedExtractWin)
     396      if (!ReadExtractorCosmics(extractor1))
     397        *fLog << warn << "No extraction window update for signal extractor found" << endl;
    358398
    359399    // This is necessary for the case in which it is not in the files
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h

    r6699 r6752  
    2626    Bool_t fIsRelTimesUpdate;           // Choose to update relative times from interlaced
    2727    Bool_t fIsHiLoCalibration;          // Choose to calibrate the high-gain vs. low-gains
     28    Bool_t fIsModifiedExtractWin;       // Choose to use the modified extraction window from pulse position
    2829   
    2930    Bool_t CheckEnvLocal();
     
    3435    Bool_t ReadCalibration(TObjArray &o, MBadPixelsCam &bpix,
    3536                           MExtractor* &ext1, MExtractor* &ext2, TString &geom) const;
     37    Bool_t ReadExtractorCosmics(MExtractor* &ext1) const;
    3638
    3739    const char*  GetInputFileName() const;
     
    4749    void SetRelTimesUpdate ( const Bool_t b=kTRUE )  { fIsRelTimesUpdate  = b; }
    4850    void SetHiLoCalibration( const Bool_t b=kTRUE )  { fIsHiLoCalibration = b; }
     51    void SetModifiedExtractWin( const Bool_t b=kTRUE )  { fIsModifiedExtractWin = b; }
    4952
    5053    //    void SetInputCal    ( MRunIter *iter       )  { fCruns = iter; }
Note: See TracChangeset for help on using the changeset viewer.