Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
JAANET::JEventWeighter Struct Reference

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

#include <JWeightEventToolkit.hh>

Inheritance diagram for JAANET::JEventWeighter:
std::vector< JSharedPointer< JWeightEvent > >

Public Member Functions

 JEventWeighter ()
 
const JWeightEventoperator() (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 JWeightEventToolkit.hh.

Constructor & Destructor Documentation

JAANET::JEventWeighter::JEventWeighter ( )
inline

Definition at line 38 of file JWeightEventToolkit.hh.

39  {
40  this->push_back(new JWeightGSeaGen());
41  this->push_back(new JWeightKM3BUU());
42  this->push_back(new JWeightMupage());
43  this->push_back(new JWeightDAQ());
44  }

Member Function Documentation

const JWeightEvent& JAANET::JEventWeighter::operator() ( const JHead header) const
inline

Get event weighter corresponding to given header.

Parameters
headerheader

Definition at line 52 of file JWeightEventToolkit.hh.

53  {
54  for (const_iterator p = this->begin(); p != this->end(); ++p) {
55  if ((*p)->check(header)) {
56  return *(*p);
57  }
58  }
59 
60  THROW(JValueOutOfRange, "JEventWeighter::operator(): No map entry found for given header.");
61  }
#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: