Changeset 9851 for trunk/Mars/mimage


Ignore:
Timestamp:
08/12/10 09:43:02 (14 years ago)
Author:
tbretz
Message:
Changed MH::SetBinning and similar functions to take references instead of pointers as arguments. For convenience wrappers for the old style functions are provided.
Location:
trunk/Mars/mimage
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mimage/MHHillas.cc

    r9350 r9851  
    157157
    158158
    159     ApplyBinning(*plist, "Width",  fWidth);
    160     ApplyBinning(*plist, "Length", fLength);
    161     ApplyBinning(*plist, "Dist",   fDistC);
    162     ApplyBinning(*plist, "Delta",  fDelta);
    163     ApplyBinning(*plist, "Size",   fSize);
     159    ApplyBinning(*plist, "Width",  *fWidth);
     160    ApplyBinning(*plist, "Length", *fLength);
     161    ApplyBinning(*plist, "Dist",   *fDistC);
     162    ApplyBinning(*plist, "Delta",  *fDelta);
     163    ApplyBinning(*plist, "Size",   *fSize);
    164164
    165165    const MBinning *bins = (MBinning*)plist->FindObject("BinningCamera");
     
    168168        const Float_t r = fGeomCam->GetMaxRadius()*fGeomCam->GetConvMm2Deg();
    169169
    170         MBinning b;
    171         b.SetEdges(61, -r, r);
    172         SetBinning(fCenter, &b, &b);
     170        const MBinning b(61, -r, r);
     171        SetBinning(*fCenter, b, b);
    173172    }
    174173    else
    175         SetBinning(fCenter, bins, bins);
     174        SetBinning(*fCenter, *bins, *bins);
    176175
    177176
  • trunk/Mars/mimage/MHHillasExt.cc

    r9362 r9851  
    129129    binsx.Apply(fHAsym);
    130130
    131     binsx.SetEdges(100,     0, 1.5);
    132     binsy.SetEdges(100,    -9,    9);
    133     MH::SetBinning(&fHSlopeL, &binsx, &binsy);
     131    binsx.SetEdges(100,   0, 1.5);
     132    binsy.SetEdges(100,  -9,   9);
     133    MH::SetBinning(fHSlopeL, binsx, binsy);
    134134}
    135135
     
    167167    }
    168168
    169     ApplyBinning(*plist, "Asym", &fHAsym);
    170     ApplyBinning(*plist, "M3Long", &fHM3Long);
    171     ApplyBinning(*plist, "M3Trans", &fHM3Trans);
    172     ApplyBinning(*plist, "Dist", "Slope", &fHSlopeL);
     169    ApplyBinning(*plist, "Asym",             fHAsym);
     170    ApplyBinning(*plist, "M3Long",           fHM3Long);
     171    ApplyBinning(*plist, "M3Trans",          fHM3Trans);
     172    ApplyBinning(*plist, "Dist",    "Slope", fHSlopeL);
    173173
    174174    return kTRUE;
  • trunk/Mars/mimage/MHHillasSrc.cc

    r9350 r9851  
    135135    }
    136136
    137     ApplyBinning(*plist, "Alpha",    fAlpha);
    138     ApplyBinning(*plist, "Dist",     fDist);
    139     ApplyBinning(*plist, "DCA",      fDCA);
    140     ApplyBinning(*plist, "DCADelta", fDCADelta);
     137    ApplyBinning(*plist, "Alpha",    *fAlpha);
     138    ApplyBinning(*plist, "Dist",     *fDist);
     139    ApplyBinning(*plist, "DCA",      *fDCA);
     140    ApplyBinning(*plist, "DCADelta", *fDCADelta);
    141141
    142142    return kTRUE;
  • trunk/Mars/mimage/MHImagePar.cc

    r9344 r9851  
    145145Bool_t MHImagePar::SetupFill(const MParList *plist)
    146146{
    147     ApplyBinning(*plist, "Pixels",  &fHistSatLo);
    148     ApplyBinning(*plist, "Pixels",  &fHistSatHi);
    149     ApplyBinning(*plist, "Pixels",  &fHistNumSP);
    150 
    151     ApplyBinning(*plist, "Islands", &fHistIslands);
    152 
    153     ApplyBinning(*plist, "Size",    &fHistSizeSubIslands);
    154     ApplyBinning(*plist, "Size",    &fHistSizeMainIsland);
    155     ApplyBinning(*plist, "Size",    &fHistSizeSP);
     147    ApplyBinning(*plist, "Pixels",  fHistSatLo);
     148    ApplyBinning(*plist, "Pixels",  fHistSatHi);
     149    ApplyBinning(*plist, "Pixels",  fHistNumSP);
     150
     151    ApplyBinning(*plist, "Islands", fHistIslands);
     152
     153    ApplyBinning(*plist, "Size",    fHistSizeSubIslands);
     154    ApplyBinning(*plist, "Size",    fHistSizeMainIsland);
     155    ApplyBinning(*plist, "Size",    fHistSizeSP);
    156156
    157157    return kTRUE;
  • trunk/Mars/mimage/MHNewImagePar.cc

    r9343 r9851  
    197197    }
    198198
    199     ApplyBinning(*plist, "Leakage", &fHistLeakage1);
    200     ApplyBinning(*plist, "Leakage", &fHistLeakage2);
    201 
    202     ApplyBinning(*plist, "Pixels",  &fHistUsedPix);
    203     ApplyBinning(*plist, "Pixels",  &fHistCorePix);
    204 
    205     //ApplyBinning(*plist, "Area",    &fHistUsedArea);
    206     //ApplyBinning(*plist, "Area",    &fHistCoreArea);
    207 
    208     ApplyBinning(*plist, "Conc",     &fHistConc);
    209     ApplyBinning(*plist, "Conc1",    &fHistConc1);
    210     ApplyBinning(*plist, "ConcCOG",  &fHistConcCOG);
    211     ApplyBinning(*plist, "ConcCore", &fHistConcCore);
     199    ApplyBinning(*plist, "Leakage", fHistLeakage1);
     200    ApplyBinning(*plist, "Leakage", fHistLeakage2);
     201
     202    ApplyBinning(*plist, "Pixels",  fHistUsedPix);
     203    ApplyBinning(*plist, "Pixels",  fHistCorePix);
     204
     205    //ApplyBinning(*plist, "Area",    fHistUsedArea);
     206    //ApplyBinning(*plist, "Area",    fHistCoreArea);
     207
     208    ApplyBinning(*plist, "Conc",     fHistConc);
     209    ApplyBinning(*plist, "Conc1",    fHistConc1);
     210    ApplyBinning(*plist, "ConcCOG",  fHistConcCOG);
     211    ApplyBinning(*plist, "ConcCore", fHistConcCore);
    212212
    213213    return kTRUE;
  • trunk/Mars/mimage/MHVsSize.cc

    r9343 r9851  
    100100    fM3Long.SetYTitle("M3Long [\\circ]");
    101101
    102     MBinning binse, binsl, binsd, binsc, binsa, binsm;
    103     binse.SetEdgesLog( 50,   10, 1e5);
    104     binsl.SetEdges(   100,    0, 0.5);
    105     binsd.SetEdges(   100,    0, 2.0);
    106     binsc.SetEdgesLog(100, 3e-3, 1);
    107     binsa.SetEdges(   100,    0, 0.25);
    108     binsm.SetEdges(   100, -1.5, 1.5);
    109 
    110     MH::SetBinning(&fLength, &binse, &binsl);
    111     MH::SetBinning(&fWidth,  &binse, &binsl);
    112     MH::SetBinning(&fDist,   &binse, &binsd);
    113     MH::SetBinning(&fConc1,  &binse, &binsc);
    114     MH::SetBinning(&fArea,   &binse, &binsa);
    115     MH::SetBinning(&fM3Long, &binse, &binsm);
     102    const MBinning binse( 50,   10, 1e5, "", "log");
     103    const MBinning binsc(100, 3e-3, 1,   "", "log");
     104    const MBinning binsl(100,    0, 0.5);
     105    const MBinning binsd(100,    0, 2.0);
     106    const MBinning binsa(100,    0, 0.25);
     107    const MBinning binsm(100, -1.5, 1.5);
     108
     109    MH::SetBinning(fLength, binse, binsl);
     110    MH::SetBinning(fWidth,  binse, binsl);
     111    MH::SetBinning(fDist,   binse, binsd);
     112    MH::SetBinning(fConc1,  binse, binsc);
     113    MH::SetBinning(fArea,   binse, binsa);
     114    MH::SetBinning(fM3Long, binse, binsm);
    116115
    117116    fLength.UseCurrentStyle();
Note: See TracChangeset for help on using the changeset viewer.