Changeset 4632


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

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4630 r4632  
    2626     - change to support also 'No calibration of data'
    2727     - removed obsolete dependancie on *'FromData' containers
     28     - added member function ReadEnv
    2829
    2930   * mbase/MTime.[h,cc]:
    3031     - added new member function SetStringFmt
     32
     33   * mcalib/MHCalibrationChargeBlindPix.cc:
     34     - removed unused variable
     35
     36   * mcalib/MHCalibrationChargeBlindPix.cc:
     37     - removed unused variable
    3138
    3239
     
    3946     - replace two gLog by *fLog
    4047     - add the pulser color (needed for the datacheck histograms)
     48
    4149   * mjobs/MJCalibration.[h,cc]
    4250     - some small modifications in the data-check display, discussed
  • 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:
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc

    r4628 r4632  
    9999#include <fstream>
    100100
     101#include <TEnv.h>
     102
    101103#include "MLog.h"
    102104#include "MLogManip.h"
     
    636638    }
    637639}
     640
     641// --------------------------------------------------------------------------
     642//
     643// Read the setup from a TEnv, eg:
     644//   MJPedestal.MCalibrateDate.PedestalFlag: no,run,event
     645//   MJPedestal.MCalibrateDate.CalibrationMode: skip,none,flatcharge,blindpixel,ffactor,pindiode,combined,dummy,default
     646//
     647Int_t MCalibrateData::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
     648{
     649    Bool_t rc = kFALSE;
     650    if (IsEnvDefined(env, prefix, "PedestalFlag"))
     651    {
     652        rc = kTRUE;
     653        TString s = GetEnvValue(env, prefix, "PedestalFlag", "");
     654        s.ToLower();
     655        if (s==(TString)"no")
     656            SetPedestalFlag(kNo);
     657        if (s==(TString)"run")
     658            SetPedestalFlag(kRun);
     659        if (s==(TString)"event")
     660            SetPedestalFlag(kEvent);
     661    }
     662
     663    if (IsEnvDefined(env, prefix, "CalibrationMode"))
     664    {
     665        rc = kTRUE;
     666        TString s = GetEnvValue(env, prefix, "CalibrationMode", "");
     667        s.ToLower();
     668        if (s==(TString)"skip")
     669            SetCalibrationMode(kSkip);
     670        if (s==(TString)"none")
     671            SetCalibrationMode(kNone);
     672        if (s==(TString)"flatcharge")
     673            SetCalibrationMode(kFlatCharge);
     674        if (s==(TString)"blindpixel")
     675            SetCalibrationMode(kBlindPixel);
     676        if (s==(TString)"ffactor")
     677            SetCalibrationMode(kFfactor);
     678        if (s==(TString)"pindiode")
     679            SetCalibrationMode(kPinDiode);
     680        if (s==(TString)"combined")
     681            SetCalibrationMode(kCombined);
     682        if (s==(TString)"dummy")
     683            SetCalibrationMode(kDummy);
     684        if (s==(TString)"default")
     685            SetCalibrationMode();
     686    }
     687
     688    return rc;
     689}
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.h

    r4628 r4632  
    6161  Bool_t ReInit(MParList *pList);
    6262  Int_t  Process();
    63 
    64   void   StreamPrimitive( ofstream &out ) const;
     63  Int_t  ReadEnv(const TEnv &env, TString prefix, Bool_t print);
     64  void   StreamPrimitive(ofstream &out) const;
    6565 
    6666public:
Note: See TracChangeset for help on using the changeset viewer.