Jpp  15.0.1-rc.2-highQE
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 32 of file JEvtWeightToolkit.hh.

Constructor & Destructor Documentation

JAANET::JEvtWeighter::JEvtWeighter ( )
inline

Definition at line 38 of file JEvtWeightToolkit.hh.

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

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

54  {
55  for (const_iterator i = this->begin(); i != this->end(); ++i) {
56 
57  if ((*i)->check(header)) {
58 
59  return *(*i);
60  }
61  }
62 
63  THROW(JValueOutOfRange, "JEvtWeighter::operator(): No event weighter found for given header.");
64  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:670

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