Changeset 4870


Ignore:
Timestamp:
09/06/04 11:15:43 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4862 r4870  
    2020                                                 -*-*- END OF LINE -*-*-
    2121
     22 2004/09/06: Thomas Bretz
     23
     24   * mjobs/MJCalibrateSignal.[h,cc]:
     25     - read camera geometry from calib-file
     26
     27   * mjobs/MJCalibration.[h,cc]:
     28     - write camera geometry to calib-file
     29
     30   * macros/sql/filldotraw.C, macros/sql/fillcalib.C:
     31     - added
     32
     33   * macros/sql/filldot*.C
     34     - fixed some comments
     35
     36
     37
    2238 2004/09/05: Markus Gaug
    2339
    2440   * mcalib/MCalibColorSet.[h,cc]
    2541     - finished setting of the asumed pulse pattern
     42
    2643
    2744
     
    5976     - new class derived from MCalibrationQECam which intialized the
    6077       cornings for the Magic camera
     78
    6179
    6280
  • trunk/MagicSoft/Mars/macros/sql/filldotraw.C

    r4869 r4870  
    4646//
    4747// Remark: Running it from the commandline looks like this:
    48 //   root -q -l -b filldotrbk.C+\(\"path\"\,kFALSE\) 2>&1 | tee filldotrbk.log
     48//   root -q -l -b filldotraw.C+\(\"filename\"\,kFALSE\) 2>&1 | tee filldotraw.log
    4949//
    5050// Make sure, that database and password are corretly set in the macro.
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r4828 r4870  
    5050#include "MStatusDisplay.h"
    5151
     52#include "MGeomCam.h"
    5253#include "MHCamEvent.h"
    5354#include "MPedestalCam.h"
     
    115116                                          MCalibrationCam &qecam,
    116117                                          MCalibrationCam &tmcam,
    117                                           MBadPixelsCam &badpix, MTask* &ext1, MTask* &ext2) const
     118                                          MBadPixelsCam &badpix, MTask* &ext1, MTask* &ext2, TString &geom) const
    118119{
    119120    const TString fname = Form("%s/calib%06d.root", fPathIn.Data(), fSequence.GetSequence());
     
    148149
    149150    TObject *o = file.Get("ExtractSignal");
    150 //    if (!o)
    151 //    {
    152 //        *fLog << err << dbginf << "ERROR - Unable to read ExtractSignal from file " << fname << endl;
    153 //        return kFALSE;
    154 //    }
    155151    if (o && !o->InheritsFrom(MExtractor::Class()))
    156152    {
     
    161157
    162158    o = file.Get("ExtractTime");
    163 //    if (!o)
    164 //    {
    165 //        *fLog << err << dbginf << "ERROR - Unable to read ExtractTime from file " << fname << endl;
    166 //        return kFALSE;
    167 //    }
    168159    if (o && !o->InheritsFrom(MExtractor::Class()))
    169160    {
     
    172163    }
    173164    ext2 = o ? (MTask*)o->Clone() : NULL;
    174 
    175165    if (!ext1 && !ext2)
    176166    {
     
    178168        return kFALSE;
    179169    }
     170
     171    o = file.Get("MGeomCam");
     172    if (o && !o->InheritsFrom(MGeomCam::Class()))
     173    {
     174        *fLog << err << dbginf << "ERROR - MGeomCam read from " << fname << " doesn't inherit from MGeomCam!" << endl;
     175        return kFALSE;
     176    }
     177    geom = o ? o->ClassName() : "";
    180178
    181179    return kTRUE;
     
    227225    MTask *extractor1=0;
    228226    MTask *extractor2=0;
    229 
    230     if (!ReadCalibration(calcam, qecam, tmcam, badpix, extractor1, extractor2))
     227    TString geom;
     228
     229    if (!ReadCalibration(calcam, qecam, tmcam, badpix, extractor1, extractor2, geom))
    231230        return kFALSE;
    232231
     
    249248    else
    250249        *fLog << inf << "No Time Extractor: ExtractTime in file." << endl;
     250
     251    if (!geom.IsNull())
     252        *fLog << inf << "Camera geometry found in file: " << geom.ClassName() << endl;
     253    else
     254        *fLog << inf << "No Camera geometry found using default <MGeomCamMagic>" << endl;
    251255
    252256    // This is necessary for the case in which it is not in the files
     
    278282    //read.AddFiles(fnamein);
    279283
    280     MGeomApply             apply; // Only necessary to craete geometry
     284    MGeomApply             apply; // Only necessary to create geometry
     285    if (!geom.IsNull())
     286        apply.SetGeometry(geom);
    281287    MBadPixelsMerge        merge(&badpix);
    282288    MPedCalcFromLoGain     pedlo;
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h

    r4729 r4870  
    1010class MTask;
    1111class MParList;
     12class MGeomCam;
    1213class MSequence;
    1314class MPedestalCam;
     
    2425    Bool_t ReadCalibration(MCalibrationCam &calcam,
    2526                           MCalibrationCam &qecam, MCalibrationCam &tmcam,
    26                            MBadPixelsCam &badpix, MTask* &ext1, MTask* &ext2) const;
     27                           MBadPixelsCam &badpix, MTask* &ext1, MTask* &ext2,
     28                           TString &geom) const;
    2729
    2830public:
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r4855 r4870  
    191191    : fRuns(0), fExtractor(NULL), fTimeExtractor(NULL),
    192192      fColor(MCalibrationCam::kNONE), fDisplayType(kNormalDisplay),
    193       fRelTimes(kFALSE), fDataCheck(kFALSE), fDebug(kFALSE)
     193      fRelTimes(kFALSE), fDataCheck(kFALSE), fDebug(kFALSE), fGeometry("MGeomCamMagic")
    194194{
    195195    fName  = name  ? name  : "MJCalibration";
     
    13371337//   MJCalibration.UseBlindPixel: yes,no
    13381338//   MJCalibration.UsePINDiode: yes,no
     1339//   MJCalibration.Geometry: MGeomCamMagic, MGeomCamECO1000
    13391340//
    13401341// For more details see the class description and the corresponding Getters
     
    13601361    SetUseBlindPixel(GetEnv("UseBlindPixel", IsUseBlindPixel()));
    13611362    SetUsePINDiode(GetEnv("UsePINDiode", IsUsePINDiode()));
     1363    SetGeometry(GetEnv("Geometry", fGeometry));
    13621364
    13631365    return kTRUE;
     
    15521554
    15531555    MGeomApply               apply;
     1556    apply.SetGeometry(fGeometry);
    15541557    MBadPixelsMerge          merge(&fBadPixels);
    15551558    MExtractPINDiode         pinext;
     
    16821685    // TOO MANY DAYS TRYING TO FIND THIS REASON!
    16831686    //
     1687    // There is NO BUG-REPORT! And no code has been deleted! And
     1688    // there is NO hint who wrote this work around and should
     1689    // be informed! Maybe the author of a WORKAROUND should contact
     1690    // the author of a class which he/she identified not working
     1691    // correctly instead of vice versa!
     1692    //
    16841693    if (fDisplay)
    16851694    {
     1695        /*
    16861696      if (IsUsePINDiode())
    16871697        {
     
    17071717            (MHCalibrationChargeCam*)plist.FindObject("MHCalibrationChargeCam");
    17081718          cam->DrawClone(Form("nonew %s",drawoption.Data()));
    1709         }
     1719        } */
    17101720    }
    17111721
    17121722    DisplayResult(plist);
    17131723
    1714     if (!WriteResult())
     1724    if (!WriteResult(plist.FindObject("MGeomCam")))
    17151725        return kFALSE;
    17161726
     
    18621872// - MBadPixelsCam
    18631873//
    1864 Bool_t MJCalibration::WriteResult()
     1874Bool_t MJCalibration::WriteResult(TObject *geom)
    18651875{
    18661876    if (fPathOut.IsNull())
     
    19251935    }
    19261936    *fLog << inf << "ok." << endl;
     1937
     1938    if (!geom)
     1939        *fLog << warn << " - WARNING: MGeomCam... not found!" << endl;
     1940    {
     1941        *fLog << inf << " - MGeomCam..." << flush;
     1942        if (geom->Write()<=0)
     1943        {
     1944            *fLog << err << "Unable to write MGeomCam to " << oname << endl;
     1945            return kFALSE;
     1946        }
     1947        *fLog << inf << "ok." << endl;
     1948    }
    19271949
    19281950    if (fRelTimes)
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.h

    r4795 r4870  
    100100  Bool_t fDataCheck;                                   // Flag if the data check is run on raw data
    101101  Bool_t fDebug;                                       // Flag if debug option is passed onto cal. classes
     102
     103  TString fGeometry;
    102104 
    103105  void   DisplayResult        ( MParList &plist );
     
    108110  void   FixDataCheckHist     ( TH1D     *hist  ) const;
    109111 
    110   Bool_t WriteResult();
     112  Bool_t WriteResult(TObject *geom);
    111113  Bool_t WriteEventloop(MEvtLoop &evtloop) const;
    112114  Bool_t WriteTasks(MTask *t1, MTask *t2) const;
     
    142144  void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; }
    143145  void SetNormalDisplay()    { fDisplayType = kNormalDisplay;    }
     146
     147  // Camera Geomtry
     148  void SetGeometry(const char *geom) { fGeometry = geom; }
    144149 
    145150  // Rel. Time
Note: See TracChangeset for help on using the changeset viewer.