Changeset 8417


Ignore:
Timestamp:
04/18/07 16:34:51 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc

    r8408 r8417  
    3232//   MCalibrationIntensityChargeCam
    3333//   MCalibrationIntensityRelTimeCam
    34 //   MBadPixelsIntensityCam
    3534//
    3635//  Output Containers:
    3736//   MCalibrationIntensityChargeCam
    3837//   MCalibrationIntensityRelTimeCam
    39 //   MBadPixelsIntensityCam
    4038//
    4139// Class version 2:
     
    6462//#include "MCalibrationIntensityRelTimeCam.h"
    6563
    66 #include "MBadPixelsIntensityCam.h"
     64#include "MBadPixelsCam.h"
    6765
    6866#include "MCalibrationChargePix.h"
     
    8886MCalibCalcFromPast::MCalibCalcFromPast(const char *name, const char *title)
    8987    : fGeom(NULL), fParList(NULL), fRunHeader(NULL),
    90       fIntensCharge(NULL), fIntensBlind(NULL), fIntensRelTime(NULL),
    91       fIntensBad(NULL),
     88      fIntensCharge(NULL), fIntensBlind(NULL),
    9289      fChargeCalc(NULL), fRelTimeCalc(NULL), fCalibrate(NULL),
    9390    fNumCam(0), fNumEvents(0), fUpdateWithFFactorMethod(kTRUE), fUpdateNumPhes(kTRUE),
     
    131128  // Look for the MBadPixels Intensity Cam
    132129  //
    133   fIntensBad = (MBadPixelsIntensityCam*)pList->FindCreateObj("MBadPixelsIntensityCam");
    134   if (fIntensBad)
    135     *fLog << inf << "Found MBadPixelsIntensityCam ... " << flush;
    136   else
    137     return kFALSE;
    138  
     130  fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam");
     131  if (!fBadPixels)
     132  {
     133      *fLog << err << "MBadPixelsCam not found... abort." << endl;
     134      return kFALSE;
     135  }
     136
    139137  //
    140138  // Look for the MFillH-class "MHCalibrationBlindCam". In case yes, initialize the
     
    209207  {
    210208
    211     fIntensRelTime = (MCalibrationIntensityRelTimeCam*)pList->FindCreateObj("MCalibrationIntensityRelTimeCam");
    212     if (!fIntensRelTime)
     209    MParContainer *cont = pList->FindCreateObj("MCalibrationIntensityRelTimeCam");
     210    if (!cont)
    213211      {
    214212        *fLog << err << "Could not find nor create MCalibrationIntensityRelTimeCam abort... " << endl;
     
    276274    return kTRUE;
    277275
     276  // Replace the old cams by (empty) new ones
     277  // MCalibrationChargeCam: fIntensCharge
     278  // MCalibrationQECam:     fIntensQE
     279  // MCalibrationBlindCam:  fIntensBlind
    278280  fNumEvents = 0;
    279281  ReInitialize();
     
    382384  // The "DeleteOldCam" function must not delete the first entry in
    383385  // the array because it is a special cam from the MParList. (see above)
    384 
    385   if (fIntensBad)
    386   {
    387       *fLog << "MBadPixelsCam...";
    388       MBadPixelsCam *cold = fIntensBad->GetCam();
    389       fIntensBad->AddToList(Form("MBadPixelsCam%04d",fNumCam),*fGeom);
    390       if (cold)
    391           fIntensBad->DeleteOldCam(cold);
    392   }
     386  *fLog << "MBadPixelsCam...";
     387  fBadPixels->Clear();  // FIXME:::::: MERGE PreExcl!!!!
    393388
    394389  if (fIntensCharge)
  • trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.h

    r8408 r8417  
    2020class MCalibrationIntensityBlindCam;
    2121class MCalibrationIntensityQECam;
    22 class MCalibrationIntensityRelTimeCam;
    23 class MBadPixelsIntensityCam;
     22
     23class MBadPixelsCam;
    2424
    2525class MCalibCalcFromPast : public MTask
     
    3535  MCalibrationIntensityBlindCam   *fIntensBlind;     //! Intensity Blind  Cam (to be created)
    3636  MCalibrationIntensityQECam      *fIntensQE;        //! Intensity QE     Cam (to be created)
    37   MCalibrationIntensityRelTimeCam *fIntensRelTime;   //! Intensity Rel. Time Cam (to be created)
    38   MBadPixelsIntensityCam          *fIntensBad;       //! Intensity Bad Pixels Cam (to be created)
    39  
     37
     38  MBadPixelsCam                   *fBadPixels;
     39
    4040  MCalibrationChargeCalc          *fChargeCalc;      //! Charge Calibration Task
    4141  MCalibrationRelTimeCalc         *fRelTimeCalc;     //! Rel. Times Calibratio Task
  • trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc

    r7005 r8417  
    3535//   MCalibrationIntensityChargeCam
    3636//   MCalibrationIntensityRelTimeCam
    37 //   MBadPixelsIntensityCam
    3837//
    3938//  Output Containers:
    4039//   MCalibrationIntensityChargeCam
    4140//   MCalibrationIntensityRelTimeCam
    42 //   MBadPixelsIntensityCam
    4341//
    4442//////////////////////////////////////////////////////////////////////////////
     
    5048#include "MParList.h"
    5149#include "MTaskList.h"
     50
     51#include "MGeomCam.h"
     52#include "MRawRunHeader.h"
    5253
    5354#include "MHCalibrationCam.h"
    5455#include "MCalibrationChargeCam.h"
    5556#include "MCalibrationBlindCam.h"
     57#include "MBadPixelsCam.h"
    5658
    5759#include "MCalibrationIntensityChargeCam.h"
     
    6062#include "MCalibrationIntensityRelTimeCam.h"
    6163
    62 #include "MBadPixelsIntensityCam.h"
    63 
     64#include "MCalibrationPattern.h"
    6465#include "MCalibrationChargeCam.h"
    6566#include "MCalibrationChargeCalc.h"
    6667#include "MCalibrationRelTimeCalc.h"
    6768
    68 #include "MRawRunHeader.h"
    69 #include "MCalibrationPattern.h"
    70 
    71 #include "MGeomCam.h"
    72 
    7369ClassImp(MCalibColorSteer);
    7470
     
    8177MCalibColorSteer::MCalibColorSteer(const char *name, const char *title)
    8278    : fCalibPattern(NULL), fGeom(NULL), fParList(NULL),
    83       fIntensCharge(NULL), fIntensRelTime(NULL), fIntensBad(NULL),
     79      fIntensCharge(NULL), fIntensRelTime(NULL),
    8480      fBad(NULL), fChargeCalc(NULL), fRelTimeCalc(NULL), fHistCopy(kFALSE)
    8581{
     
    135131
    136132  //
    137   // Look for the MBadPixels Intensity Cam
    138   //
    139   fIntensBad = (MBadPixelsIntensityCam*)pList->FindCreateObj("MBadPixelsIntensityCam");
    140   if (fIntensBad)
    141     *fLog << inf << "Found MBadPixelsIntensityCam ... " << flush;
    142   else
    143     return kFALSE;
    144  
    145   //
    146   // Look for the MBadPixels Intensity Cam
     133  // Look for the MBadPixelsCam
    147134  //
    148135  fBad = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam");
    149   if (fBad)
    150     {
    151       *fLog << inf << "Found also MBadPixelsCam ... " << flush;
    152       fIntensBad->GetCam()->Merge(*fBad);
    153     }
    154   else
    155     return kFALSE;
    156  
     136  if (!fBad)
     137  {
     138      *fLog << err << "MBadPixelsCam not found... abort." << endl;
     139      return kFALSE;
     140  }
     141
    157142  //
    158143  // Look for the MCalibrationIntensityBlindCam
    159144  //
    160145  fIntensBlind = (MCalibrationIntensityBlindCam*)pList->FindCreateObj("MCalibrationIntensityBlindCam");
    161 
    162   if (fIntensBlind)
    163     *fLog << inf << "Found MCalibrationIntensityBlindCam ... " << flush;
    164   else
    165     return kFALSE;
     146  if (!fIntensBlind)
     147  {
     148      *fLog << err << "MCalibrationIntensityBlindCam not found... abort." << endl;
     149      return kFALSE;
     150  }
    166151 
    167152  //
     
    341326  TString namep = GetNamePattern();
    342327
    343   if (fIntensBad)
    344     {
    345       fIntensBad->AddToList(Form("MBadPixelsCam%s",namep.Data()),*fGeom);
    346       *fLog << inf << "New MBadPixelsCam with " << namep << endl;
    347       fIntensBad->GetCam()->Merge(*fBad);
    348       *fLog << inf << "Merged new MBadPixelsCam with first of list" << endl;
    349     }
     328  fBad->Clear(); // FIXME:::::: MERGE PreExcl!!!!
     329
    350330  if (fIntensCharge)
    351331    {
  • trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.h

    r7005 r8417  
    2121class MCalibrationIntensityQECam;
    2222class MCalibrationIntensityRelTimeCam;
    23 class MBadPixelsIntensityCam;
    2423class MBadPixelsCam;
    2524
     
    3534  MCalibrationIntensityQECam      *fIntensQE;        //!
    3635  MCalibrationIntensityRelTimeCam *fIntensRelTime;   //!
    37   MBadPixelsIntensityCam          *fIntensBad;       //!
    3836  MBadPixelsCam                   *fBad;             //!
    3937 
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r8398 r8417  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.172 2007-04-12 11:47:19 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.173 2007-04-18 15:33:56 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    239239#include "MExtractedSignalPINDiode.h"
    240240
    241 #include "MBadPixelsIntensityCam.h"
    242241#include "MBadPixelsCam.h"
    243242
     
    364363    fNumProcessed              = 0;
    365364
    366     fIntensBad   = NULL;
    367365    fBadPixels   = NULL;
    368366    fIntensCam   = NULL;
     
    447445// -  MCalibrationIntensityChargeCam or MCalibrationChargeCam
    448446//  - MCalibrationIntensityQECam or MCalibrationQECam
    449 //  - MBadPixelsIntensityCam or MBadPixelsCam
     447//  - MBadPixelsCam
    450448//
    451449// Search for the following input containers and give a warning if not existing:
     
    535533    *fLog << inf << "No MHCalibrationChargeBlindCam found... no Blind Pixel method!" << endl;
    536534
    537   fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam"));
    538   if (fIntensBad)
    539     *fLog << inf << "Found MBadPixelsIntensityCam... " << flush;
    540   else
    541     {
    542       fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam"));
    543       if (!fBadPixels)
    544         {
    545           *fLog << err << "Cannot find MBadPixelsCam ... abort." << endl;
    546           return kFALSE;
    547         }
    548     }
     535  fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam"));
     536  if (!fBadPixels)
     537  {
     538      *fLog << err << "Cannot find MBadPixelsCam ... abort." << endl;
     539      return kFALSE;
     540  }
    549541 
    550542  //
     
    559551  MCalibrationChargeCam *chargecam = fIntensCam
    560552    ? (MCalibrationChargeCam*)fIntensCam->GetCam()  : fCam;
    561   MBadPixelsCam         *badcam    = fIntensBad
    562     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    563553
    564554  UInt_t npixels     = fGeom->GetNumPixels();
     
    569559      MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i];
    570560      MCalibrationQEPix     &pqe = (MCalibrationQEPix&)    (*qecam)    [i];
    571       MBadPixelsPix         &bad = (*badcam)   [i];
     561      MBadPixelsPix         &bad = (*fBadPixels)[i];
    572562     
    573563      if (bad.IsBad())
     
    750740  MCalibrationQECam     *qecam     = fIntensQE    ? (MCalibrationQECam*)    fIntensQE->GetCam()   : fQECam;
    751741  MCalibrationChargeCam *chargecam = fIntensCam   ? (MCalibrationChargeCam*)fIntensCam->GetCam()  : fCam;
    752   MBadPixelsCam         *badcam    = fIntensBad   ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    753742
    754743  //
     
    768757
    769758      MPedestalPix  &ped = (*fPedestals)[pixid];
    770       MBadPixelsPix &bad = (*badcam)    [pixid];
     759      MBadPixelsPix &bad = (*fBadPixels)[pixid];
    771760
    772761      const Int_t aidx    = (*fGeom)[pixid].GetAidx();
     
    919908  chargecam->SetReadyToSave();
    920909  qecam    ->SetReadyToSave();
    921   badcam   ->SetReadyToSave();
     910  fBadPixels->SetReadyToSave();
    922911
    923912  if (blindcam)
     
    11581147{
    11591148 
    1160   MBadPixelsCam *badcam = fIntensBad ? (MBadPixelsCam*)fIntensBad->GetCam() : fBadPixels;
    1161 
    1162   for (Int_t i=0; i<badcam->GetSize(); i++)
    1163     {
    1164      
    1165       MBadPixelsPix &bad = (*badcam)[i];
     1149  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
     1150    {
     1151     
     1152      MBadPixelsPix &bad = (*fBadPixels)[i];
    11661153
    11671154      if (IsCheckDeadPixels())
     
    12381225Bool_t MCalibrationChargeCalc::FinalizeFFactorMethod()
    12391226{
    1240   MBadPixelsCam         *badcam    = fIntensBad
    1241     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    12421227  MCalibrationChargeCam *chargecam = fIntensCam
    12431228    ? (MCalibrationChargeCam*)fIntensCam->GetCam()  : fCam;
     
    12661251    {
    12671252      MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i];
    1268       MBadPixelsPix         &bad =                         (*badcam)[i];
     1253
     1254      MBadPixelsPix &bad = (*fBadPixels)[i];
    12691255     
    12701256      if (!pix.IsFFactorMethodValid())
     
    13911377        continue;
    13921378
    1393       MBadPixelsPix         &bad =           (*badcam)[i];
     1379      MBadPixelsPix &bad = (*fBadPixels)[i];
    13941380
    13951381      if (bad.IsUncalibrated(MBadPixelsPix::kChargeSigmaNotValid))
     
    15261512     
    15271513      MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i];
    1528       MBadPixelsPix         &bad =                         (*badcam)[i];
     1514
     1515      MBadPixelsPix &bad = (*fBadPixels)[i];
    15291516
    15301517      if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
     
    17341721  MCalibrationChargeCam *chargecam = fIntensCam
    17351722    ? (MCalibrationChargeCam*)fIntensCam->GetCam()  : fCam;
    1736   MBadPixelsCam         *badcam    = fIntensBad
    1737     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    17381723
    17391724  MCalibrationChargePix &avpix = (MCalibrationChargePix&)chargecam->GetAverageArea(0);
     
    17851770      MCalibrationChargePix &pix   = (MCalibrationChargePix&)(*chargecam)[i];
    17861771      MCalibrationQEPix     &qpix  = (MCalibrationQEPix&)    (*qecam)    [i];
    1787       MBadPixelsPix         &bad   =                         (*badcam)   [i];
     1772
     1773      MBadPixelsPix &bad = (*fBadPixels)[i];
    17881774
    17891775      if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
     
    19031889     
    19041890      MCalibrationChargePix &pix   = (MCalibrationChargePix&)(*chargecam)[i];
    1905       MBadPixelsPix         &bad   =                         (*badcam)   [i];
     1891
     1892      MBadPixelsPix &bad = (*fBadPixels)[i];
    19061893
    19071894      if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
     
    19281915      MCalibrationChargePix &pix  = (MCalibrationChargePix&)(*chargecam)[i];
    19291916      MCalibrationQEPix     &qpix = (MCalibrationQEPix&)    (*qecam)    [i];
    1930       MBadPixelsPix         &bad  =                         (*badcam)   [i];
    1931 
    1932       if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
     1917
     1918      if ((*fBadPixels)[i].IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
    19331919        {
    19341920          qpix.SetFFactorMethodValid(kFALSE,fPulserColor);
     
    19641950  MCalibrationBlindCam  *blindcam  = fIntensBlind
    19651951    ? (MCalibrationBlindCam*) fIntensBlind->GetCam(): fBlindCam;
    1966   MBadPixelsCam         *badcam    = fIntensBad
    1967     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    19681952  MCalibrationQECam     *qecam     = fIntensQE     
    19691953    ? (MCalibrationQECam*)    fIntensQE->GetCam()   : fQECam;
     
    20071991        }
    20081992
    2009       MBadPixelsPix         &bad   =                         (*badcam)   [i];
     1993      MBadPixelsPix &bad = (*fBadPixels)[i];
    20101994
    20111995      if (bad.IsUnsuitable (MBadPixelsPix::kUnsuitableRun))
     
    20632047  MCalibrationChargeCam *chargecam = fIntensCam
    20642048    ? (MCalibrationChargeCam*)fIntensCam->GetCam()  : fCam;
    2065   MBadPixelsCam         *badcam    = fIntensBad
    2066     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    20672049
    20682050  if (!fPINDiode)
     
    20902072        }
    20912073
    2092       MBadPixelsPix         &bad   =                         (*badcam)   [i];
     2074      MBadPixelsPix &bad = (*fBadPixels)[i];
    20932075
    20942076      if (!bad.IsUnsuitable (MBadPixelsPix::kUnsuitableRun))
     
    21302112  MCalibrationQECam     *qecam     = fIntensQE     
    21312113    ? (MCalibrationQECam*)    fIntensQE->GetCam()   : fQECam;
    2132   MBadPixelsCam         *badcam    = fIntensBad
    2133     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    21342114
    21352115  for (UInt_t i=0; i<npixels; i++)
     
    21372117     
    21382118      MCalibrationQEPix     &qepix = (MCalibrationQEPix&)    (*qecam)    [i];
    2139       MBadPixelsPix         &bad   =                         (*badcam)   [i];
    2140 
    2141       if (!bad.IsUnsuitable (MBadPixelsPix::kUnsuitableRun))
     2119
     2120      if (!(*fBadPixels)[i].IsUnsuitable (MBadPixelsPix::kUnsuitableRun))
    21422121        {
    21432122          qepix.SetPINDiodeMethodValid(kFALSE, fPulserColor);
     
    21672146  TArrayI unrel(nareas);
    21682147
    2169   const MBadPixelsCam *badcam = fIntensBad ? (MBadPixelsCam*)fIntensBad->GetCam() : fBadPixels;
    21702148  MCalibrationChargeCam *chargecam = fIntensCam ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam;
    21712149
     
    21762154  for (Int_t aidx=0; aidx<nareas; aidx++)
    21772155  {
    2178       suit[aidx]   = badcam->GetNumSuitable(MBadPixelsPix::kUnsuitableRun,   fGeom, aidx);
    2179       unsuit[aidx] = badcam->GetNumUnsuitable(MBadPixelsPix::kUnsuitableRun, fGeom, aidx);
    2180       unrel[aidx]  = badcam->GetNumUnsuitable(MBadPixelsPix::kUnreliableRun, fGeom, aidx);
     2156      suit[aidx]   = fBadPixels->GetNumSuitable(MBadPixelsPix::kUnsuitableRun,   fGeom, aidx);
     2157      unsuit[aidx] = fBadPixels->GetNumUnsuitable(MBadPixelsPix::kUnsuitableRun, fGeom, aidx);
     2158      unrel[aidx]  = fBadPixels->GetNumUnsuitable(MBadPixelsPix::kUnreliableRun, fGeom, aidx);
    21812159
    21822160      unsuitcnt   += unsuit[aidx];
     
    22372215  UInt_t countouter = 0;
    22382216
    2239   MBadPixelsCam         *badcam    = fIntensBad
    2240     ? (MBadPixelsCam*)fIntensBad->GetCam()  : fBadPixels;
    2241 
    2242   for (Int_t i=0; i<badcam->GetSize(); i++)
    2243     {
    2244       MBadPixelsPix &bad = (*badcam)[i];
    2245 
    2246       if (bad.IsUncalibrated(typ))
     2217  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
     2218    {
     2219      if ((*fBadPixels)[i].IsUncalibrated(typ))
    22472220        {
    22482221          if (fGeom->GetPixRatio(i) == 1.)
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h

    r8142 r8417  
    3333class MGeomCam;
    3434class MExtractedSignalCam;
    35 class MBadPixelsIntensityCam;
    3635class MBadPixelsCam;
    3736class MExtractor;
     
    8584 
    8685  // Pointers
    87   MBadPixelsIntensityCam         *fIntensBad;      //!  Bad Pixels 
     86//  MBadPixelsIntensityCam         *fIntensBad;      //!  Bad Pixels
    8887  MBadPixelsCam                  *fBadPixels;      //!  Bad Pixels
    8988  MCalibrationIntensityChargeCam *fIntensCam;      //!  Intensity Calibration results of all pixels   
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.cc

    r8355 r8417  
    7575#include "MCalibrationRelTimePix.h"
    7676
    77 #include "MBadPixelsIntensityCam.h"
    7877#include "MBadPixelsCam.h"
    7978#include "MBadPixelsPix.h"
     
    124123{
    125124
    126   fIntensBad  = NULL;
    127125  fBadPixels  = NULL;
    128126  fCam        = NULL;
     
    136134//  - MGeomCam
    137135//  - MCalibrationIntensityRelTimeCam or MCalibrationRelTimeCam
    138 //  - MBadPixelsIntensityCam or MBadPixelsCam
     136//  - MBadPixelsCam
    139137//
    140138// It defines the PixId of every pixel in:
     
    156154    }
    157155 
    158   fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam"));
    159   if (fIntensBad)
    160     *fLog << inf << "Found MBadPixelsIntensityCam ... " << endl;
    161   else
    162     {
    163       fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam"));
    164       if (!fBadPixels)
    165         {
    166           *fLog << err << "Cannot find MBadPixelsCam ... abort." << endl;
    167           return kFALSE;
    168         }
    169     }
     156  fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam"));
     157  if (!fBadPixels)
     158  {
     159      *fLog << err << "Cannot find MBadPixelsCam ... abort." << endl;
     160      return kFALSE;
     161  }
    170162
    171163  fIntensCam = (MCalibrationIntensityRelTimeCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityRelTimeCam"));
     
    187179  MCalibrationRelTimeCam *relcam = fIntensCam
    188180    ? (MCalibrationRelTimeCam*)fIntensCam->GetCam()  : fCam;
    189   MBadPixelsCam          *badcam    = fIntensBad
    190     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    191181
    192182  for (UInt_t i=0; i<npixels; i++)
     
    194184     
    195185      MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i];
    196       MBadPixelsPix          &bad =                          (*badcam)[i];
    197      
    198       if (bad.IsBad())
     186
     187      if ((*fBadPixels)[i].IsBad())
    199188        {
    200189          pix.SetExcluded();
     
    258247    fCam      ->SetReadyToSave();
    259248
    260   if (fIntensBad)
    261     fIntensBad->SetReadyToSave();
    262   else
    263     fBadPixels->SetReadyToSave();
     249  fBadPixels->SetReadyToSave();
    264250
    265251  *fLog << inf << endl;
     
    293279  MCalibrationRelTimeCam *relcam = fIntensCam
    294280    ? (MCalibrationRelTimeCam*)fIntensCam->GetCam()  : fCam;
    295   MBadPixelsCam         *badcam    = fIntensBad
    296     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    297281
    298282  const UInt_t npixels  = fGeom->GetNumPixels();
     
    311295  for (UInt_t i=0; i<npixels; i++)
    312296    {
    313       MBadPixelsPix &bad = (*badcam)[i];     
     297      MBadPixelsPix &bad = (*fBadPixels)[i];
    314298      const Int_t  aidx  = (*fGeom)[i].GetAidx();
    315299
     
    336320     
    337321      MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i];
    338       MBadPixelsPix          &bad =                          (*badcam)[i];
    339      
     322
    340323      if (pix.IsExcluded())
    341324        continue;
    342325
     326      MBadPixelsPix &bad = (*fBadPixels)[i];
    343327      if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
    344328        continue;
     
    383367     
    384368      MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i];
    385       MBadPixelsPix          &bad =                          (*badcam)[i];
    386369     
    387370      if (pix.IsExcluded())
    388371        continue;
    389372     
     373      MBadPixelsPix &bad = (*fBadPixels)[i];
    390374      if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
    391375        continue;
     
    420404  MCalibrationRelTimeCam *relcam = fIntensCam
    421405    ? (MCalibrationRelTimeCam*)fIntensCam->GetCam()  : fCam;
    422   MBadPixelsCam         *badcam    = fIntensBad
    423     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    424 
    425   for (Int_t i=0; i<badcam->GetSize(); i++)
    426     {
    427      
    428       MBadPixelsPix          &bad =                          (*badcam)[i];
     406
     407  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
     408    {
     409     
    429410      MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i];
     411
     412      MBadPixelsPix &bad = (*fBadPixels)[i];
    430413
    431414      if (IsCheckDeviatingBehavior())
     
    460443
    461444    MCalibrationRelTimeCam *relcam = fIntensCam ? (MCalibrationRelTimeCam*)fIntensCam->GetCam() : fCam;
    462     const MBadPixelsCam *badcam = fIntensBad ? (MBadPixelsCam*)fIntensBad->GetCam() : fBadPixels;
    463445
    464446    const Int_t nareas = fGeom->GetNumAreas();
     
    469451    for (int aidx=0; aidx<nareas; aidx++)
    470452    {
    471         unsuit[aidx] += badcam->GetNumUnsuitable(MBadPixelsPix::kUnsuitableRun, fGeom, aidx);
    472         unrel[aidx]  += badcam->GetNumUnsuitable(MBadPixelsPix::kUnreliableRun, fGeom, aidx);
     453        unsuit[aidx] += fBadPixels->GetNumUnsuitable(MBadPixelsPix::kUnsuitableRun, fGeom, aidx);
     454        unrel[aidx]  += fBadPixels->GetNumUnsuitable(MBadPixelsPix::kUnreliableRun, fGeom, aidx);
    473455        relcam->SetNumUnsuitable(unsuit[aidx], aidx);
    474456        relcam->SetNumUnreliable(unrel[aidx],  aidx);
     
    488470void MCalibrationRelTimeCalc::PrintUncalibrated(MBadPixelsPix::UncalibratedType_t typ, const char *text) const
    489471{
    490     const MBadPixelsCam *badcam = fIntensBad ? (MBadPixelsCam*)fIntensBad->GetCam()  : fBadPixels;
    491 
    492472    UInt_t countinner = 0;
    493473    UInt_t countouter = 0;
    494     for (Int_t i=0; i<badcam->GetSize(); i++)
    495     {
    496         if ((*badcam)[i].IsUncalibrated(typ))
     474    for (Int_t i=0; i<fBadPixels->GetSize(); i++)
     475    {
     476        if ((*fBadPixels)[i].IsUncalibrated(typ))
    497477        {
    498478            if (fGeom->GetPixRatio(i) == 1.)
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.h

    r8142 r8417  
    2222class MCalibrationRelTimeCam;
    2323class MGeomCam;
    24 class MBadPixelsIntensityCam;
     24//class MBadPixelsIntensityCam;
    2525class MBadPixelsCam;
    2626
     
    3535 
    3636  // Pointers
    37   MBadPixelsIntensityCam     *fIntensBad;        //  Bad Pixels Intensity Cam
     37  //MBadPixelsIntensityCam     *fIntensBad;        //  Bad Pixels Intensity Cam
    3838  MBadPixelsCam              *fBadPixels;        //  Bad Pixels
    3939  MCalibrationIntensityRelTimeCam *fIntensCam;   //  Calibrated RelTimes for different intensities
  • trunk/MagicSoft/Mars/mcalib/MCalibrationTestCalc.cc

    r8049 r8417  
    6868#include "MCalibrationTestPix.h"
    6969
    70 #include "MBadPixelsIntensityCam.h"
    7170#include "MBadPixelsCam.h"
    7271#include "MBadPixelsPix.h"
     
    9089//
    9190MCalibrationTestCalc::MCalibrationTestCalc(const char *name, const char *title)
    92     : fIntensBad(NULL), fBadPixels(NULL),
    93       fTestCam(NULL), fIntensCam(NULL), fCam(NULL),
     91    : fBadPixels(NULL), fTestCam(NULL), fIntensCam(NULL), fCam(NULL),
    9492      fGeom(NULL)
    9593{
     
    112110// - MHCalibrationTestCam
    113111// - MCalibrationIntensityTestCam or MCalibrationTestCam
    114 // - MBadPixelsIntensityCam or MBadPixelsCam
     112// - MBadPixelsCam
    115113//
    116114Bool_t MCalibrationTestCalc::ReInit(MParList *pList )
     
    146144    }
    147145
    148   fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam"));
    149   if (fIntensBad)
    150     *fLog << inf << "Found MBadPixelsIntensityCam ... " << endl;
    151   else
    152     {
    153       fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam"));
    154       if (!fBadPixels)
    155         {
    156           *fLog << err << "Cannot find MBadPixelsCam ... abort." << endl;
    157           return kFALSE;
    158         }
    159     }
    160 
    161 
    162   return kTRUE;
    163 }
    164 
    165 // ----------------------------------------------------------------------------------
    166 // 
    167 // Nothing to be done in Process, but have a look at MHCalibrationTestCam, instead
    168 //
    169 Int_t MCalibrationTestCalc::Process()
    170 {
     146  fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam"));
     147  if (!fBadPixels)
     148  {
     149      *fLog << err << "Cannot find MBadPixelsCam ... abort." << endl;
     150      return kFALSE;
     151  }
     152
    171153  return kTRUE;
    172154}
     
    241223  MCalibrationTestCam *testcam = fIntensCam
    242224    ? (MCalibrationTestCam*)fIntensCam->GetCam()  : fCam;
    243   MBadPixelsCam       *badcam    = fIntensBad
    244     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    245225
    246226  TArrayD lowlim      (nareas);
     
    409389                << Form("%8.2f out of %3.1f sigma limit: ",nphot,fPhotErrLimit)
    410390                << Form("[%8.2f,%8.2f] pixel%4i",lowlim[aidx],upplim[aidx],i) << endl;
    411           MBadPixelsPix &bad = (*badcam)[i];
     391          MBadPixelsPix &bad = (*fBadPixels)[i];
    412392          bad.SetUncalibrated( MBadPixelsPix::kDeviatingNumPhots );
    413393          bad.SetUnsuitable  ( MBadPixelsPix::kUnsuitableRun     );
  • trunk/MagicSoft/Mars/mcalib/MCalibrationTestCalc.h

    r5046 r8417  
    2222class MCalibrationIntensityTestCam;
    2323class MCalibrationTestCam;
    24 class MBadPixelsIntensityCam;
    2524class MBadPixelsCam;
    2625class MGeomCam;
     
    3938 
    4039  // Pointers
    41   MBadPixelsIntensityCam       *fIntensBad;   //! Bad Pixels
    4240  MBadPixelsCam                *fBadPixels;   //! Bad Pixels
    4341  MHCalibrationTestCam         *fTestCam;     //! Calibrated Photons in the camera
     
    5553 
    5654  Bool_t ReInit     (MParList *pList);
    57   Int_t  Process    ();
    5855  Int_t  PostProcess();
    5956
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc

    r8366 r8417  
    8282#include "MCalibrationPix.h"
    8383
    84 #include "MBadPixelsIntensityCam.h"
    8584#include "MBadPixelsCam.h"
    8685#include "MBadPixelsPix.h"
     
    144143    fHistName(gsHistName),fHistTitle(gsHistTitle),
    145144    fHistXTitle(gsHistXTitle),fHistYTitle(gsHistYTitle),
    146     fCurrentNumEvts(0),
    147     fColor(MCalibrationCam::kNONE), fIntensBad(NULL),
     145    fCurrentNumEvts(0), fColor(MCalibrationCam::kNONE),
    148146    fBadPixels(NULL), fIntensCam(NULL), fCam(NULL), fGeom(NULL),
    149147    fRunHeader(NULL)
     
    568566//
    569567// Gets or creates the pointers to:
    570 // - MBadPixelsIntensityCam
    571568// - MBadPixelsCam
    572569//
     
    606603  const Int_t nareas   = fGeom->GetNumAreas();
    607604
    608   fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam"));
    609   if (fIntensBad)
    610     *fLog << inf << "Found MBadPixelsIntensityCam ... " << endl;
    611   else
    612     {
    613       fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam");
     605  fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam");
     606  if (!fBadPixels)
     607  {
     608      fBadPixels = (MBadPixelsCam*)pList->FindCreateObj(AddSerialNumber("MBadPixelsCam"));
    614609      if (!fBadPixels)
    615         {
    616          
    617           fBadPixels = (MBadPixelsCam*)pList->FindCreateObj(AddSerialNumber("MBadPixelsCam"));
    618           if (!fBadPixels)
    619               return kFALSE;
    620 
    621           fBadPixels->InitSize(npixels);
    622         }
    623     }
    624  
     610          return kFALSE;
     611
     612      fBadPixels->InitSize(npixels);
     613  }
     614
    625615  if (IsAverageing())
    626616    {
     
    644634      for (Int_t i=0; i<npixels; i++)
    645635        {
    646          
    647           MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
    648           if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
     636
     637          if ((*fBadPixels)[i].IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
    649638            continue;
    650639         
     
    746735        pix.SetProbLimit(fProbLimit);
    747736       
    748         MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
    749         InitHists(pix,bad,i);
     737        InitHists(pix, (*fBadPixels)[i], i);
    750738
    751739        if (fCam)
     
    823811        pix.SetProbLimit(fProbLimit);
    824812       
    825         MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
    826         InitHists(pix,bad,i);
     813        InitHists(pix, (*fBadPixels)[i], i);
    827814      }
    828815  }
     
    12551242  {
    12561243      *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram empty." << endl;
     1244      bad.SetUncalibrated( fittyp );
    12571245      return;
    12581246  }
     
    12601248  {
    12611249      *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only overflows." << endl;
     1250      bad.SetUncalibrated( fittyp );
    12621251      return;
    12631252  }
     
    12651254  {
    12661255      *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only underflows." << endl;
     1256      bad.SetUncalibrated( fittyp );
    12671257      return;
    12681258  }
     
    13571347  {
    13581348      // *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram empty." << endl;
     1349      bad.SetUncalibrated( fittyp );
    13591350      return;
    13601351  }
     
    13621353  {
    13631354      *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only overflows." << endl;
     1355      bad.SetUncalibrated( fittyp );
    13641356      return;
    13651357  }
     
    13671359  {
    13681360      *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only underflows." << endl;
     1361      bad.SetUncalibrated( fittyp );
    13691362      return;
    13701363  }
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h

    r8366 r8417  
    3232class MCalibrationCam;
    3333class MCalibrationPix;
    34 class MBadPixelsIntensityCam;
    3534class MBadPixelsCam;
    3635class MBadPixelsPix;
     
    10099  MCalibrationCam::PulserColor_t fColor;  // Colour of the pulsed LEDs
    101100
    102   MBadPixelsIntensityCam *fIntensBad;     //! Bad Pixels intensity calibration storage container 
    103101  MBadPixelsCam    *fBadPixels;           //! Bad Pixels storage container
    104102  MCalibrationIntensityCam *fIntensCam;   //! Intensity Calibration Cam with the results
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc

    r8365 r8417  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.55 2007-03-04 14:46:44 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.56 2007-04-18 15:33:56 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    150150#include "MGeomPix.h"
    151151
    152 #include "MBadPixelsIntensityCam.h"
    153152#include "MBadPixelsCam.h"
    154153#include "MBadPixelsPix.h"
     
    429428{
    430429 
    431   MBadPixelsCam *badcam    = fIntensBad
    432     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    433 
    434430  TH1F *h;
    435431
     
    450446        pix.SetBinningAbsTime(higainsamples, -0.5, higainsamples-0.5);
    451447
    452         InitHists(pix,(*badcam)[i],i);
     448        InitHists(pix,(*fBadPixels)[i], i);
    453449
    454450        h = pix.GetHAbsTime();
     
    541537
    542538
    543   MBadPixelsCam *badcam    = fIntensBad
    544     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    545 
    546539  const Int_t logainsamples = fRunHeader->GetNumSamplesLoGain();
    547540
     
    564557          pix.SetBlackoutLimit(fgLoGainBlackoutLimit);
    565558
    566           InitHists(pix,(*badcam)[i],i);
     559          InitHists(pix,(*fBadPixels)[i], i);
    567560
    568561          h = pix.GetHAbsTime();
     
    870863
    871864  MCalibrationCam *chargecam = fIntensCam ? fIntensCam->GetCam() : fCam;
    872   MBadPixelsCam   *badcam    = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    873865
    874866  const Int_t hifirst = fSignal->GetFirstUsedSliceHiGain();
     
    899891        }
    900892
    901       MBadPixelsPix &bad = (*badcam)[i];
     893      MBadPixelsPix &bad = (*fBadPixels)[i];
    902894
    903895      h = histhi.GetHGausHist();
     
    929921       
    930922        MHCalibrationChargePix &histlo = (MHCalibrationChargePix&)(*this)(i);
    931         MBadPixelsPix          &bad    = (*badcam)[i];
    932923       
    933924        if (histlo.IsExcluded())
    934925          continue;
    935926
     927        MBadPixelsPix &bad = (*fBadPixels)[i];
    936928        if (histlo.GetSaturated() > fNumLoGainSaturationLimit*histlo.GetHGausHist()->GetEntries())
    937929          {
     
    10551047  // Perform the fitting for the High Gain (done in MHCalibrationCam)
    10561048  //
    1057   FitHiGainArrays(*chargecam, *badcam,
     1049  FitHiGainArrays(*chargecam, *fBadPixels,
    10581050                  MBadPixelsPix::kHiGainNotFitted,
    10591051                  MBadPixelsPix::kHiGainOscillating);
     
    10631055  //
    10641056  if (IsLoGain())
    1065     FitLoGainArrays(*chargecam, *badcam,
     1057    FitLoGainArrays(*chargecam, *fBadPixels,
    10661058                    MBadPixelsPix::kLoGainNotFitted,
    10671059                    MBadPixelsPix::kLoGainOscillating);
     
    10901082          continue;
    10911083
    1092       MBadPixelsPix &bad = (*badcam)[i];
     1084      MBadPixelsPix &bad = (*fBadPixels)[i];
    10931085      bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun);
    10941086      bad.SetUncalibrated(MBadPixelsPix::kLoGainBlackout);
     
    11511143{
    11521144
    1153   MBadPixelsCam   *badcam    = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    11541145  MCalibrationCam *chargecam = fIntensCam ? fIntensCam->GetCam() : fCam;
    11551146     
    1156   for (Int_t i=0; i<badcam->GetSize(); i++)
     1147  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
    11571148    {
    11581149     
    1159       MBadPixelsPix    &bad    = (*badcam)[i];
     1150      MBadPixelsPix    &bad    = (*fBadPixels)[i];
    11601151      MCalibrationPix  &pix    = (*chargecam)[i];
    11611152
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc

    r8132 r8417  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationHiLoCam.cc,v 1.20 2006-10-19 14:01:49 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCalibrationHiLoCam.cc,v 1.21 2007-04-18 15:33:56 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    116116#include "MGeomPix.h"
    117117
    118 #include "MBadPixelsIntensityCam.h"
    119118#include "MBadPixelsCam.h"
    120119#include "MBadPixelsPix.h"
     
    718717
    719718  MCalibrationCam *hilocam = fCam;
    720   MBadPixelsCam   *badcam  = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    721719
    722720  const Int_t nareas   = fAverageHiGainAreas->GetSize();
     
    766764
    767765
    768   FitHiGainArrays(*hilocam,*badcam,
     766  FitHiGainArrays(*hilocam, *fBadPixels,
    769767                  MBadPixelsPix::kHiLoNotFitted,
    770768                  MBadPixelsPix::kHiLoOscillating);
     
    843841  }
    844842
    845   FitLoGainArrays(*hilocam,*badcam,
     843  FitLoGainArrays(*hilocam, *fBadPixels,
    846844                  MBadPixelsPix::kHiLoNotFitted,
    847845                  MBadPixelsPix::kHiLoOscillating);
     
    859857{
    860858
    861   MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    862 
    863   for (Int_t i=0; i<badcam->GetSize(); i++)
    864     {
    865       MBadPixelsPix          &bad    = (*badcam)[i];
     859  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
     860    {
     861      MBadPixelsPix &bad = (*fBadPixels)[i];
    866862
    867863      if (bad.IsUncalibrated( MBadPixelsPix::kHiLoNotFitted ))
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc

    r8361 r8417  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.34 2007-03-04 11:55:55 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.35 2007-04-18 15:33:56 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    124124#include "MHCalibrationPix.h"
    125125#include "MCalibrationIntensityCam.h"
    126 #include "MBadPixelsIntensityCam.h"
    127126
    128127#include "MGeomCam.h"
     
    308307        pix.SetBinning(fNbins, fFirst, fLast);
    309308
    310         MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
    311         InitHists(pix,bad,i);
     309        InitHists(pix, (*fBadPixels)[i], i);
    312310
    313311        if (fCam)
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc

    r8359 r8417  
    107107#include "MGeomPix.h"
    108108
    109 #include "MBadPixelsIntensityCam.h"
    110109#include "MBadPixelsCam.h"
    111110#include "MBadPixelsPix.h"
     
    448447
    449448  MCalibrationCam *relcam = fIntensCam ? fIntensCam->GetCam() : fCam;
    450   MBadPixelsCam   *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    451449
    452450  const Int_t nareas = fAverageHiGainAreas->GetSize();
     
    542540    }
    543541
    544   FitHiGainArrays(*relcam,*badcam,
     542  FitHiGainArrays(*relcam, *fBadPixels,
    545543                  MBadPixelsPix::kRelTimeNotFitted,
    546544                  MBadPixelsPix::kRelTimeOscillating);
    547545
    548546  if (IsLoGain())       
    549     FitLoGainArrays(*relcam,*badcam,
     547    FitLoGainArrays(*relcam, *fBadPixels,
    550548                    MBadPixelsPix::kRelTimeNotFitted,
    551549                    MBadPixelsPix::kRelTimeOscillating);
     
    563561{
    564562
    565   MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    566 
    567   for (Int_t i=0; i<badcam->GetSize(); i++)
    568     {
    569       MBadPixelsPix          &bad    = (*badcam)[i];
     563  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
     564    {
     565      MBadPixelsPix &bad = (*fBadPixels)[i];
    570566
    571567      if (bad.IsUncalibrated( MBadPixelsPix::kRelTimeNotFitted ))
  • trunk/MagicSoft/Mars/mhcalib/MHPedestalCam.cc

    r8339 r8417  
    104104#include "MCalibrationPix.h"
    105105
    106 #include "MBadPixelsIntensityCam.h"
    107106#include "MBadPixelsCam.h"
    108107
     
    127126const TString MHPedestalCam::gsHistYTitle = "Nr. events";
    128127const TString MHPedestalCam::fgNamePedestalCam = "MPedestalCam";
     128
    129129// --------------------------------------------------------------------------
    130130//
     
    375375        pix.SetProbLimit(fProbLimit);
    376376
    377         MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
    378         InitHists(pix,bad,i);
     377        InitHists(pix, (*fBadPixels)[i], i);
    379378      }
    380379  }
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.h

    r7013 r8417  
    55#include "MJCalib.h"
    66#endif
    7 #ifndef MARS_MCalibrationIntensityChargeCam
    8 #include "MCalibrationIntensityChargeCam.h"
    9 #endif
    107#ifndef MARS_MCalibrationChargeCam
    118#include "MCalibrationChargeCam.h"
    12 #endif
    13 #ifndef MARS_MCalibrationIntensityBlindCam
    14 #include "MCalibrationIntensityBlindCam.h"
    159#endif
    1610#ifndef MARS_MCalibrationBlindCam
     
    2014#include "MCalibrationChargePINDiode.h"
    2115#endif
    22 #ifndef MARS_MCalibrationIntensityRelTimeCam
    23 #include "MCalibrationIntensityRelTimeCam.h"
    24 #endif
    2516#ifndef MARS_MCalibrationRelTimeCam
    2617#include "MCalibrationRelTimeCam.h"
    2718#endif
    28 #ifndef MARS_MCalibrationIntensityQECam
    29 #include "MCalibrationIntensityQECam.h"
    30 #endif
    3119#ifndef MARS_MCalibrationQECam
    3220#include "MCalibrationQECam.h"
    33 #endif
    34 #ifndef MARS_MBadPixelsIntensityCam
    35 #include "MBadPixelsIntensityCam.h"
    3621#endif
    3722#ifndef MARS_MBadPixelsCam
     
    10287  MExtractTime   *fTimeExtractor;                       // Arrival Time extractor
    10388 
    104   MBadPixelsIntensityCam          fIntensBadCam;        // Bad Pixels cam, can be set from previous runs
    10589  MBadPixelsCam                   fBadPixels;           // Bad Pixels cam, can be set from previous runs 
    106   MCalibrationIntensityChargeCam  fIntensCalibCam;      // Calibration conversion factors FADC2Phe for diff. intens.
    10790  MCalibrationChargeCam           fCalibrationCam;      // Calibration conversion factors FADC2Phe 
    108   MCalibrationIntensityBlindCam   fIntensBlindCam;      // Calibration from Blind Pixel(s)
    10991  MCalibrationBlindCam            fCalibrationBlindCam; // Calibration from Blind Pixel(s) 
    11092  MCalibrationChargePINDiode      fCalibrationPINDiode; // Calibration from PIN Diode
    111   MCalibrationIntensityQECam      fIntensQECam;         // Quantum efficiency for diff. intensities,
    11293  MCalibrationQECam               fQECam;               // Quantum efficiency, can be set from previous runs
    113   MCalibrationIntensityRelTimeCam fIntensRelTimeCam;    // Calibration constants rel. times for diff. intensities
    11494  MCalibrationRelTimeCam          fRelTimeCam;          // Calibration constants rel. times
    11595 
     
    127107  Display_t fDisplayType;                              // Chosen Display type
    128108 
    129   enum { kRelTimes, kDebug, kIntensity };  // Possible flags
     109  enum { kRelTimes, kDebug };                          // Possible flags
    130110
    131111  Byte_t fFlags;                                       // Bit-field for the flags
     
    135115  Bool_t IsRelTimes     () const { return TESTBIT(fFlags,kRelTimes);       }
    136116  Bool_t IsDebug        () const { return TESTBIT(fFlags,kDebug);          }
    137   Bool_t IsIntensity    () const { return TESTBIT(fFlags,kIntensity);      }
    138117
    139118  void   DrawTab(MParList &plist, const char *cont, const char *name, Option_t *opt);
     
    162141public:
    163142  MJCalibration(const char *name=NULL, const char *title=NULL);
    164  
    165   MCalibrationIntensityChargeCam  &GetIntensCalibrationCam() { return fIntensCalibCam;   }
    166   MCalibrationIntensityRelTimeCam &GetIntensRelTimeCam()     { return fIntensRelTimeCam; }
    167   MCalibrationIntensityQECam      &GetIntensQECam()          { return fIntensQECam;      }
    168   MBadPixelsIntensityCam          &GetIntensBadCam()         { return fIntensBadCam;     } 
    169143
    170   MCalibrationChargeCam           &GetCalibrationCam()       { return fCalibrationCam;  }
    171   MCalibrationRelTimeCam          &GetRelTimeCam()           { return fRelTimeCam;       }
    172   MCalibrationQECam               &GetQECam()                { return fQECam;            }
    173   MBadPixelsCam                   &GetBadPixels()            { return fBadPixels;        }
     144  const MCalibrationChargeCam  &GetCalibrationCam() const { return fCalibrationCam; }
     145  const MCalibrationRelTimeCam &GetRelTimeCam()     const { return fRelTimeCam;     }
     146  const MCalibrationQECam      &GetQECam()          const { return fQECam;          }
     147  const MBadPixelsCam          &GetBadPixels()      const { return fBadPixels;      }
    174148 
    175149  // Containers and pointers
     
    192166  void SetRelTimeCalibration( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kRelTimes)  : CLRBIT(fFlags,kRelTimes); }
    193167  void SetDebug             ( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kDebug)     : CLRBIT(fFlags,kDebug); }
    194   void SetIntensity         ( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kIntensity) : CLRBIT(fFlags,kIntensity); }
     168  //void SetIntensity         ( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kIntensity) : CLRBIT(fFlags,kIntensity); }
    195169 
    196170  // Files
Note: See TracChangeset for help on using the changeset viewer.