#include "AliMUONSparseHisto.h"
+#include "AliLog.h"
#include <Riostream.h>
#include <TH1.h>
#include <TMath.h>
///
/// \author Laurent Aphecetche, Subatech
+using std::cout;
+using std::endl;
/// \cond CLASSIMP
ClassImp(AliMUONSparseHisto)
/// \endcond
delete[] fArray;
}
+//______________________________________________________________________________
+Bool_t
+AliMUONSparseHisto::Add(const AliMUONSparseHisto& h)
+{
+ /// Add h to this
+
+ if ( fXmin != h.Xmin() || fXmax != h.Xmax() )
+ {
+ AliError("Cannot add sparse histograms with different limits !");
+ return kFALSE;
+ }
+
+ for ( Int_t i = 0; i < h.GetNbins(); ++i )
+ {
+ Fill(h.GetBinContent(i));
+ }
+
+ return kTRUE;
+}
+
//______________________________________________________________________________
void
AliMUONSparseHisto::Clear(Option_t*)