Jpp  19.1.0
the software that should make you happy
Public Member Functions | List of all members
JAANET::JEvtWeighter Struct Reference

Look-up table for event weighters. More...

#include <JEvtWeightToolkit.hh>

Inheritance diagram for JAANET::JEvtWeighter:
std::vector< std::shared_ptr< JEvtWeight > >

Public Member Functions

 JEvtWeighter ()
 Constructor. More...
 
const JEvtWeightoperator() (const JHead &header) const
 Get event weighter corresponding to given header. More...
 

Detailed Description

Look-up table for event weighters.

Definition at line 51 of file JEvtWeightToolkit.hh.

Constructor & Destructor Documentation

◆ JEvtWeighter()

JAANET::JEvtWeighter::JEvtWeighter ( )
inline

Constructor.

Definition at line 57 of file JEvtWeightToolkit.hh.

58  {
59  this->emplace_back(new JEvtWeightGSeaGen());
60  this->emplace_back(new JEvtWeightKM3BUU());
61  this->emplace_back(new JEvtWeightCorsika());
62  this->emplace_back(new JEvtWeightMupage());
63  this->emplace_back(new JEvtWeightGenhen());
64  this->emplace_back(new JEvtWeightDAQ()); // must be after Monte Carlo weighters
65  this->emplace_back(new JEvtWeightMiscellaneous());
66  }
Implementation of event weighting for Corsika data.
Implementation of event weighing for DAQ data.
Implementation of event weighting for GSeaGen data.
Implementation of event weighting for Genhen data.
Implementation of event weighting for KM3BUU data.
Implementation of event weighing for miscellaneous data such as a merged offline file containing neut...
Implementation of event weighing for MUPAGE data.

Member Function Documentation

◆ operator()()

const JEvtWeight& JAANET::JEvtWeighter::operator() ( const JHead header) const
inline

Get event weighter corresponding to given header.

Parameters
headerheader
Returns
event weighter

Definition at line 75 of file JEvtWeightToolkit.hh.

76  {
77  using namespace std;
78  using namespace JPP;
79 
80  for (const_iterator i = this->begin(); i != this->end(); ++i) {
81 
82  if ((*i)->check(header)) {
83  return *(*i);
84  }
85  }
86 
87  THROW(JValueOutOfRange, "JEvtWeighter::operator(): No event weighter found for given header:" << endl << header);
88  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
Exception for accessing a value in a collection that is outside of its range.
Definition: JException.hh:180
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JSTDTypes.hh:14

The documentation for this struct was generated from the following file: