Ignore:
Timestamp:
09/07/04 18:31:53 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r4874 r4887  
    3535#include "MBadPixelsCam.h"
    3636#include "MGeomCam.h"
    37 #include "MPedPhotCam.h"
    3837#include "MParList.h"
    3938#include "MBinning.h"
     
    5150//
    5251MHBadPixels::MHBadPixels(const char *name, const char *title)
     52    : fNamePedPhotCam("MPedPhotCam")
    5353{
    5454    fName  = name  ? name  : "MHBadPixels";
     
    6767    fBadN.SetYTitle("number of bad pixels");
    6868
    69     fNamePedPhotCam = "MPedPhotCamFromData";
    7069}
    7170
     
    7978    if (!fCam)   
    8079    {
    81         *fLog << err << "MHBadPixels::SetupFill; MGeomCam not found... aborting." << endl;
     80        *fLog << err << "MGeomCam not found... aborting." << endl;
    8281        return kFALSE;
    8382    }
    84     *fLog << "MHBadPixels::SetupFill; fCam = " << fCam << endl;
    85 
    8683    fPointPos = (MPointingPos*)plist->FindObject("MPointingPos");
    8784    if (!fPointPos)
     
    9188    }
    9289
    93    
    94     fPedPhot = (MPedPhotCam*)plist->FindObject(AddSerialNumber(fNamePedPhotCam), "MPedPhotCam");
    95     if (!fPedPhot)
    96     {
    97         *fLog << err << AddSerialNumber(fNamePedPhotCam)
    98               << "[MPedPhotCam] not found... aborting." << endl;
    99         return kFALSE;
    100     }
    101     fPedPhot->InitSize(fCam->GetNumPixels());
    102 
    10390    //----------------------------------------------------
    10491    // Get Theta Binning
     
    10693    if (!binstheta)
    10794    {
    108         *fLog << err << "Object 'BinningTheta' [MBinning] not found... aborting" << endl;
     95        *fLog << err << "BinningTheta [MBinning] not found... aborting" << endl;
    10996        return kFALSE;
    11097    }
    11198
    11299    // Get binning for pixel number
    113     const UInt_t npix1 = fPedPhot->GetSize()+1;
    114 
    115     *fLog << "MHBadPixels::SetupFill; npix1 = " << npix1 << endl;
     100    const UInt_t npix1 = fCam->GetNumPixels()+1;
    116101
    117102    MBinning binspix("BinningPixel");
     
    121106    SetBinning(&fBadId, binstheta, &binspix);
    122107    SetBinning(&fBadN,  binstheta, &binspix);
    123 
    124     //----------------------------------------------------
    125     *fLog << inf << "Name of MPedPhotCam container : " << fNamePedPhotCam
    126           << endl;
    127108
    128109    return kTRUE;
     
    141122    Double_t theta = fPointPos->GetZd();
    142123
    143     const MBadPixelsCam *fBadPixels = (MBadPixelsCam*)par;
     124    const MBadPixelsCam *badpixels = (MBadPixelsCam*)par;
    144125
    145     const UInt_t entries = fPedPhot->GetSize();
     126    const UInt_t entries = badpixels->GetSize();
     127
    146128    UInt_t nb = 0;
    147129    for (UInt_t i=0; i<entries; i++)
    148130    {
    149       //*fLog << "MHBadPixels::Fill; i = " << i << endl;
    150 
    151       if ( (*fBadPixels)[i].IsUnsuitable() )
    152       {
    153         //*fLog << "MHBadPixels::Fill; (UnSuitable) " << endl;
    154 
    155           fBadId.Fill(theta, i, w);
    156           nb++;
    157       }   
     131        if ( (*badpixels)[i].IsUnsuitable() )
     132        {
     133            fBadId.Fill(theta, i, w);
     134            nb++;
     135        }
    158136    }
    159137    fBadN.Fill(theta, nb, w);
     
    204182    pad->Update();
    205183}
    206 //==========================================================================
    207 
    208 
    209 
    210 
    211 
    212 
    213 
    214 
    215 
    216 
    217 
Note: See TracChangeset for help on using the changeset viewer.