Jpp  18.0.0-rc.4
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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< JSharedPointer< 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 50 of file JEvtWeightToolkit.hh.

Constructor & Destructor Documentation

JAANET::JEvtWeighter::JEvtWeighter ( )
inline

Constructor.

Definition at line 56 of file JEvtWeightToolkit.hh.

57  {
58  this->push_back(new JEvtWeightGSeaGen());
59  this->push_back(new JEvtWeightKM3BUU());
60  this->push_back(new JEvtWeightCorsika());
61  this->push_back(new JEvtWeightMupage());
62  this->push_back(new JEvtWeightDAQ());
63  }

Member Function Documentation

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 72 of file JEvtWeightToolkit.hh.

73  {
74  for (const_iterator i = this->begin(); i != this->end(); ++i) {
75 
76  if ((*i)->check(header)) {
77 
78  return *(*i);
79  }
80  }
81 
82  THROW(JValueOutOfRange, "JEvtWeighter::operator(): No event weighter found for given header.");
83  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:696

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