HepMC Reference Documentation

HepMC

HepMC::WeightContainer Class Reference

Container for the Weights associated with an event or vertex. More...

#include <WeightContainer.h>

List of all members.

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
WeightContaineroperator= (const WeightContainer &)
 copy
WeightContaineroperator= (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


Detailed Description

Container for the Weights associated with an event or vertex.

Basically just an interface to STL vector.

Definition at line 24 of file WeightContainer.h.


Member Typedef Documentation

typedef std::vector<double>::iterator HepMC::WeightContainer::iterator

iterator for the weight container

Definition at line 71 of file WeightContainer.h.

typedef std::vector<double>::const_iterator HepMC::WeightContainer::const_iterator

const iterator for the weight container

Definition at line 73 of file WeightContainer.h.


Constructor & Destructor Documentation

HepMC::WeightContainer::WeightContainer ( unsigned int  n = 0,
const double &  value = 0. 
) [inline]

default constructor

Definition at line 91 of file WeightContainer.h.

HepMC::WeightContainer::WeightContainer ( const std::vector< double > &  weights  )  [inline]

construct from a vector of weights

Definition at line 96 of file WeightContainer.h.

HepMC::WeightContainer::WeightContainer ( const WeightContainer in  )  [inline]

copy

Definition at line 100 of file WeightContainer.h.

HepMC::WeightContainer::~WeightContainer (  )  [inline, virtual]

Definition at line 104 of file WeightContainer.h.


Member Function Documentation

void HepMC::WeightContainer::swap ( WeightContainer other  )  [inline]

swap

Definition at line 106 of file WeightContainer.h.

References m_weights.

Referenced by operator=(), HepMC::GenVertex::swap(), and HepMC::GenEvent::swap().

WeightContainer & HepMC::WeightContainer::operator= ( const WeightContainer  )  [inline]

copy

best practices implementation

Definition at line 110 of file WeightContainer.h.

References swap().

WeightContainer & HepMC::WeightContainer::operator= ( const std::vector< double > &  in  )  [inline]

copy

best practices implementation

Definition at line 119 of file WeightContainer.h.

References swap().

void HepMC::WeightContainer::print ( std::ostream &  ostr = std::cout  )  const [inline]

print weights

Definition at line 126 of file WeightContainer.h.

References begin(), and end().

int HepMC::WeightContainer::size (  )  const [inline]

size of weight container

Definition at line 135 of file WeightContainer.h.

Referenced by HepMC::GenVertex::print(), HepMC::GenEvent::print(), HepMC::IO_ExtendedAscii::write_event(), HepMC::IO_AsciiParticles::write_event(), and HepMC::IO_Ascii::write_event().

bool HepMC::WeightContainer::empty (  )  const [inline]

return true if weight container is empty

Definition at line 137 of file WeightContainer.h.

void HepMC::WeightContainer::push_back ( const double &   )  [inline]

push onto weight container

Definition at line 139 of file WeightContainer.h.

void HepMC::WeightContainer::pop_back (  )  [inline]

pop from weight container

Definition at line 142 of file WeightContainer.h.

void HepMC::WeightContainer::clear (  )  [inline]

clear the weight container

Definition at line 144 of file WeightContainer.h.

double & HepMC::WeightContainer::operator[] ( unsigned int  n  )  [inline]

access the weight container

Definition at line 146 of file WeightContainer.h.

const double & HepMC::WeightContainer::operator[] ( unsigned int  n  )  const [inline]

access the weight container

Definition at line 149 of file WeightContainer.h.

double & HepMC::WeightContainer::front (  )  [inline]

returns the first element

Definition at line 152 of file WeightContainer.h.

const double & HepMC::WeightContainer::front (  )  const [inline]

returns the first element

Definition at line 154 of file WeightContainer.h.

double & HepMC::WeightContainer::back (  )  [inline]

returns the last element

Definition at line 157 of file WeightContainer.h.

const double & HepMC::WeightContainer::back (  )  const [inline]

returns the last element

Definition at line 159 of file WeightContainer.h.

WeightContainer::iterator HepMC::WeightContainer::begin (  )  [inline]

begining of the weight container

Definition at line 162 of file WeightContainer.h.

Referenced by print(), HepMC::IO_ExtendedAscii::write_event(), HepMC::IO_AsciiParticles::write_event(), and HepMC::IO_Ascii::write_event().

WeightContainer::iterator HepMC::WeightContainer::end (  )  [inline]

end of the weight container

Definition at line 165 of file WeightContainer.h.

Referenced by print(), HepMC::GenVertex::print(), HepMC::GenEvent::print(), HepMC::IO_ExtendedAscii::write_event(), HepMC::IO_AsciiParticles::write_event(), and HepMC::IO_Ascii::write_event().

WeightContainer::const_iterator HepMC::WeightContainer::begin (  )  const [inline]

begining of the weight container

Definition at line 168 of file WeightContainer.h.

WeightContainer::const_iterator HepMC::WeightContainer::end (  )  const [inline]

end of the weight container

Definition at line 171 of file WeightContainer.h.


The documentation for this class was generated from the following file:
Generated on Tue Feb 5 13:25:48 2008 for HepMC by  doxygen 1.5.1-3