Changeset 4131


Ignore:
Timestamp:
05/22/04 18:49:31 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4130 r4131  
    5454     - replaced the relative limit for acceptance of the time resolution
    5555       by an absolute limit
    56 
    57    * mcalib/MCalibrationChargeCalc.cc
     56     - set up output statistics logging (data written into DB)
     57
     58   * mcalib/MCalibrationChargeCalc.[h,cc]
    5859     - moved limit for acceptance of number of phe;s from 5 to 8
     60     - set up output statistics logging (data written into DB)
     61
     62   * mjobs/MJCalibration.cc
     63     - set up output statistics logging (data written into DB)
    5964
    6065
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r4130 r4131  
    251251// - fPheErrLimit       to fgPheErrLimit 
    252252// - fPulserColor       to MCalibrationCam::kCT1
     253// - fOutputPath        to "."
     254// - fOutputFile        to "ChargeCalibStat.txt"
    253255//
    254256// Calls:
     
    276278  SetPheErrLimit();
    277279  SetPulserColor(MCalibrationCam::kNONE);
     280  SetOutputPath();
     281  SetOutputFile();
    278282
    279283  Clear();
     
    650654  FinalizePINDiodeQECam();
    651655
     656  //
     657  // Re-direct the output to an ascii-file from now on:
     658  //
     659  MLog asciilog;
     660  asciilog.SetOutputFile(GetOutputFile(),kTRUE);
     661  SetLogStream(&asciilog);
    652662  //
    653663  // Finalize calibration statistics
     
    694704                    "Pixels with unsuccesful Gauss fit to the Lo Gain: ");
    695705
     706  SetLogStream(&gLog);
     707
    696708  return kTRUE;
    697709}
     
    15401552}
    15411553
     1554// --------------------------------------------------------------------------
     1555//
     1556// Get the output file
     1557//
     1558TString MCalibrationChargeCalc::GetOutputFile()
     1559{
     1560  return Form("%s/%s", (const char*)fOutputPath, (const char*)fOutputFile);
     1561}
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h

    r4130 r4131  
    6767
    6868  TString fOutputPath;                         // Path to the output file
     69  TString fOutputFile;                         // Name of the output file 
    6970 
    7071  // Pointers
     
    8283
    8384  // functions
     85  TString GetOutputFile();
    8486  void   FinalizePedestals      ( const MPedestalPix &ped, MCalibrationChargePix &cal, const Int_t aidx );
    8587  Bool_t FinalizeCharges        ( MCalibrationChargePix &cal, MBadPixelsPix &bad      );
     
    113115  void SetLambdaCheckLimit  ( const Float_t f=fgLambdaCheckLimit       ) { fLambdaCheckLimit  = f;   }
    114116  void SetOutputPath        ( const char   *path="."                   );
     117  void SetOutputFile        ( const char   *file="ChargeCalibStat.txt" ) { fOutputFile        = file; }
    115118  void SetPheErrLimit       ( const Float_t f=fgPheErrLimit            ) { fPheErrLimit       = f;   } 
    116119  void SetPulserColor       ( const MCalibrationCam::PulserColor_t col ) { fPulserColor       = col; }
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.cc

    r4130 r4131  
    8181// Initializes:
    8282// - fRelTimeResolutionLimit to fgRelTimeResolutionimit
     83// - fOutputPath        to "."
     84// - fOutputFile        to "TimeCalibStat.txt"
    8385//
    8486// Calls:
     
    9395 
    9496  SetRelTimeResolutionLimit();
     97  SetOutputPath();
     98  SetOutputFile();
    9599 
    96100  Clear();
     
    226230  FinalizeBadPixels();
    227231
     232  //
     233  // Re-direct the output to an ascii-file from now on:
     234  //
     235  MLog asciilog;
     236  asciilog.SetOutputFile(GetOutputFile(),kTRUE);
     237  SetLogStream(&asciilog);
    228238  //
    229239  // Finalize calibration statistics
     
    243253  PrintUncalibrated(MBadPixelsPix::kRelTimeNotFitted,     
    244254                    "Pixels with unsuccesful Gauss fit to the times:   ");
     255
     256  SetLogStream(&gLog);
     257
    245258  return kTRUE;
    246259}
     
    348361      upplim  [aidx]  = areasum [aidx] + fRelTimeResolutionLimit;
    349362     
    350       *fLog << endl;
    351       *fLog << inf << GetDescriptor() << ": Limits for acceptance of time resolution: ["
    352             << Form("%4.2f%s%4.2f",lowlim[aidx],",",upplim[aidx]) << "] in area index " << aidx;
    353363    }
    354364  *fLog << endl; 
     
    495505}
    496506
     507// --------------------------------------------------------------------------
     508//
     509// Set the path for output file
     510//
     511void MCalibrationRelTimeCalc::SetOutputPath(const char *path)
     512{
     513  fOutputPath = path;
     514  if (fOutputPath.EndsWith("/"))
     515    fOutputPath = fOutputPath(0, fOutputPath.Length()-1);
     516}
     517
     518// --------------------------------------------------------------------------
     519//
     520// Get the output file
     521//
     522TString MCalibrationRelTimeCalc::GetOutputFile()
     523{
     524  return Form("%s/%s", (const char*)fOutputPath, (const char*)fOutputFile);
     525}
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.h

    r4130 r4131  
    3838  Byte_t  fFlags;                               // Bit-field for the flags
    3939 
     40  TString fOutputPath;                          // Path to the output file
     41  TString fOutputFile;                          // Name of the output file 
     42 
    4043  // Pointers
    4144  MBadPixelsCam              *fBadPixels;      //  Bad Pixels
     
    4750
    4851  // functions
     52  TString GetOutputFile();
    4953  void   FinalizeAverageResolution();
    5054  void   FinalizeRelTimes     ();
     
    6569  void Clear(const Option_t *o="");
    6670 
     71  void SetOutputPath        ( const char   *path="."                   );
     72  void SetOutputFile        ( const char   *file="TimeCalibStat.txt"   ) { fOutputFile        = file; }
    6773  void SetRelTimeResolutionLimit ( const Float_t f=fgRelTimeResolutionLimit    ) { fRelTimeResolutionLimit = f;   }
    6874
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r4109 r4131  
    801801TString MJCalibration::GetOutputFile() const
    802802{
     803
    803804    if (!fRuns)
    804805        return "";
     
    918919  MExtractTimeSpline       timespline;
    919920  MCalibrationChargeCalc   calcalc;
     921  calcalc.SetOutputPath(fOutputPath);
     922  calcalc.SetOutputFile(Form("%s-ChargeCalibStat.txt",fRuns->GetRunsAsFileName().Data()));
     923
    920924  MCalibrationRelTimeCalc  timecalc;
     925  timecalc.SetOutputPath(fOutputPath);
     926  timecalc.SetOutputFile(Form("%s-TimeCalibStat.txt",fRuns->GetRunsAsFileName().Data()));
    921927 
    922928  //
Note: See TracChangeset for help on using the changeset viewer.