Jpp  16.0.0-rc.2
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 ()
 
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 33 of file JEvtWeightToolkit.hh.

Constructor & Destructor Documentation

JAANET::JEvtWeighter::JEvtWeighter ( )
inline

Definition at line 39 of file JEvtWeightToolkit.hh.

40  {
41  this->push_back(new JEvtWeightGSeaGen());
42  this->push_back(new JEvtWeightKM3BUU());
43  this->push_back(new JEvtWeightCorsika());
44  this->push_back(new JEvtWeightMupage());
45  this->push_back(new JEvtWeightDAQ());
46  }

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

56  {
57  for (const_iterator i = this->begin(); i != this->end(); ++i) {
58 
59  if ((*i)->check(header)) {
60 
61  return *(*i);
62  }
63  }
64 
65  THROW(JValueOutOfRange, "JEvtWeighter::operator(): No event weighter found for given header.");
66  }
#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: