Changeset 8274


Ignore:
Timestamp:
01/29/07 12:49:21 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8273 r8274  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2007/01/27 Thomas Bretz
     22
     23   * manalysis/MMcCalibrationUpdate.cc:
     24     - fixed a typo in a comment
     25
     26   * mcalib/MCalibrateData.[h,cc]:
     27     - commented out some obsolete currently unused code
     28
     29   * mdata/MDataPhrase.cc:
     30     - added a sanity check
     31
     32   * mpedestal/MMcPedestalCopy.cc:
     33     - Changed output to fit the structure used in all other classes
     34
     35
    2036
    2137 2007/01/27 Daniela Dorner
  • trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc

    r7876 r8274  
    2727//  MMcCalibrationUpdate
    2828//
    29 //  This task looks for the ìnformation about FADC pedestals in
     29//  This task looks for the information about FADC pedestals in
    3030//  MMcFadcHeader and translates it to the pedestal mean and rms (in adc counts).
    3131//  If not already existing in the parameter list, an MCalibrationCam object
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc

    r8132 r8274  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MCalibrateData.cc,v 1.61 2006-10-19 13:58:29 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MCalibrateData.cc,v 1.62 2007-01-29 12:46:55 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    159159    : fGeomCam(NULL),   fBadPixels(NULL), fCalibrations(NULL), fIntensCalib(NULL),
    160160      fQEs(NULL), fIntensQE(NULL), fSignals(NULL), fCerPhotEvt(NULL), fCalibConstCam(NULL),
    161       fIntensConst(NULL), fPedestalFlag(kNo), fSignalType(kPhot), fRenormFactor(1.),
    162       fScaleFactor(1.)
     161    fIntensConst(NULL), /*fPedestalExt(NULL), fPedestalRndm(NULL), fPedPhotCam(NULL),*/
     162    fPedestalFlag(kNo), fSignalType(kPhot), fRenormFactor(1.), fScaleFactor(1.)
    163163{
    164164
     
    216216        return kFALSE;
    217217    }
     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    */
    218237
    219238    fSignals    = 0;
     
    795814        } /* if (data) */
    796815     
    797 
    798816        if (pedestal)
    799817        {
     
    816834              (*pedphot)[pixidx].Set(mean, rms);
    817835              pedphot->SetReadyToSave();
     836              //break;
    818837            }
     838           /*
     839            const Double_t mean = (*fPedestalExt)[pixidx].GetPedestal()    * pedmeancalib;
     840            const Double_t rms  = (*fPedestalExt)[pixidx].GetPedestalRms() * pedrmscalib;
     841
     842            (*fPedPhotCam)[pixidx].Set(mean, rms);
     843            fPedPhotCam->SetReadyToSave();
     844            */
    819845        } /* if (pedestal) */
    820846    }
     847
     848    // Now we should take the bias (MPedPhotExtractor/Mean) and
     849    // pedestal rms (MPedPhotExtractorRndm/Rms) and store it
     850    // into MSignalPix
    821851
    822852    if (data)
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.h

    r7804 r8274  
    7272  MCalibConstCam                 *fCalibConstCam; //! Temporary calib consts storage
    7373  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
    7477 
    7578  CalibrationMode_t fCalibrationMode;    // Flag defining the calibration mode (CalibrationMode_t)
     
    9093  MArrayF fHiLoConv;                     //! Array of calibration constants for each pixel, calculated only once!
    9194  MArrayF fHiLoConvErr;                  //! Array of calibration F-Factors for each pixel, calculated only once! 
    92  
     95
    9396  Int_t  Calibrate(Bool_t data, Bool_t pedestal) const;
    94  
     97
    9598  Int_t  PreProcess(MParList *pList);
    9699  Bool_t ReInit(MParList *pList);
     
    98101  Int_t  ReadEnv(const TEnv &env, TString prefix, Bool_t print);
    99102  void   StreamPrimitive(ostream &out) const;
    100  
     103
    101104public:
    102105    MCalibrateData(CalibrationMode_t calmode=gkDefault,
    103106                   const char *name=NULL, const char *title=NULL);
    104  
     107
    105108  void   AddPedestal(const char *name="Cam");
    106109  void   AddPedestal(const char *pedestal, const char *pedphot);
  • trunk/MagicSoft/Mars/mdata/MDataPhrase.cc

    r8149 r8274  
    519519Bool_t MDataPhrase::PreProcess(const MParList *plist)
    520520{
     521    if (!fFormula)
     522    {
     523        *fLog << err << "Error - So far no valid phrase was setup." << endl;
     524        return kFALSE;
     525    }
     526
    521527    TIter Next(&fMembers);
    522528
  • trunk/MagicSoft/Mars/mpedestal/MMcPedestalCopy.cc

    r7188 r8274  
    9090}
    9191
    92 
    93 
    9492// --------------------------------------------------------------------------
    9593//
     
    9896Int_t  MMcPedestalCopy::PreProcess(MParList *pList)
    9997{
    100   if ( ! pList->FindObject(AddSerialNumber("MPedestalCam")) )
    101     pList->FindCreateObj(AddSerialNumber("MPedestalCam"));
    102 
    103   return kTRUE;
     98    return pList->FindCreateObj(AddSerialNumber("MPedestalCam")) ? kTRUE : kFALSE;
    10499}
    105100
     
    127122    if (!fadc)
    128123    {
    129         *fLog << err << dbginf << "MMcFadcHeader not found... aborting." << endl;
     124        *fLog << err << "MMcFadcHeader not found... aborting." << endl;
    130125        return kFALSE;
    131126    }
     
    133128    MPedestalCam *pedcam = (MPedestalCam*)pList->FindObject(AddSerialNumber("MPedestalCam"));
    134129    if (!pedcam)
    135       {
    136         *fLog << err << dbginf << "Cannot create " << AddSerialNumber("MPedestalCam") <<"... Exiting." << endl;
    137 
     130    {
     131        *fLog << err << "MPedestalCam not found... aborting." << endl;
    138132        return kFALSE;
    139       }
     133    }
    140134
    141135    MMcRunHeader *mcrun = (MMcRunHeader*)pList->FindObject(AddSerialNumber("MMcRunHeader"));
Note: See TracChangeset for help on using the changeset viewer.