#ifndef __JAANET__JEVTWEIGHTINTERFACE__ #define __JAANET__JEVTWEIGHTINTERFACE__ #include "km3net-dataformat/offline/Head.hh" #include "km3net-dataformat/offline/Evt.hh" #include "JAAnet/JHead.hh" /** * \author mdejong */ namespace JAANET {} namespace JPP { using namespace JAANET; } namespace JAANET { /** * Low-level interface for event weighing. */ struct JEvtWeightInterface { /** * Get name. * * \return name */ virtual const char* const getName() const = 0; /** * Configuration. * * \param header header */ virtual void configure(const JHead& header) = 0; /** * Check whether header is consistent with this event weighter. * * \param header header * \return true if consistent; else false */ virtual bool check(const JHead& header) const = 0; /** * Get weight of given event. * * \param evt event * \return weight [Hz] */ virtual double getWeight(const Evt& evt) const = 0; /** * Get event-weight normalisation factor. * Note: the return-value should be *multiplied* in order to normalise the event-weight * * \return event-weight normalisation factor. */ virtual double getNormalisation() const = 0; /** * Set event-weight normalisation factor. * Note: the set-value should be *multiplied* in order to normalise the event-weight * * \param normalisation event-weight normalisation factor. */ virtual void setNormalisation(const double normalisation) = 0; }; } #endif