CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
LikelihoodSpecies Class Reference

#include <LikelihoodSpecies.h>

Public Member Functions

void addPdf (const LikelihoodPdf *pdf)
 
std::vector< const
LikelihoodPdf * > const & 
getListOfPdfs () const
 
const char * getName () const
 
float getPrior () const
 
std::map< std::string, float >
const & 
getSplitFractions () const
 
 LikelihoodSpecies ()
 
 LikelihoodSpecies (const char *name, float prior)
 
void setName (const char *name)
 
void setPrior (float prior)
 
void setSplitFraction (std::pair< std::string, float > splitfrac)
 
virtual ~LikelihoodSpecies ()
 

Private Attributes

std::string _name
 
std::vector< const
LikelihoodPdf * > 
_pdfList
 
float _prior
 
std::map< std::string, float > _splitFractions
 

Detailed Description

Definition at line 9 of file LikelihoodSpecies.h.

Constructor & Destructor Documentation

LikelihoodSpecies::LikelihoodSpecies ( )
inline

Definition at line 11 of file LikelihoodSpecies.h.

11 {};
LikelihoodSpecies::LikelihoodSpecies ( const char *  name,
float  prior 
)
LikelihoodSpecies::~LikelihoodSpecies ( )
virtual

Definition at line 8 of file LikelihoodSpecies.cc.

References _pdfList.

8  {
9  std::vector<const LikelihoodPdf*>::iterator pdfItr;
10  for(pdfItr=_pdfList.begin(); pdfItr!=_pdfList.end(); pdfItr++) {
11  delete *pdfItr;
12  }
13 }
std::vector< const LikelihoodPdf * > _pdfList

Member Function Documentation

void LikelihoodSpecies::addPdf ( const LikelihoodPdf pdf)

Definition at line 19 of file LikelihoodSpecies.cc.

References _pdfList.

Referenced by LikelihoodPdfProduct::addPdf().

19  {
20  _pdfList.push_back(pdf);
21 }
std::vector< const LikelihoodPdf * > _pdfList
std::vector< const LikelihoodPdf * > const & LikelihoodSpecies::getListOfPdfs ( ) const

Definition at line 31 of file LikelihoodSpecies.cc.

References _pdfList.

Referenced by LikelihoodPdfProduct::getSpeciesProb().

31  {
32  return _pdfList;
33 }
std::vector< const LikelihoodPdf * > _pdfList
const char * LikelihoodSpecies::getName ( void  ) const
float LikelihoodSpecies::getPrior ( ) const

Definition at line 39 of file LikelihoodSpecies.cc.

References _prior.

Referenced by LikelihoodPdfProduct::getSpeciesProb().

39  {
40  return _prior;
41 }
std::map< std::string, float > const & LikelihoodSpecies::getSplitFractions ( ) const

Definition at line 43 of file LikelihoodSpecies.cc.

References _splitFractions.

Referenced by LikelihoodPdfProduct::addPdf(), and LikelihoodPdfProduct::getRatio().

43  {
44  return _splitFractions;
45 }
std::map< std::string, float > _splitFractions
void LikelihoodSpecies::setName ( const char *  name)
void LikelihoodSpecies::setPrior ( float  prior)

Definition at line 23 of file LikelihoodSpecies.cc.

References _prior, and bookConverter::prior.

23  {
24  _prior=prior;
25 }
dictionary prior
void LikelihoodSpecies::setSplitFraction ( std::pair< std::string, float >  splitfrac)

Definition at line 27 of file LikelihoodSpecies.cc.

References _splitFractions.

Referenced by LikelihoodPdfProduct::setSplitFrac().

27  {
28  _splitFractions.insert(splitfrac);
29 }
std::map< std::string, float > _splitFractions

Member Data Documentation

std::string LikelihoodSpecies::_name
private

Definition at line 30 of file LikelihoodSpecies.h.

Referenced by getName(), LikelihoodSpecies(), and setName().

std::vector<const LikelihoodPdf*> LikelihoodSpecies::_pdfList
private

Definition at line 29 of file LikelihoodSpecies.h.

Referenced by addPdf(), getListOfPdfs(), and ~LikelihoodSpecies().

float LikelihoodSpecies::_prior
private

Definition at line 31 of file LikelihoodSpecies.h.

Referenced by getPrior(), LikelihoodSpecies(), and setPrior().

std::map<std::string,float> LikelihoodSpecies::_splitFractions
private

Definition at line 32 of file LikelihoodSpecies.h.

Referenced by getSplitFractions(), and setSplitFraction().