Changeset 9851 for trunk/Mars/mhflux


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/mhflux
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mhflux/MHAlpha.cc

    r9576 r9851  
    142142    binsa.Apply(fHistTime);
    143143
    144     MH::SetBinning(&fHist, &binst, &binse, &binsa);
     144    MH::SetBinning(fHist, binst, binse, binsa);
    145145}
    146146
     
    334334    binst.Apply(fHTheta);
    335335    binsa.Apply(fHistTime);
    336     MH::SetBinning(&fHist, &binst, &binse, &binsa);
     336    MH::SetBinning(fHist, binst, binse, binsa);
    337337
    338338    MAlphaFitter *fit = (MAlphaFitter*)pl->FindObject("MAlphaFitter");
     
    353353    // If this is the first call we have to initialize the time-histogram
    354354    //
    355     MBinning bins;
    356     bins.SetEdges(1, t.GetAxisTime()-60, t.GetAxisTime());
     355    const MBinning bins(1, t.GetAxisTime()-60, t.GetAxisTime());
    357356    bins.Apply(fHTime);
    358357
  • trunk/Mars/mhflux/MHCollectionArea.cc

    r9422 r9851  
    109109    binse.Apply(fHEnergy);
    110110
    111     MH::SetBinning(&fHistSel, &binst, &binse);
    112     MH::SetBinning(&fHistAll, &binst, &binse);
     111    MH::SetBinning(fHistSel, binst, binse);
     112    MH::SetBinning(fHistAll, binst, binse);
    113113
    114114    // For some unknown reasons this must be called after
     
    202202    binse.Apply(fHEnergy);
    203203
    204     MH::SetBinning(&fHistSel, &binst, &binse);
    205     MH::SetBinning(&fHistAll, &binst, &binse);
     204    MH::SetBinning(fHistSel, binst, binse);
     205    MH::SetBinning(fHistAll, binst, binse);
    206206
    207207    fMcAreaRadius   = -1;
  • trunk/Mars/mhflux/MHDisp.cc

    r9301 r9851  
    132132    binsx.SetEdges(fHist, 'x');
    133133    binsy.SetEdges(fHist, 'y');
    134     MH::SetBinning(&fHistBg, &binsx, &binsy);
     134    MH::SetBinning(fHistBg, binsx, binsy);
    135135
    136136    if (!fHistOff)
    137137    {
    138         MH::SetBinning(&fHistBg1, &binsx, &binsy);
    139         MH::SetBinning(&fHistBg2, &binsx, &binsy);
     138        MH::SetBinning(fHistBg1, binsx, binsy);
     139        MH::SetBinning(fHistBg2, binsx, binsy);
    140140    }
    141141
  • trunk/Mars/mhflux/MHEffectiveOnTime.cc

    r9343 r9851  
    435435    btime.SetEdges(50, 0, 0.1);
    436436
    437     MH::SetBinning(&fH2DeltaT, &btime, &btheta);
     437    MH::SetBinning(fH2DeltaT, btime, btheta);
    438438
    439439    btime.Apply(fH1DeltaT);
     
    480480   }
    481481   if (binstheta && binsdtime)
    482        SetBinning(&fH2DeltaT, binsdtime, binstheta);
     482       SetBinning(fH2DeltaT, *binsdtime, *binstheta);
    483483
    484484   fTotalTime = 0;
  • trunk/Mars/mhflux/MHEnergyEst.cc

    r9565 r9851  
    113113    binsi.SetEdges(1, 0, 1000);
    114114
    115     SetBinning(&fHEnergy,     &binse, &binse, &binst);
    116     SetBinning(&fHImpact,     &binsi, &binsr);
    117 
    118     SetBinning(&fHResolutionEst, &binse, &binsr);
    119     SetBinning(&fHResolutionMC,  &binse, &binsr);
     115    SetBinning(fHEnergy, binse, binse, binst);
     116    SetBinning(fHImpact, binsi, binsr);
     117
     118    SetBinning(fHResolutionEst, binse, binsr);
     119    SetBinning(fHResolutionMC,  binse, binsr);
    120120
    121121    // For some unknown reasons this must be called after
     
    165165    binsr.SetEdges(*plist, "BinningEnergyRes");
    166166
    167     SetBinning(&fHEnergy,     &binse, &binse, &binst);
    168     SetBinning(&fHImpact,     &binsi, &binsr);
    169 
    170     SetBinning(&fHResolutionEst, &binse, &binsr);
    171     SetBinning(&fHResolutionMC,  &binse, &binsr);
     167    SetBinning(fHEnergy, binse, binse, binst);
     168    SetBinning(fHImpact, binsi, binsr);
     169
     170    SetBinning(fHResolutionEst, binse, binsr);
     171    SetBinning(fHResolutionMC,  binse, binsr);
    172172
    173173    fChisq = 0;
  • trunk/Mars/mhflux/MHFalseSource.cc

    r9367 r9851  
    258258
    259259    if (fHistOff)
    260         MH::SetBinning(&fHist, fHistOff);
     260        MH::SetBinning(fHist, *fHistOff);
    261261    else
    262262    {
     
    269269            const Float_t r = (geom ? geom->GetMaxRadius()/3 : 200)*fMm2Deg;
    270270
    271             MBinning b;
    272             b.SetEdges(20, -r, r);
    273             SetBinning(&fHist, &b, &b, &binsa);
     271            const MBinning b(20, -r, r);
     272            SetBinning(fHist, b, b, binsa);
    274273        }
    275274        else
    276             SetBinning(&fHist, bins, bins, &binsa);
     275            SetBinning(fHist, *bins, *bins, binsa);
    277276    }
    278277
     
    502501
    503502    TH2D h;
    504     MH::SetBinning(&h, h2);
     503    MH::SetBinning(h, *h2);
    505504
    506505    // Divide by number of entries in off region (of off-data)
  • trunk/Mars/mhflux/MHThetaSq.cc

    r9369 r9851  
    9595    binsa.Apply(fHistTime);
    9696
    97     MH::SetBinning(&fHist, &binst, &binse, &binsa);
     97    MH::SetBinning(fHist, binst, binse, binsa);
    9898}
    9999
     
    132132    // Apply binning
    133133    binsa.Apply(fHistTime);
    134     MH::SetBinning(&fHist, &binst, &binse, &binsa);
     134    MH::SetBinning(fHist, binst, binse, binsa);
    135135
    136136    // Remark: Binnings might be overwritten in MHAlpha::SetupFill
  • trunk/Mars/mhflux/MHThetaSqN.cc

    r9369 r9851  
    9898    binsa.Apply(fHistTime);
    9999
    100     MH::SetBinning(&fHist, &binst, &binse, &binsa);
     100    MH::SetBinning(fHist, binst, binse, binsa);
    101101
    102102    fParameter = new MParameterD;
     
    142142    // Apply binning
    143143    binsa.Apply(fHistTime);
    144     MH::SetBinning(&fHist, &binst, &binse, &binsa);
     144    MH::SetBinning(fHist, binst, binse, binsa);
    145145
    146146    // Remark: Binnings might be overwritten in MHAlpha::SetupFill
  • trunk/Mars/mhflux/MHThreshold.cc

    r9362 r9851  
    9898    }
    9999
    100     ApplyBinning(*pl, "Threshold", &fHEnergy);
     100    ApplyBinning(*pl, "Threshold", fHEnergy);
    101101
    102102    return kTRUE;
Note: See TracChangeset for help on using the changeset viewer.