Ignore:
Timestamp:
02/16/04 11:12:04 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r3171 r3182  
    4949using namespace std;
    5050
    51 const UInt_t MExtractPINDiode::fgPINDiodeId      = 254;
     51const UInt_t MExtractPINDiode::fgPINDiodeIdx     = 999;
    5252const Byte_t MExtractPINDiode::fgSaturationLimit = 254;
    5353const Byte_t MExtractPINDiode::fgFirst =  1;
     
    6161    : fSaturationLimit(fgSaturationLimit)
    6262{
    63 
    64     fName  = name  ? name  : "MExtractPINDiode";
    65     fTitle = title ? title : "Task to extract the signal from the FADC slices";
    66 
    67     AddToBranchList("MRawEvtData.*");
    68 
    69     SetRange();
     63 
     64  fName  = name  ? name  : "MExtractPINDiode";
     65  fTitle = title ? title : "Task to extract the signal from the FADC slices";
     66 
     67  AddToBranchList("MRawEvtData.*");
     68 
     69  SetRange();
     70  SetPINDiodeIdx();
    7071}
    7172
     
    147148    fPINDiode->Clear();
    148149
    149     pixel.Jump(fgPINDiodeId);
     150    pixel.Jump(fPINDiodeIdx);
    150151 
    151152    UInt_t sum  = 0;
     
    161162               sum, sum2, sat, max);
    162163   
    163     const MPedestalPix &ped   = (*fPedestals)[fgPINDiodeId];
    164    
    165     const Float_t pedes  = ped.GetPedestal();
    166     const Float_t pedrms = ped.GetPedestalRms();
     164    const MPedestalPix &ped   = (*fPedestals)[fPINDiodeIdx];
     165
     166    Float_t pedes  = -999.;
     167    Float_t pedrms = -999.;
     168
     169    if (&ped)
     170      {
     171        pedes  = ped.GetPedestal();
     172        pedrms = ped.GetPedestalRms();
     173      }
     174    else
     175      {
     176        *fLog << warn << " Cannot find MPedestalPix of the PIN Diode (idx="
     177              << fPINDiodeIdx << ")" << endl;
     178
     179      }
    167180
    168181    const Float_t var = ((Float_t)sum2 - (Float_t)sum*sum/fNumSamples)/(fNumSamples-1);
Note: See TracChangeset for help on using the changeset viewer.