Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
histops.cxx File Reference

Detailed Description

/*************************************************************************
* Copyright (C) 1995-2015, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#include "ROOT/RHist.hxx"
#include <iostream>
void histops()
{
using namespace ROOT::Experimental;
// Create a 2D histogram with an X axis with equidistant bins, and a y axis
// with irregular binning.
RH2D hist1({10, 0., 1.}, {{0., 1., 2., 3., 10.}});
// Fill weight 1. at the coordinate 0.01, 1.02.
hist1.Fill({0.01, 1.02});
RH2D hist2({{{10, 0., 1.}, {{0., 1., 2., 3., 10.}}}});
// Fill weight 1. at the coordinate 0.02, 1.03 (that's the same bin).
hist2.Fill({0.02, 1.03});
int binidx = hist1.GetImpl()->GetBinIndex({0.01, 1.02});
std::cout << hist1.GetImpl()->GetBinContent(binidx) << std::endl;
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
TMatrixT< Element > & Add(TMatrixT< Element > &target, Element scalar, const TMatrixT< Element > &source)
Modify addition: target += scalar * source.
Date
2015-08-08
Warning
This is part of the experimental API, which might change in the future. Feedback is welcome!
Author
Axel Naumann axel@.nosp@m.cern.nosp@m..ch

Definition in file histops.cxx.