Ignore:
Timestamp:
08/16/04 17:08:44 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbadpixels
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.cc

    r4608 r4632  
    5555#include "MBadPixelsCalc.h"
    5656
     57#include <TEnv.h>
    5758#include <TArrayD.h>
    5859
     
    102103    if (fPedestalLevel>0)
    103104    {
    104       fPedPhotCam = (MPedPhotCam*)pList->FindObject(AddSerialNumber(fNamePedPhotContainer), "MPedPhotCam");
     105        fPedPhotCam = (MPedPhotCam*)pList->FindObject(AddSerialNumber(fNamePedPhotContainer), "MPedPhotCam");
    105106        if (!fPedPhotCam)
    106107        {
     
    115116            return kFALSE;
    116117        }
    117 
    118         /*        fSigmabar = (MSigmabar*)pList->FindObject(AddSerialNumber("MSigmabar"));
    119         if (!fSigmabar)
    120         {
    121             *fLog << err << "MSigmabar not found... aborting." << endl;
    122             return kFALSE;
    123         }
    124         */
    125118    }
    126119    return kTRUE;
     
    158151}
    159152*/
    160 // --------------------------------------------------------------------------
     153
     154// --------------------------------------------------------------------------
     155//
    161156// Check the pedestal Rms of the pixels: compute with 2 iterations the mean
    162157// for inner and outer pixels. Set as blind the pixels with too small or
     
    257252Int_t MBadPixelsCalc::Process()
    258253{
    259   if (fPedestalLevel>0){
    260     CheckPedestalRms();
    261     fPedPhotCam->ReCalc(*fGeomCam,fBadPixels);
    262   }
    263   return kTRUE;
    264 }
    265 
    266 
     254    if (fPedestalLevel>0)
     255    {
     256        CheckPedestalRms();
     257        fPedPhotCam->ReCalc(*fGeomCam, fBadPixels);
     258    }
     259    return kTRUE;
     260}
     261
     262// --------------------------------------------------------------------------
     263//
     264// Read the setup from a TEnv, eg:
     265//   MBadPixelsCalc.PedestalLevel: 3.0
     266//
     267Int_t MBadPixelsCalc::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
     268{
     269    Bool_t rc = kFALSE;
     270    if (IsEnvDefined(env, prefix, "PedestalLevel"))
     271    {
     272        rc = kTRUE;
     273        SetPedestalLevel(GetEnvValue(env, prefix, "PedestalLevel", fPedestalLevel));
     274    }
     275    return rc;
     276}
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.h

    r4586 r4632  
    77
    88class MBadPixelsCam;
    9 //class MSigmabar;
    109class MGeomCam;
    1110class MPedPhotCam;
     
    1514private:
    1615    MGeomCam      *fGeomCam;    //! Input container storing the pixel sizes
    17     //    MSigmabar     *fSigmabar;   //! Input container storing mean pedestal rms of the camera
    1816    MPedPhotCam   *fPedPhotCam; //! Input container storing the pedestal and pedestal rms of all pixels
    19 
    2017    MBadPixelsCam *fBadPixels;  //! Output container holding the bad pixels
    2118
     
    2825    Int_t PreProcess(MParList *pList);
    2926    Int_t Process();
     27    Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
    3028
    3129public:
Note: See TracChangeset for help on using the changeset viewer.