/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenBase/EvtValError.hh File Reference

#include <iostream>
#include <assert.h>
#include <math.h>

Go to the source code of this file.

Classes

class  EvtValError

Functions

EvtValError operator * (const EvtValError &x1, const EvtValError &x2)
EvtValError operator/ (const EvtValError &x1, const EvtValError &x2)
EvtValError operator+ (const EvtValError &x1, const EvtValError &x2)
EvtValError operator * (const EvtValError &x, double c)
EvtValError operator * (double c, const EvtValError &x)
std::ostreamoperator<< (std::ostream &, const EvtValError &)
template<class InputIterator, class Predicate>
EvtValError accept_reject (InputIterator it, InputIterator end, Predicate pred)


Function Documentation

template<class InputIterator, class Predicate>
EvtValError accept_reject ( InputIterator  it,
InputIterator  end,
Predicate  pred 
)

Definition at line 65 of file EvtValError.hh.

00066 {
00067   int itsTried = 0;
00068   int itsPassed = 0;
00069   while(it != end) {
00070     
00071     itsTried++;
00072     if(pred(*it++)) itsPassed++;
00073   }
00074 
00075   return EvtValError(((double) itsPassed)/((double) itsTried),sqrt(itsPassed)/((double) itsTried));
00076 }

EvtValError operator * ( double  c,
const EvtValError x 
)

Definition at line 146 of file EvtValError.cc.

References x.

00147 {
00148   EvtValError ret(x);
00149   ret*=c;
00150   return ret;
00151 }

EvtValError operator * ( const EvtValError x,
double  c 
)

Definition at line 138 of file EvtValError.cc.

References x.

00139 {
00140   EvtValError ret(x);
00141   ret*=c;
00142   return ret;
00143 }

EvtValError operator * ( const EvtValError x1,
const EvtValError x2 
)

Definition at line 115 of file EvtValError.cc.

00116 {
00117   EvtValError ret(x1);
00118   ret *= x2;
00119   return ret;
00120 }

EvtValError operator+ ( const EvtValError x1,
const EvtValError x2 
)

Definition at line 130 of file EvtValError.cc.

00131 {
00132   EvtValError ret(x1);
00133   ret += x2;
00134   return ret;
00135 }

EvtValError operator/ ( const EvtValError x1,
const EvtValError x2 
)

Definition at line 122 of file EvtValError.cc.

00123 {
00124   EvtValError ret(x1);
00125   ret /= x2;
00126   return ret;
00127 }

std::ostream& operator<< ( std::ostream ,
const EvtValError  
)


Generated on Tue Nov 29 23:15:55 2016 for BOSS_7.0.2 by  doxygen 1.4.7