Changeset 8408


Ignore:
Timestamp:
04/17/07 13:40:31 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8406 r8408  
    1919                                                 -*-*- END OF LINE -*-*-
    2020
     21 2007/04/17 Thomas Bretz
     22
     23   * mcalib/CalibLinkDef.h, mcalib/Makefile:
     24     - removed obsolete MCalibrationIntensityConstCam
     25
     26   * mcalib/MCalibCalcFromPast.[h,cc]:
     27     - removed obsolete depedency on MCalibrationIntensityConstCam
     28
     29   * mcalib/MCalibConstCam.[h,cc]:
     30     - added a possibility to veto bad pixels in GetPixelContent by
     31       setting a MBadPixelsCam
     32     - removed obsolete fRunNumber
     33     - increased class version number by 1
     34
     35   * mcalib/MCalibrateData.[h,cc]:
     36     - removed obsolete dependency on MCalibrationIntensityConstCam
     37     - removed some obsolete comments with code from old pedestal treatment
     38
     39
     40
    2141 2007/04/15 Thomas Bretz
    2242
  • trunk/MagicSoft/Mars/NEWS

    r8407 r8408  
    1717   - merpp: When reading raw data the data is now stored in a single
    1818     array. The lo-gain array is obsolete. The interface stays the same.
     19
     20   - callisto: Started further simplification by removing obsolete
     21     dependancies on MCalibIntensity*Cams.
    1922
    2023   - callisto: Added the option to write an event movie. Please use
  • trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h

    r8300 r8408  
    1919#pragma link C++ class MCalibrationIntensityCam+;
    2020#pragma link C++ class MCalibrationIntensityChargeCam+;
    21 #pragma link C++ class MCalibrationIntensityConstCam+;
    2221#pragma link C++ class MCalibrationIntensityBlindCam+;
    2322#pragma link C++ class MCalibrationIntensityQECam+;
  • trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc

    r8395 r8408  
    3232//   MCalibrationIntensityChargeCam
    3333//   MCalibrationIntensityRelTimeCam
    34 //   MCalibrationIntensityConstCam
    3534//   MBadPixelsIntensityCam
    3635//
     
    6362#include "MCalibrationIntensityBlindCam.h"
    6463#include "MCalibrationIntensityQECam.h"
    65 #include "MCalibrationIntensityRelTimeCam.h"
    66 #include "MCalibrationIntensityConstCam.h"
     64//#include "MCalibrationIntensityRelTimeCam.h"
    6765
    6866#include "MBadPixelsIntensityCam.h"
     
    9088MCalibCalcFromPast::MCalibCalcFromPast(const char *name, const char *title)
    9189    : fGeom(NULL), fParList(NULL), fRunHeader(NULL),
    92       fIntensCharge(NULL), fIntensBlind(NULL), fIntensRelTime(NULL), fIntensConst(NULL),
     90      fIntensCharge(NULL), fIntensBlind(NULL), fIntensRelTime(NULL),
    9391      fIntensBad(NULL),
    9492      fChargeCalc(NULL), fRelTimeCalc(NULL), fCalibrate(NULL),
     
    165163    fIntensCharge = (MCalibrationIntensityChargeCam*)pList->FindCreateObj("MCalibrationIntensityChargeCam");
    166164    fIntensQE     = (MCalibrationIntensityQECam*)    pList->FindCreateObj("MCalibrationIntensityQECam");
    167     fIntensConst  = (MCalibrationIntensityConstCam*) pList->FindCreateObj("MCalibrationIntensityConstCam");
    168165
    169166    if (!fIntensCharge)
     
    171168    if (!fIntensQE)
    172169        return kFALSE;
    173     if (!fIntensConst)
    174         return kFALSE;
    175    
    176170
    177171    MCalibrationChargeCam *chargeinit = (MCalibrationChargeCam*)pList->FindObject("MCalibrationChargeCam");
     
    188182      *fLog << "Could not find initial MCalibrationQECam, cannot initialize intensity cam" << endl;
    189183
    190     fIntensConst->GetCam()->Init(*fGeom);
    191 
    192184    if (!fChargeCalc)
    193185      fChargeCalc   = (MCalibrationChargeCalc*)pList->FindObject("MCalibrationChargeCalc");
    194 
    195     if (!fCalibrate)
    196       fCalibrate   = (MCalibrateData*)pList->FindObject("MCalibrateData");
    197    
    198     *fLog << inf << "Found MHCalibrationChargeCam ... " << flush;
    199 
    200186    if (!fChargeCalc)
    201187      {
     
    205191
    206192    if (!fCalibrate)
     193      fCalibrate   = (MCalibrateData*)pList->FindObject("MCalibrateData");
     194    if (!fCalibrate)
    207195      {
    208196        *fLog << err << "Could not find MCalibrateData abort... " << endl;
    209197        return kFALSE;
    210198      }
    211   }
    212      
     199   
     200    *fLog << inf << "Found MHCalibrationChargeCam ... " << flush;
     201
     202  }
     203
    213204  //
    214205  // Look for the MFillH name "FillRelTimeCam". In case yes, initialize the
     
    219210
    220211    fIntensRelTime = (MCalibrationIntensityRelTimeCam*)pList->FindCreateObj("MCalibrationIntensityRelTimeCam");
    221     if (!fRelTimeCalc)
    222       fRelTimeCalc   = (MCalibrationRelTimeCalc*)pList->FindObject(AddSerialNumber("MCalibrationRelTimeCalc"));
    223 
    224     *fLog << inf << "Found MHCalibrationRelTimeCam ... " << flush;
    225 
    226212    if (!fIntensRelTime)
    227213      {
     
    231217
    232218    if (!fRelTimeCalc)
     219      fRelTimeCalc   = (MCalibrationRelTimeCalc*)pList->FindObject(AddSerialNumber("MCalibrationRelTimeCalc"));
     220    if (!fRelTimeCalc)
    233221      {
    234222        *fLog << err << "Could not find MCalibrationRelTimeCalc abort... " << endl;
    235223        return kFALSE;
    236224      }
     225
     226    *fLog << inf << "Found MHCalibrationRelTimeCam ... " << flush;
    237227  }
    238228
  • trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.h

    r8210 r8408  
    2121class MCalibrationIntensityQECam;
    2222class MCalibrationIntensityRelTimeCam;
    23 class MCalibrationIntensityConstCam;
    2423class MBadPixelsIntensityCam;
    2524
     
    3736  MCalibrationIntensityQECam      *fIntensQE;        //! Intensity QE     Cam (to be created)
    3837  MCalibrationIntensityRelTimeCam *fIntensRelTime;   //! Intensity Rel. Time Cam (to be created)
    39   MCalibrationIntensityConstCam   *fIntensConst;     //! Intensity Rel. Time Cam (to be created)
    4038  MBadPixelsIntensityCam          *fIntensBad;       //! Intensity Bad Pixels Cam (to be created)
    4139 
  • trunk/MagicSoft/Mars/mcalib/MCalibConstCam.cc

    r7804 r8408  
    1818!   Author(s): Markus Gaug    01/2005 <mailto:markus@ifae.es>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2005
     20!   Copyright: MAGIC Software Development, 2000-2007
    2121!
    2222\* ======================================================================== */
    2323
    2424/////////////////////////////////////////////////////////////////////////////
    25 //                                                                         //
    26 // MCalibConstCam                                                          //
    27 //                                                                         //
    28 // Hold the temporary conversion factors for MCalibrateDatara              //
    29 //                                                                         //
     25//
     26// MCalibConstCam
     27//
     28// Hold the temporary conversion factors for MCalibrateDatara
     29//
     30// Version 2:
     31// ---------
     32//   - fRunNumber
     33//
     34//
    3035/////////////////////////////////////////////////////////////////////////////
    3136#include "MCalibConstCam.h"
     
    4045#include "MGeomPix.h"
    4146
     47#include "MBadPixelsCam.h"
     48#include "MBadPixelsPix.h"
     49
    4250ClassImp(MCalibConstCam);
    4351
    4452using namespace std;
     53
    4554// --------------------------------------------------------------------------
    4655//
     
    5968// has to be performed (in MGeomApply).
    6069//
    61 MCalibConstCam::MCalibConstCam(const char *name, const char *title)
     70MCalibConstCam::MCalibConstCam(const char *name, const char *title)
     71    : fBadPixels(0)
    6272{
    6373  fName  = name  ? name  : "MCalibConstCam";
     
    253263{
    254264    if (GetSize() <= idx)
     265        return kFALSE;
     266
     267    if (fBadPixels && (*fBadPixels)[idx].IsUnsuitable())
    255268        return kFALSE;
    256269
  • trunk/MagicSoft/Mars/mcalib/MCalibConstCam.h

    r7188 r8408  
    1313#endif
    1414
    15 
    1615class MGeomCam;
    1716class MCalibConstPix;
     17class MBadPixelsCam;
     18
    1819class MCalibConstCam : public MParContainer, public MCamEvent
    1920{
     
    2425  TClonesArray *fAverageSectors;  //-> Array of MCalibConstPix, one per camera sector
    2526
    26   Int_t fRunNumber;               // Run number
    27  
     27  //Int_t fRunNumber;               // Run number
     28
     29  MBadPixelsCam *fBadPixels;      //!
     30
    2831public:
    2932
     
    5457
    5558  // Setters
    56   void SetRunNumber( const Int_t n )   {  fRunNumber = n; }
     59  //void SetRunNumber(const Int_t n)    { fRunNumber = n; }
     60  void SetBadPixels(MBadPixelsCam *b) { fBadPixels = b; }
    5761 
    5862  Bool_t GetPixelContent (Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
    5963  void   DrawPixelContent(Int_t idx) const;
    6064
    61   ClassDef(MCalibConstCam, 1)   // Temporary Storage for calibration constants
     65  ClassDef(MCalibConstCam, 2)   // Temporary Storage for calibration constants
    6266};
    6367
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc

    r8395 r8408  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MCalibrateData.cc,v 1.65 2007-04-11 13:35:13 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MCalibrateData.cc,v 1.66 2007-04-17 12:39:14 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    122122#include "MCalibrationQEPix.h"
    123123 
    124 #include "MCalibrationIntensityConstCam.h"
    125124#include "MCalibConstCam.h"
    126125#include "MCalibConstPix.h"
     
    159158    : fGeomCam(NULL),   fBadPixels(NULL), fCalibrations(NULL), fIntensCalib(NULL),
    160159      fQEs(NULL), fIntensQE(NULL), fSignals(NULL), fCerPhotEvt(NULL), fCalibConstCam(NULL),
    161     fIntensConst(NULL), /*fPedestalExt(NULL), fPedestalRndm(NULL), fPedPhotCam(NULL),*/
    162160    fPedestalFlag(kNo), fSignalType(kPhot), fRenormFactor(1.), fScaleFactor(1.)
    163161{
     
    216214        return kFALSE;
    217215    }
    218     /*
    219     fPedPhotCam = (MPedPhotCam*)pList->FindCreateObj("MPedPhotCam");
    220     if (!fPedPhotCam)
    221         return kFALSE;
    222 
    223     fPedestalExt  = (MPedestalCam*)pList->FindObject("MPedestalFromExtractor", "MPedestalCam");
    224     if (!fPedestalExt)
    225     {
    226         *fLog << err << "MPedestalFromExtractor [MPedestalCam] not found ... aborting" << endl;
    227         return kFALSE;
    228     }
    229 
    230     fPedestalRndm = (MPedestalCam*)pList->FindObject("MPedestalFromExtractorRndm", "MPedestalCam");
    231     if (!fPedestalRndm)
    232     {
    233         *fLog << err << "MPedestalFromExtractorRndm [MPedestalCam] not found ... aborting" << endl;
    234         return kFALSE;
    235     }
    236     */
    237216
    238217    fSignals    = 0;
     
    251230            return kFALSE;
    252231
    253         fIntensConst = (MCalibrationIntensityConstCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityConstCam"));
    254         if (fIntensConst)
    255             *fLog << inf << "Found MCalibrationIntensityConstCam ... " << endl;
    256         else
    257         {
    258             fCalibConstCam = (MCalibConstCam*)pList->FindCreateObj(AddSerialNumber("MCalibConstCam"));
    259             if (!fCalibConstCam)
    260                 return kFALSE;
    261         }
     232        fCalibConstCam = (MCalibConstCam*)pList->FindCreateObj(AddSerialNumber("MCalibConstCam"));
     233        if (!fCalibConstCam)
     234            return kFALSE;
    262235    }
    263236
     
    546519    fHiLoConvErr.Reset();
    547520
    548     MCalibConstCam *constcam = fIntensConst ? fIntensConst->GetCam() : fCalibConstCam;
    549 
    550521    MCalibrationChargeCam *chargecam = NULL;
    551522    MCalibrationQECam     *qecam     = NULL;
     
    580551        Float_t calibUpdate   = 1.;
    581552
    582         MCalibConstPix &cpix  = (*constcam)[pixidx];
    583            
    584553        if(fCalibrationMode!=kNone)
    585554          {
     
    727696            *fLog << fCalibConvMinLimit << "," << fCalibConvMaxLimit << "[... set to 0. " << endl;
    728697          }
    729         cpix.SetCalibConst(calibConv);
     698
     699        MCalibConstPix &cpix  = (*fCalibConstCam)[pixidx];
     700
     701        cpix.SetCalibConst(calibConv);
    730702        cpix.SetCalibFFactor(calibFFactor);
    731703
    732704      } /*     for (Int_t pixidx=0; pixidx<fGeomCam->GetNumPixels(); pixidx++) */
    733705
    734     if (fIntensConst)
    735         fIntensConst->SetReadyToSave();
    736     else
    737         fCalibConstCam->SetReadyToSave();
     706    fCalibConstCam->SetReadyToSave();
    738707
    739708    if (skip>fGeomCam->GetNumPixels()*0.9)
     
    842811              //break;
    843812            }
    844            /*
    845             const Double_t mean = (*fPedestalExt)[pixidx].GetPedestal()    * pedmeancalib;
    846             const Double_t rms  = (*fPedestalExt)[pixidx].GetPedestalRms() * pedrmscalib;
    847 
    848             (*fPedPhotCam)[pixidx].Set(mean, rms);
    849             fPedPhotCam->SetReadyToSave();
    850             */
    851813        } /* if (pedestal) */
    852814    }
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.h

    r8274 r8408  
    2323class MCalibrationIntensityChargeCam;
    2424class MCalibrationIntensityQECam;
    25 class MCalibrationIntensityConstCam;
    2625
    2726class MCalibrateData : public MTask
     
    7170  MSignalCam                     *fCerPhotEvt;    //! Cerenkov Photon Event used for calculation
    7271  MCalibConstCam                 *fCalibConstCam; //! Temporary calib consts storage
    73   MCalibrationIntensityConstCam  *fIntensConst;   //! Temporary calib consts storage
    74 //  MPedestalCam                   *fPedestalExt;   //! Input container for calibrated pedestal
    75 //  MPedestalCam                   *fPedestalRndm;  //! Input container for calibrated pedestal
    76 //  MPedPhotCam                    *fPedPhotCam;    //! Output container for calibrated pedestal
    7772 
    7873  CalibrationMode_t fCalibrationMode;    // Flag defining the calibration mode (CalibrationMode_t)
  • trunk/MagicSoft/Mars/mcalib/Makefile

    r8300 r8408  
    4040           MCalibrateRelTimes.cc \
    4141           MCalibrationIntensityCam.cc \
    42            MCalibrationIntensityConstCam.cc \
    4342           MCalibrationIntensityChargeCam.cc \
    4443           MCalibrationIntensityBlindCam.cc \
Note: See TracChangeset for help on using the changeset viewer.