Changeset 6216 for trunk/MagicSoft


Ignore:
Timestamp:
02/02/05 20:00:41 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
2 edited

Legend:

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

    r6211 r6216  
    5151
    5252#include "MPedestalCam.h"
     53#include "MPedPhotCam.h"
    5354#include "MBadPixelsCam.h"
    5455#include "MBadPixelsTreat.h"
     
    212213}
    213214
    214 
    215 const char* MJCalibTest::GetInputFile() const
     215// --------------------------------------------------------------------------
     216//
     217// Retrieve the output file written by WriteResult()
     218//
     219const char* MJCalibTest::GetOutputFile() const
     220{
     221    const TString name(GetOutputFileName());
     222    if (name.IsNull())
     223        return "";
     224
     225    return Form("%s/%s", fPathOut.Data(), name.Data());
     226}
     227
     228
     229const char* MJCalibTest::GetOutputFileName() const
    216230{
    217231
    218232  if (fSequence.IsValid())
    219     return Form("%s/calib%08d.root", (const char*)fPathOut, fSequence.GetSequence());
     233    return Form("calib%08d.root", fSequence.GetSequence());
    220234 
    221235  if (!fRuns)
    222236    return "";
    223237 
    224   return Form("%s/%s-F1.root", (const char*)fPathOut, (const char*)fRuns->GetRunsAsFileName());
    225  
    226 }
    227 
    228 
    229 const char* MJCalibTest::GetOutputFile() const
    230 {
    231 
    232   if (fSequence.IsValid())
    233     return Form("%s/test%08d.root", (const char*)fPathOut, fSequence.GetSequence());
    234  
    235   if (!fRuns)
    236     return "";
    237  
    238   return Form("%s/%s-Test.root", (const char*)fPathOut, (const char*)fRuns->GetRunsAsFileName());
     238  return Form("%s-F1.root", (const char*)fRuns->GetRunsAsFileName());
    239239 
    240240}
     
    243243{
    244244
    245   const TString fname = GetInputFile();
     245  const TString fname = GetOutputFile();
    246246 
    247247  *fLog << inf << "Reading from file: " << fname << endl;
     
    385385
    386386  if (!ReadCalibration(calibcont, badpix, extractor1, extractor2, geom))
    387     return kFALSE;
     387    {
     388      *fLog << err << "Could not read calibration constants " << endl;
     389      return kFALSE;
     390    }
    388391 
    389392  *fLog << all;
     
    574577 
    575578  /*
    576     MHCalibrationTestCam *hcam = (MHCalibrationTestCam*)plist.FindObject("MHCalibrationTestCam");
    577     MHCalibrationPix &pix1 = (*hcam)(100);
    578     pix1.DrawClone("");
    579     gPad->SaveAs("test_test_100.ps");
    580 
    581     MHCalibrationTestTimeCam *hccam = (MHCalibrationTestTimeCam*)plist.FindObject("MHCalibrationTestTimeCam");
    582     MHCalibrationPix &pix11 = (*hccam)(100);
    583     pix11.DrawClone("");
    584     gPad->SaveAs("test_testtime_100.ps");
     579  MHCalibrationTestCam *hcam = (MHCalibrationTestCam*)plist.FindObject("MHCalibrationTestCam");
     580  MHCalibrationPix &pix1 = (*hcam)[47];
     581  pix1.DrawClone("");
     582  gPad->SaveAs("test_test_100.ps");
     583 
     584  MHCalibrationTestTimeCam *hccam = (MHCalibrationTestTimeCam*)plist.FindObject("MHCalibrationTestTimeCam");
     585  MHCalibrationPix &pix11 = (*hccam)[47];
     586  pix11.DrawClone("");
     587  gPad->SaveAs("test_testtime_100.ps");
    585588  */
    586    
    587589
    588590  DisplayResult(plist);
     
    614616    }
    615617
    616     if (fPedPhotCam.Write()<=0)
    617     {
    618         *fLog << err << "Unable to write MPedPhotCam to " << oname << endl;
    619         return kFALSE;
    620     }
    621 
    622618    if (fTestCam.Write()<=0)
    623619    {
  • trunk/MagicSoft/Mars/mjobs/MJCalibTest.h

    r6200 r6216  
    1313#ifndef MARS_MHCalibrationTestTimeCam
    1414#include "MHCalibrationTestTimeCam.h"
    15 #endif
    16 #ifndef MARS_MPedPhotCam
    17 #include "MPedPhotCam.h"
    1815#endif
    1916#ifndef MARS_MBadPixelsCam
     
    4037  MCalibrationTestCam      fTestCam;
    4138  MHCalibrationTestTimeCam fTestTimeCam;
    42   MPedPhotCam              fPedPhotCam;
    4339
    4440  enum  Display_t                                      // Possible Display types
     
    6157                         MExtractor* &ext1, MExtractor* &ext2, TString &geom) const;
    6258
     59  const char* GetOutputFileName() const;
     60
    6361public:
    6462
     
    6664 
    6765  const char* GetOutputFile() const;
    68   const char* GetInputFile() const;
    6966 
    7067  MCalibrationTestCam      &GetTestCam()      { return fTestCam; }
    7168  MHCalibrationTestTimeCam &GetTestTimeCam()  { return fTestTimeCam; } 
    72   MPedPhotCam          &GetPedPhotCam() { return fPedPhotCam; }
    7369  const MBadPixelsCam &GetBadPixels()  const { return fBadPixels; }
    7470 
Note: See TracChangeset for help on using the changeset viewer.