Ignore:
Timestamp:
12/20/03 13:46:17 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc

    r2725 r2728  
    5656// Default constructor.
    5757//
    58 MExtractSignal::MExtractSignal(const Byte_t first, const Byte_t last, const Byte_t logainshift,
     58MExtractSignal::MExtractSignal(/*const Byte_t first, const Byte_t last, const Byte_t logainshift,*/
    5959                    const char *name, const char *title)
    60   : fNumHiGainSamples(last-first+1), fNumLoGainSamples(last-first+1),
     60  : /*fNumHiGainSamples(last-first+1), fNumLoGainSamples(last-first+1),*/
    6161    fSaturationLimit(254)
    6262{
     
    6767    AddToBranchList("MRawEvtData.*");
    6868
     69    SetRange();
     70    /*
     71     fFirst       = first;
     72     fLoGainFirst = first+logainshift;
     73
     74     fSqrtHiGainSamples = TMath::Sqrt((Float_t)fNumHiGainSamples);
     75     fSqrtLoGainSamples = TMath::Sqrt((Float_t)fNumLoGainSamples);
     76     */
     77}
     78
     79void MExtractSignal::SetRange(Byte_t first, Byte_t last, Byte_t logainshift)
     80{
     81    fNumHiGainSamples = last-first+1;
     82    fNumLoGainSamples = last-first+1;
     83
    6984    fFirst       = first;
    7085    fLoGainFirst = first+logainshift;
    7186
    72     fSqrtHiGainSamples = TMath::Sqrt((Float_t)fNumHiGainSamples); 
    73     fSqrtLoGainSamples = TMath::Sqrt((Float_t)fNumLoGainSamples); 
     87    fSqrtHiGainSamples = TMath::Sqrt((Float_t)fNumHiGainSamples);
     88    fSqrtLoGainSamples = TMath::Sqrt((Float_t)fNumLoGainSamples);
    7489}
    7590
     
    87102Int_t MExtractSignal::PreProcess(MParList *pList)
    88103{
    89 
    90104    fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
    91105    if (!fRawEvt)
    92106    {
    93         *fLog << dbginf << "MRawEvtData not found... aborting." << endl;
     107        *fLog << err << "MRawEvtData not found... aborting." << endl;
    94108        return kFALSE;
    95109    }
     
    103117    if (!fPedestals)
    104118      {
    105         *fLog << err << dbginf << "Cannot find MPedestalCam ... aborting" << endl;
     119        *fLog << err << "MPedestalCam not found... aborting" << endl;
    106120        return kFALSE;
    107121      }
     
    118132Bool_t MExtractSignal::ReInit(MParList *pList )
    119133{
    120  
    121 
    122134    MGeomCam *cam = (MGeomCam*)pList->FindObject(AddSerialNumber("MGeomCam"));
    123135    if (!cam)
     
    127139    }
    128140
     141    // FIXME: This solution may change in the future, MExtractedSignal
     142    //        must be similar to MCerPhotEvt not to MPedestalCam
     143    //        (Have to think about the mean size of both solutions)
    129144    fSignals->InitSize(cam->GetNumPixels());   
    130145
    131 
    132     fSignals->SetNumUsedFADCSlices(fNumHiGainSamples,fFirst,fFirst+fNumHiGainSamples-1,
    133                                    fNumLoGainSamples,fFirst,fFirst+fNumLoGainSamples-1);
     146    fSignals->SetNumUsedFADCSlices(fNumHiGainSamples, fFirst, fFirst+fNumHiGainSamples-1,
     147                                   fNumLoGainSamples, fFirst, fFirst+fNumLoGainSamples-1);
    134148
    135149    return kTRUE;
     
    144158Int_t MExtractSignal::Process()
    145159{
    146 
    147160    MRawEvtPixelIter pixel(fRawEvt);
    148161    fSignals->Clear();
    149162
    150163    while (pixel.Next())
    151       {
    152 
     164    {
    153165        UShort_t satHi = 0;
    154166        UShort_t satLo = 0;
     
    219231                               );
    220232
    221         pix.SetGainSaturation((satHi),satHi,satLo);
    222 
     233        pix.SetGainSaturation(satHi, satHi, satLo);
     234
     235        // FIXME: Arrival time has to be stored in MArrivalTime!
    223236        if (satHi)
    224237          pix.SetArrivalTimes((Float_t)(midlo+fFirst),0.,0.);
     
    233246    return kTRUE;
    234247}
    235 
    236 Int_t MExtractSignal::PostProcess()
    237 {
    238 
    239   return kTRUE;
    240 
    241 }
Note: See TracChangeset for help on using the changeset viewer.