1 #ifndef __JAANET__JEVTWEIGHTFACTOR__
2 #define __JAANET__JEVTWEIGHTFACTOR__
91 THROW(
JValueOutOfRange,
"JEvtWeightFactor():check_validity(): Invalid event-weight factor " << *
this);
148 virtual std::istream&
read(std::istream& in)
174 virtual std::ostream&
write(std::ostream& out)
const
189 return object.read(in);
202 return object.write(out);
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Utility class to parse parameter values.
Utility class to parse parameter values.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Wrapper class around STL stringstream class to facilitate optional loading of data from file.
void load()
Load data from file with name corresponding to current contents.
Exception for accessing a value in a collection that is outside of its range.
Extensions to Evt data format.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
static JStat getFileStatus
Function object for file status.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Abstract base class for specifiable event-weight factors.
static void setEquationParameters(const JEquationParameters &eqpars)
Set equation parameters.
virtual JProperties getProperties(const JEquationParameters &eqpars=JEvtWeightFactor::getEquationParameters()) const
Get properties of this class.
friend std::istream & operator>>(std::istream &in, JEvtWeightFactor &object)
Read event category from input.
double operator()(const Evt &evt) const
Get event-weight factor of given event.
static JEquationParameters & getEquationParameters()
Get equation parameters.
virtual ~JEvtWeightFactor()
Virtual destructor.
virtual JProperties getProperties(const JEquationParameters &eqpars=JEvtWeightFactor::getEquationParameters())
Get properties of this class.
friend std::ostream & operator<<(std::ostream &out, const JEvtWeightFactor &object)
Write event category to output.
virtual std::istream & read(std::istream &in)
Read event-weight factor from input.
virtual bool is_valid() const
Check whether this event-weight factor is valid.
void check_validity() const
Check validity of this event-weight factor.
virtual std::ostream & write(std::ostream &out) const
Write event-weight factor to output.
static const char *const getTypeKey()
Get type keyword.
virtual double getFactor(const Evt &evt) const =0
Get event-weight factor of given event.
Template class for object cloning.