![]() |
HepMC Reference DocumentationHepMC |
#include <WeightContainer.h>
Public Types | |
typedef std::vector< double >::iterator | iterator |
iterator for the weight container | |
typedef std::vector< double >::const_iterator | const_iterator |
const iterator for the weight container | |
Public Member Functions | |
WeightContainer (unsigned int n=0, const double &value=0.) | |
default constructor | |
WeightContainer (const std::vector< double > &weights) | |
construct from a vector of weights | |
WeightContainer (const WeightContainer &in) | |
copy | |
virtual | ~WeightContainer () |
void | swap (WeightContainer &other) |
swap | |
WeightContainer & | operator= (const WeightContainer &) |
copy | |
WeightContainer & | operator= (const std::vector< double > &in) |
copy | |
void | print (std::ostream &ostr=std::cout) const |
print weights | |
int | size () const |
size of weight container | |
bool | empty () const |
return true if weight container is empty | |
void | push_back (const double &) |
push onto weight container | |
void | pop_back () |
pop from weight container | |
void | clear () |
clear the weight container | |
double & | operator[] (unsigned int n) |
access the weight container | |
const double & | operator[] (unsigned int n) const |
access the weight container | |
double & | front () |
returns the first element | |
const double & | front () const |
returns the first element | |
double & | back () |
returns the last element | |
const double & | back () const |
returns the last element | |
iterator | begin () |
begining of the weight container | |
iterator | end () |
end of the weight container | |
const_iterator | begin () const |
begining of the weight container | |
const_iterator | end () const |
end of the weight container |
Basically just an interface to STL vector.
Definition at line 24 of file WeightContainer.h.
typedef std::vector<double>::const_iterator HepMC::WeightContainer::const_iterator |
typedef std::vector<double>::iterator HepMC::WeightContainer::iterator |
HepMC::WeightContainer::WeightContainer | ( | unsigned int | n = 0 , |
|
const double & | value = 0. | |||
) | [inline] |
HepMC::WeightContainer::WeightContainer | ( | const std::vector< double > & | weights | ) | [inline] |
HepMC::WeightContainer::WeightContainer | ( | const WeightContainer & | in | ) | [inline] |
HepMC::WeightContainer::~WeightContainer | ( | ) | [inline, virtual] |
Definition at line 104 of file WeightContainer.h.
const double & HepMC::WeightContainer::back | ( | ) | const [inline] |
double & HepMC::WeightContainer::back | ( | ) | [inline] |
WeightContainer::const_iterator HepMC::WeightContainer::begin | ( | ) | const [inline] |
WeightContainer::iterator HepMC::WeightContainer::begin | ( | ) | [inline] |
begining of the weight container
Definition at line 161 of file WeightContainer.h.
Referenced by print(), and HepMC::IO_AsciiParticles::write_event().
void HepMC::WeightContainer::clear | ( | ) | [inline] |
bool HepMC::WeightContainer::empty | ( | ) | const [inline] |
WeightContainer::const_iterator HepMC::WeightContainer::end | ( | ) | const [inline] |
WeightContainer::iterator HepMC::WeightContainer::end | ( | ) | [inline] |
end of the weight container
Definition at line 164 of file WeightContainer.h.
Referenced by print(), HepMC::GenVertex::print(), HepMC::GenEvent::print(), HepMC::GenEvent::write(), and HepMC::IO_AsciiParticles::write_event().
const double & HepMC::WeightContainer::front | ( | ) | const [inline] |
double & HepMC::WeightContainer::front | ( | ) | [inline] |
WeightContainer & HepMC::WeightContainer::operator= | ( | const std::vector< double > & | in | ) | [inline] |
WeightContainer & HepMC::WeightContainer::operator= | ( | const WeightContainer & | ) | [inline] |
const double & HepMC::WeightContainer::operator[] | ( | unsigned int | n | ) | const [inline] |
double & HepMC::WeightContainer::operator[] | ( | unsigned int | n | ) | [inline] |
void HepMC::WeightContainer::pop_back | ( | ) | [inline] |
void HepMC::WeightContainer::print | ( | std::ostream & | ostr = std::cout |
) | const [inline] |
void HepMC::WeightContainer::push_back | ( | const double & | ) | [inline] |
int HepMC::WeightContainer::size | ( | ) | const [inline] |
size of weight container
Definition at line 134 of file WeightContainer.h.
Referenced by HepMC::compareWeights(), HepMC::GenVertex::print(), HepMC::GenEvent::print(), HepMC::GenEvent::write(), and HepMC::IO_AsciiParticles::write_event().
void HepMC::WeightContainer::swap | ( | WeightContainer & | other | ) | [inline] |
swap
Definition at line 106 of file WeightContainer.h.
References m_weights.
Referenced by HepMC::GenVertex::swap(), and HepMC::GenEvent::swap().