rarGeneric Class Reference

Generic PDF builder. More...

#include <rarGeneric.hh>

Inheritance diagram for rarGeneric:

rarBasePdf rarConfig List of all members.

Public Member Functions

 rarGeneric ()
 Trivial ctor.
 rarGeneric (const char *configFile, const char *configSec, const char *configStr, rarDatasets *theDatasets, RooDataSet *theData, const char *name, const char *title)
 Default ctor.
virtual ~rarGeneric ()

Protected Member Functions

void init ()
 Initial function called by ctor.

Private Member Functions

 rarGeneric (const rarGeneric &)
 ClassDef (rarGeneric, 0)

Detailed Description

Generic PDF builder.

Build RooGenericPdf Pdf.

Config Directives:
See doc for Generic PDF configs.

Definition at line 26 of file rarGeneric.hh.


Constructor & Destructor Documentation

rarGeneric::rarGeneric (  ) 

Trivial ctor.

Usually the objects should be created using other ctors.

Definition at line 38 of file rarGeneric.cc.

References init().

00039   : rarBasePdf()
00040 {
00041   init();
00042 }

rarGeneric::rarGeneric ( const char *  configFile,
const char *  configSec,
const char *  configStr,
rarDatasets theDatasets,
RooDataSet *  theData,
const char *  name,
const char *  title 
)

Default ctor.

Parameters:
configFile The config file
configSec The config section
configStr The config string
theDatasets Available datasets
theData Default dataset for this PDF
name The name
title The title
The default ctor first initializes data members, and then calls init.

Definition at line 56 of file rarGeneric.cc.

References init().

00060   : rarBasePdf(configFile, configSec, configStr,
00061                theDatasets, theData, name, title)
00062 {
00063   init();
00064 }

rarGeneric::~rarGeneric (  )  [virtual]

Definition at line 66 of file rarGeneric.cc.

00067 {
00068 }

rarGeneric::rarGeneric ( const rarGeneric  )  [private]


Member Function Documentation

rarGeneric::ClassDef ( rarGeneric  ,
 
) [private]

void rarGeneric::init (  )  [protected, virtual]

Initial function called by ctor.

init is called by the ctor. It first reads in the formula info from config item formula, gets the first token as formula string, and use getFormulaArgs to get ArgList of the PDF, and finally it builds RooGenericPdf.

Reimplemented from rarBasePdf.

Definition at line 77 of file rarGeneric.cc.

References rarBasePdf::_params, rarBasePdf::_pdfType, rarBasePdf::_thePdf, rarBasePdf::getFormulaArgs(), rarBasePdf::getVarSec(), rarConfig::readConfStr(), and rarStrParser::Remove().

Referenced by rarGeneric().

00078 {
00079   cout<<"init of rarGeneric for "<<GetName()<<":"<<endl;
00080   
00081   // read the formula string
00082   TString formulaStr=readConfStr("formula", "1", getVarSec());
00083   rarStrParser formulaStrParser=formulaStr;
00084   // get formula
00085   TString formula=formulaStrParser[0];
00086   formulaStrParser.Remove();
00087   // get formula dep list
00088   RooArgList *depVarList=getFormulaArgs(formulaStrParser);
00089   _params.Print("v");
00090   cout<<"formula string:\t"<<formulaStr<<endl;
00091   
00092   // create the generic pdf
00093   _thePdf=new RooGenericPdf(Form("the_%s", GetName()), _pdfType+" "+GetTitle(),
00094                             formula, *depVarList);
00095 }


The documentation for this class was generated from the following files:
Generated on 30 Oct 2013 for RooRarFit by  doxygen 1.4.7