1#ifndef __JAANET__JEVTCATEGORYHELPER__
2#define __JAANET__JEVTCATEGORYHELPER__
33 public std::shared_ptr<JEvtCategory>,
107 reset(category.
clone());
144 THROW(
JValueOutOfRange,
"JEvtCategoryHelper::configure(): Cannot construct event category for PDG type " << type);
159 return *(this->get());
187 return category.
match(header);
201 return category.
match(event);
215 return cat.
less(category);
266 return object.get()->read(in);
270 streampos pos = in.tellg();
275 object.configure(type);
285 if (neutrinoInteraction.
is_valid()) {
286 object.configure(neutrinoInteraction);
297 object.configure(muonBundle);
315 return out <<
object.getEvtCategory();
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Classes and methods for defining muon bundle categories.
Classes and methods for defining neutrino interaction categories.
Utility class to parse parameter values.
bool read(const JEquation &equation)
Read equation.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Exception for null pointer operation.
Exception for accessing a value in a collection that is outside of its range.
Extensions to Evt data format.
bool is_neutrino_primary(const int type)
Auxiliary function to check if given PDG code corresponds to a neutrino.
bool is_mupage(const JHead &header)
Check for generator.
bool is_muon_bundle_primary(const int type)
Auxiliary function to check if given PDG code corresponds to a valid muon bundle primary type.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Helper class for event categories.
bool is_valid() const
Check if event category is valid.
JEvtCategoryHelper(const pointer_type &p)
Constructor.
JEvtCategoryHelper(const int type)
Constructor.
JEvtCategoryHelper(const JHead &header)
Constructor.
JEvtCategoryHelper()
Default constructor.
void configure(const JHead &header)
Configuration.
bool less(const JEvtCategoryHelper &helper) const
Less-than method.
JEvtCategoryHelper(const JEvtCategory &category)
Constructor.
void configure(const int type)
Configuration.
friend std::istream & operator>>(std::istream &in, JEvtCategoryHelper &object)
Read event category from input.
void configure(const pointer_type &p)
Configuration.
JProperties getProperties(const JEquationParameters &equation=JEvtCategory::getEquationParameters()) const
Get properties of this class.
bool less(const JEvtCategory &category) const
Less-than method.
JEvtCategory & getEvtCategory() const
Get reference to event category.
bool match(const Evt &event) const
Check whether given event matches with this event category.
friend std::ostream & operator<<(std::ostream &out, const JEvtCategoryHelper &object)
Write event category to output.
JProperties getProperties(const JEquationParameters &equation=JEvtCategory::getEquationParameters())
Get properties of this class.
std::shared_ptr< JEvtCategory > pointer_type
void configure(const JEvtCategory &category)
Configuration.
bool match(const JHead &header) const
Check whether given MC header matches with this event category.
Low-level interface for event categories.
virtual JProperties getProperties(const JEquationParameters &eqpars=JEvtCategory::getEquationParameters())
Get properties of this class.
virtual bool less(const JEvtCategory &category) const
Less-than method.
virtual bool match(const JHead &header) const =0
Check whether given MC header matches with this event category.
static JEquationParameters & getEquationParameters()
Get equation parameters.
Class for muon bundle categories.
bool is_valid() const override final
Check if muon bundle category is valid.
JProperties getProperties(const JEquationParameters &equation=JEvtCategory::getEquationParameters()) override final
Get properties of this class.
Class for neutrino interaction categories.
bool is_valid() const override final
Check if neutrino interaction categories is valid.
JProperties getProperties(const JEquationParameters &eqpars=JEvtCategory::getEquationParameters()) override final
Get properties of this class.
virtual clone_type clone() const override
Get clone of this object.
Template definition of auxiliary base class for comparison of data structures.