Skip to content

Commit

Permalink
Make sure histograms still work with Gaudi v39
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Sep 25, 2024
1 parent d7694a9 commit d0634c7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Tracking/components/PlotTrackHitResiduals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
// k4FWCore
#include "k4FWCore/Consumer.h"

#include "GAUDI_VERSION.h"

#if GAUDI_MAJOR_VERSION < 39
namespace Gaudi::Accumulators {
template <unsigned int ND, atomicity Atomicity = atomicity::full, typename Arithmetic = double>
using StaticHistogram =
Gaudi::Accumulators::HistogramingCounterBase<ND, Atomicity, Arithmetic, naming::histogramString,
HistogramingAccumulator>;
}
#endif

#include <string>

/** @class PlotTrackHitDistances
Expand Down Expand Up @@ -74,7 +85,7 @@ struct PlotTrackHitDistances final
return;
}
Gaudi::Property<float> m_Bz{this, "Bz", 2., "Z component of the (assumed constant) magnetic field in Tesla."};
mutable Gaudi::Accumulators::Histogram<1> m_residualHist{this, "track_hits_distance_closest_approach", "Track-hit Distances", {100, 0, 1, "Distance [mm];Entries"}};
mutable Gaudi::Accumulators::StaticHistogram<1> m_residualHist{this, "track_hits_distance_closest_approach", "Track-hit Distances", {100, 0, 1, "Distance [mm];Entries"}};

};

Expand Down

0 comments on commit d0634c7

Please sign in to comment.