Changeset 4742 for trunk/MagicSoft


Ignore:
Timestamp:
08/26/04 14:25:10 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4741 r4742  
    2828                         and SetSourcePosition
    2929
     30
     31 2004/08/26: Markus Gaug
     32
     33   * mjobs/MJExtractCalibTest.[h,cc]
     34     - derived from MJob
     35     - removed obsolete code (which has been moved to MJob)
     36
     37   * macros/calibration.C
     38     - adapt code to changes done in MJob
     39     
    3040
    3141 2004/08/26: Thomas Bretz
  • trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.cc

    r4658 r4742  
    7171#include "MContinue.h"
    7272#include "MFillH.h"
    73 #include "MCalibrate.h"
     73#include "MCalibrateData.h"
    7474#include "MCalibrateRelTimes.h"
    7575#include "MPedPhotCalc.h"
     
    233233
    234234
    235 void MJExtractCalibTest::SetOutputPath(const char *path)
    236 {
    237   fOutputPath = path;
    238   if (fOutputPath.EndsWith("/"))
    239     fOutputPath = fOutputPath(0, fOutputPath.Length()-1);
    240 }
    241 
    242235const char* MJExtractCalibTest::GetOutputFile() const
    243236{
     237
     238  if (fSequence.IsValid())
     239    return Form("%s/test%06d.root", (const char*)fPathOut, fSequence.GetSequence());
     240 
    244241  if (!fRuns)
    245242    return "";
    246243 
    247   return Form("%s/%s-Test.root", (const char*)fOutputPath, (const char*)fRuns->GetRunsAsFileName());
     244  return Form("%s/%s-Test.root", (const char*)fPathOut, (const char*)fRuns->GetRunsAsFileName());
     245 
    248246}
    249247
     
    302300  MGeomApply            apply; // Only necessary to craete geometry
    303301  MExtractSlidingWindow extract2;
    304   MCalibrate            photcalc;
    305   photcalc.SetCalibrationMode(MCalibrate::kFfactor);
     302  MCalibrateData        photcalc;
     303  photcalc.SetCalibrationMode(MCalibrateData::kFfactor);
    306304  MPedPhotCalc          pedphotcalc; 
    307305  MBadPixelsTreat       badtreat;
    308306  badtreat.SetUseInterpolation();
    309307  MCalibrationTestCalc  testcalc;
    310   testcalc.SetOutputPath(fOutputPath);
    311   testcalc.SetOutputFile(Form("%s-TestCalibStat.txt",(const char*)fRuns->GetRunsAsFileName()));
    312 
     308
     309  if (!fSequence.IsValid())
     310    {
     311      testcalc.SetOutputPath(fPathOut);
     312      testcalc.SetOutputFile(Form("%s-TestCalibStat.txt",(const char*)fRuns->GetRunsAsFileName()));
     313    }
     314 
    313315  MHCamEvent evt("ExtSignal");
    314316  evt.SetType(0);
     
    515517{
    516518   
    517     if (fOutputPath.IsNull())
     519    if (fPathOut.IsNull())
    518520        return kTRUE;
    519521   
     
    549551{
    550552   
    551     if (fOutputPath.IsNull())
     553    if (fPathOut.IsNull())
    552554        return kTRUE;
    553555   
     
    575577
    576578
     579Bool_t MJExtractCalibTest::CheckEnv()
     580{
     581    if (HasEnv("DataCheckDisplay"))
     582      fDisplayType = GetEnv("DataCheckDisplay", kFALSE) ? kDataCheckDisplay : kNormalDisplay;
     583
     584    SetOverwrite(GetEnv("Overwrite", fOverwrite));
     585
     586    return MJob::CheckEnv();
     587}
  • trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.h

    r4658 r4742  
    22#define MARS_MJExtractCalibTest
    33
     4#ifndef MARS_MJob
     5#include "MJob.h"
     6#endif
    47#ifndef MARS_MCalibrationTestCam
    58#include "MCalibrationTestCam.h"
     
    2326class MExtractor;
    2427class MExtractTime;
    25 class MJExtractCalibTest : public MParContainer
     28class MJExtractCalibTest : public MJob
    2629{
    2730private:
    2831
    29   TString fOutputPath;
    3032  Bool_t  fUseCosmicsFilter;
    3133 
     
    5860  Bool_t ProcessFileT(MPedestalCam &pedcam, MCalibrationRelTimeCam &relcam); 
    5961
     62  Bool_t CheckEnv();
     63 
    6064public:
    6165  MJExtractCalibTest(const char *name=NULL, const char *title=NULL);
    6266 
    6367  void SetInput(MRunIter *iter) { fRuns = iter; }
    64   void SetOutputPath(const char *path=".");
    6568 
    6669  const char* GetOutputFile() const;
Note: See TracChangeset for help on using the changeset viewer.