Skip to content

Commit

Permalink
Change version to 39
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Sep 20, 2024
1 parent 0f551d1 commit 319d2db
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include "GAUDI_VERSION.h"

#if GAUDI_MAJOR_VERSION < 40
#if GAUDI_MAJOR_VERSION < 39
namespace Gaudi::Accumulators {
using StaticRootHistogram = Gaudi::Accumulators::RootHistogram;
}
Expand All @@ -36,7 +36,7 @@ namespace Gaudi::Accumulators {
struct ExampleFunctionalTransformerHist final
: k4FWCore::Transformer<edm4hep::MCParticleCollection(const edm4hep::MCParticleCollection& input)> {
StatusCode initialize() override {
#if GAUDI_MAJOR_VERSION >= 40
#if GAUDI_MAJOR_VERSION >= 39
m_customHistogram.createHistogram(*this);
#endif
return StatusCode::SUCCESS;
Expand All @@ -51,7 +51,7 @@ struct ExampleFunctionalTransformerHist final
edm4hep::MCParticleCollection operator()(const edm4hep::MCParticleCollection& input) const override {
// Fill the histogram with the energy of one particle
++m_histogram[input[0 + !m_firstParticle.value()].getEnergy()];
#if GAUDI_MAJOR_VERSION >= 40
#if GAUDI_MAJOR_VERSION >= 39
++m_customHistogram[input[0 + !m_firstParticle.value()].getEnergy()];
#endif
// Return an empty collection since we don't care about the collection
Expand All @@ -64,7 +64,7 @@ struct ExampleFunctionalTransformerHist final
this, "Histogram Name", "Histogram Title", {100, 0, 10.}};

public:
#if GAUDI_MAJOR_VERSION >= 40
#if GAUDI_MAJOR_VERSION >= 39
// This is a histogram with title, name and bins that can be set from python
void registerCallBack(Gaudi::StateMachine::Transition, std::function<void()>) {}
mutable Gaudi::Accumulators::RootHistogram<1> m_customHistogram{this, "CustomHistogram"};
Expand Down

0 comments on commit 319d2db

Please sign in to comment.