ROOT  6.06/09
Reference Guide
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
RooFactoryWSTool Class Reference

Definition at line 47 of file RooFactoryWSTool.h.

Classes

class  IFace
 
class  SpecialsIFace
 

Public Member Functions

 RooFactoryWSTool (RooWorkspace &ws)
 
virtual ~RooFactoryWSTool ()
 Destructor. More...
 
RooRealVarcreateVariable (const char *name, Double_t xmin, Double_t xmax)
 Low-level factory interface for creating a RooRealVar with a given range and initial value. More...
 
RooCategorycreateCategory (const char *name, const char *stateNameList=0)
 Low-level factory interface for creating a RooCategory with a given list of state names. More...
 
RooAbsArgcreateArg (const char *className, const char *objName, const char *varList)
 Low-level factory interface for creating a RooAbsPdf of a given class with a given list of input variables The variable list varList should be of the form "a,b,c" where the interpretation of the argument is dependent on the p.d.f. More...
 
std::vector< std::string > ctorArgs (const char *className)
 
RooAddPdfadd (const char *objName, const char *specList, Bool_t recursiveCoefs=kFALSE)
 
RooRealSumPdfamplAdd (const char *objName, const char *specList)
 
RooProdPdfprod (const char *objName, const char *pdfList)
 
RooSimultaneoussimul (const char *objName, const char *indexCat, const char *pdfMap)
 
RooAdditionaddfunc (const char *objName, const char *specList)
 
RooProductprodfunc (const char *objName, const char *pdfList)
 
RooWorkspacews ()
 
RooAbsArgprocess (const char *expr)
 Process high-level object creation syntax Accepted forms of syntax are. More...
 
std::string processExpression (const char *expr)
 Process a single high-level expression or list of expressions. More...
 
std::vector< std::string > splitFunctionArgs (const char *funcExpr)
 Allocate and fill work buffer. More...
 
RooAbsArgasARG (const char *)
 CINT constructor interface, return constructor string argument #idx as RooAbsArg reference found in workspace. More...
 
RooAbsPdfasPDF (const char *)
 CINT constructor interface, return constructor string argument #idx as RooAbsPdf reference found in workspace. More...
 
RooAbsRealasFUNC (const char *)
 CINT constructor interface, return constructor string argument #idx as RooAbsReal reference found in workspace. More...
 
RooRealVarasVAR (const char *)
 CINT constructor interface, return constructor string argument #idx as RooRealVar reference found in workspace. More...
 
RooAbsRealLValueasVARLV (const char *)
 CINT constructor interface, return constructor string argument #idx as RooAbsRealLValue reference found in workspace. More...
 
RooResolutionModelasRMODEL (const char *)
 CINT constructor interface, return constructor string argument #idx as RooResolutionModel reference found in workspace. More...
 
RooCategoryasCAT (const char *)
 CINT constructor interface, return constructor string argument #idx as RooCategory reference found in workspace. More...
 
RooAbsCategoryLValueasCATLV (const char *)
 CINT constructor interface, return constructor string argument #idx as RooAbsCategoryLValue reference found in workspace. More...
 
RooAbsCategoryasCATFUNC (const char *)
 CINT constructor interface, return constructor string argument #idx as RooAbsCategory reference found in workspace. More...
 
RooArgSet asSET (const char *)
 CINT constructor interface, return constructor string argument #idx as RooArgSet of objects found in workspace. More...
 
RooArgList asLIST (const char *)
 CINT constructor interface, return constructor string argument #idx as RooArgList of objects found in workspace. More...
 
RooAbsDataasDATA (const char *)
 CINT constructor interface, return constructor string argument #idx as RooAbsData object found in workspace. More...
 
RooDataHistasDHIST (const char *)
 CINT constructor interface, return constructor string argument #idx as RooDataHist object found in workspace. More...
 
RooDataSetasDSET (const char *)
 CINT constructor interface, return constructor string argument #idx as RooDataSet object found in workspace. More...
 
TObjectasOBJ (const char *)
 
const char * asSTRING (const char *)
 CINT constructor interface, return constructor string argument #idx as const char*. More...
 
Int_t asINT (const char *)
 CINT constructor interface, return constructor string argument #idx as Int_t. More...
 
Double_t asDOUBLE (const char *)
 CINT constructor interface, return constructor string argument #idx as Double_t. More...
 
void logError ()
 
const char * autoClassNamePostFix () const
 
void setAutoClassNamePostFix (const char *pfix)
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TString &name, const TString &title)
 
 TNamed (const TNamed &named)
 
TNamedoperator= (const TNamed &rhs)
 TNamed assignment operator. More...
 
virtual ~TNamed ()
 
virtual void Clear (Option_t *option="")
 Set name and title to empty strings (""). More...
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare two TNamed objects. More...
 
virtual void Copy (TObject &named) const
 Copy this to obj. More...
 
virtual void FillBuffer (char *&buffer)
 Encode TNamed into output buffer. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
virtual Bool_t IsSortable () const
 
virtual void SetName (const char *name)
 Change (i.e. More...
 
virtual void SetNameTitle (const char *name, const char *title)
 Change (i.e. set) all the TNamed parameters (name and title). More...
 
virtual void SetTitle (const char *title="")
 Change (i.e. set) the title of the TNamed. More...
 
virtual void ls (Option_t *option="") const
 List TNamed name and title. More...
 
virtual void Print (Option_t *option="") const
 Print TNamed name and title. More...
 
virtual Int_t Sizeof () const
 Return size of the TNamed part of the TObject. More...
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current pad. More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual Option_tGetOption () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
Bool_t IsOnHeap () const
 
Bool_t IsZombie () const
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 
voidoperator new (size_t sz)
 
voidoperator new[] (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz, void *vp)
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
void SetBit (UInt_t f)
 
void ResetBit (UInt_t f)
 
Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
void InvertBit (UInt_t f)
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 
- Public Member Functions inherited from RooPrintable
 RooPrintable ()
 
virtual ~RooPrintable ()
 
virtual void printStream (std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
 Print description of object on ostream, printing contents set by contents integer, which is interpreted as an OR of 'enum ContentsOptions' values and in the style given by 'enum StyleOption'. More...
 
virtual void printAddress (std::ostream &os) const
 Print class name of object. More...
 
virtual void printName (std::ostream &os) const
 Print name of object. More...
 
virtual void printTitle (std::ostream &os) const
 Print title of object. More...
 
virtual void printClassName (std::ostream &os) const
 Print class name of object. More...
 
virtual void printValue (std::ostream &os) const
 Interface to print value of object. More...
 
virtual void printArgs (std::ostream &os) const
 Interface for printing of object arguments. More...
 
virtual void printExtras (std::ostream &os) const
 Interface to print extras of object. More...
 
virtual void printMultiline (std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
 Interface for detailed printing of object. More...
 
virtual void printTree (std::ostream &os, TString indent="") const
 Interface for tree structure printing of object. More...
 
virtual Int_t defaultPrintContents (Option_t *opt) const
 Default choice of contents to be printed (name and value) More...
 
virtual StyleOption defaultPrintStyle (Option_t *opt) const
 

Static Public Member Functions

static RooAbsArgas_ARG (UInt_t idx)
 
static RooAbsPdfas_PDF (UInt_t idx)
 
static RooAbsRealas_FUNC (UInt_t idx)
 
static RooRealVaras_VAR (UInt_t idx)
 
static RooAbsRealLValueas_VARLV (UInt_t idx)
 
static RooResolutionModelas_RMODEL (UInt_t idx)
 
static RooCategoryas_CAT (UInt_t idx)
 
static RooAbsCategoryLValueas_CATLV (UInt_t idx)
 
static RooAbsCategoryas_CATFUNC (UInt_t idx)
 
static RooArgSet as_SET (UInt_t idx)
 
static RooArgList as_LIST (UInt_t idx)
 
static RooAbsDataas_DATA (UInt_t idx)
 
static RooDataHistas_DHIST (UInt_t idx)
 
static RooDataSetas_DSET (UInt_t idx)
 
static TObjectas_OBJ (UInt_t idx)
 
static const char * as_STRING (UInt_t idx)
 
static Int_t as_INT (UInt_t idx)
 
static Double_t as_DOUBLE (UInt_t idx)
 
static Int_t as_INT (UInt_t idx, Int_t defVal)
 
static Double_t as_DOUBLE (UInt_t idx, Double_t defVal)
 
static void registerSpecial (const char *typeName, RooFactoryWSTool::IFace *iface)
 Register foreign special objects in factory. More...
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 
- Static Public Member Functions inherited from RooPrintable
static std::ostream & defaultPrintStream (std::ostream *os=0)
 Return a reference to the current default stream to use in Print(). More...
 
static void nameFieldLength (Int_t newLen)
 Set length of field reserved from printing name of RooAbsArgs in multi-line collection printing to given amount. More...
 

Protected Member Functions

Bool_t checkSyntax (const char *arg)
 Perform basic syntax on given factory expression. More...
 
std::string varTag (std::string &func, std::vector< std::string > &args)
 
std::string processCompositeExpression (const char *arg)
 Process a single composite expression. More...
 
std::string processSingleExpression (const char *arg)
 Process a single high-level expression. More...
 
std::string processListExpression (const char *arg)
 Process a list of high-level expression. More...
 
std::string processAliasExpression (const char *arg)
 Parse token. More...
 
std::string processCreateVar (std::string &func, std::vector< std::string > &args)
 Glue function between high-level syntax and low-level factory call to createVariable: Process a parsed call to create a variable named 'func'. More...
 
std::string processCreateArg (std::string &func, std::vector< std::string > &args)
 Glue function between high-level syntax and low-level factory call to createArg: Process a parsed call to create a p.d.f named func. More...
 
std::string processMetaArg (std::string &func, std::vector< std::string > &args)
 Concatenate list of args into comma separated string. More...
 
TClassresolveClassName (const char *className)
 
void clearError ()
 Associated workspace. More...
 
Int_t errorCount ()
 
 RooFactoryWSTool (const RooFactoryWSTool &)
 
- Protected Member Functions inherited from TObject
void MakeZombie ()
 
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 

Static Protected Member Functions

static void checkIndex (UInt_t index)
 
static RooFactoryWSToolof ()
 
static std::map< std::string, IFace * > & hooks ()
 

Protected Attributes

std::stack< std::string > _autoNamePrefix
 
std::map< std::string, std::string > _typeAliases
 
std::vector< std::string > _args
 
RooWorkspace_ws
 
Int_t _errorCount
 
std::string _autoClassPostFix
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 

Static Protected Attributes

static RooFactoryWSTool_of = 0
 
static std::map< std::string, IFace * > * _hooks =0
 
- Static Protected Attributes inherited from RooPrintable
static Int_t _nameLength
 

Additional Inherited Members

- Public Types inherited from TObject
enum  EStatusBits {
  kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4),
  kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13)
}
 
enum  { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff }
 
enum  { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) }
 
- Public Types inherited from RooPrintable
enum  ContentsOption {
  kName =1, kClassName =2, kValue =4, kArgs =8,
  kExtras =16, kAddress =32, kTitle =64, kCollectionHeader =128
}
 
enum  StyleOption {
  kInline =1, kSingleLine =2, kStandard =3, kVerbose =4,
  kTreeStructure =5
}
 

#include <RooFactoryWSTool.h>

+ Inheritance diagram for RooFactoryWSTool:
+ Collaboration diagram for RooFactoryWSTool:

Constructor & Destructor Documentation

RooFactoryWSTool::RooFactoryWSTool ( RooWorkspace ws)

Definition at line 149 of file RooFactoryWSTool.cxx.

RooFactoryWSTool::~RooFactoryWSTool ( )
virtual

Destructor.

Definition at line 160 of file RooFactoryWSTool.cxx.

RooFactoryWSTool::RooFactoryWSTool ( const RooFactoryWSTool )
protected

Member Function Documentation

RooAddPdf * RooFactoryWSTool::add ( const char *  objName,
const char *  specList,
Bool_t  recursiveCoefs = kFALSE 
)

Definition at line 455 of file RooFactoryWSTool.cxx.

Referenced by RooFactoryWSTool::SpecialsIFace::create().

RooAddition * RooFactoryWSTool::addfunc ( const char *  objName,
const char *  specList 
)

Definition at line 656 of file RooFactoryWSTool.cxx.

Referenced by RooFactoryWSTool::SpecialsIFace::create().

RooRealSumPdf * RooFactoryWSTool::amplAdd ( const char *  objName,
const char *  specList 
)

Definition at line 497 of file RooFactoryWSTool.cxx.

Referenced by RooFactoryWSTool::SpecialsIFace::create().

static RooAbsArg& RooFactoryWSTool::as_ARG ( UInt_t  idx)
inlinestatic

Definition at line 88 of file RooFactoryWSTool.h.

Referenced by createArg().

static RooCategory& RooFactoryWSTool::as_CAT ( UInt_t  idx)
inlinestatic

Definition at line 96 of file RooFactoryWSTool.h.

Referenced by createArg().

static RooAbsCategory& RooFactoryWSTool::as_CATFUNC ( UInt_t  idx)
inlinestatic

Definition at line 98 of file RooFactoryWSTool.h.

Referenced by createArg().

static RooAbsCategoryLValue& RooFactoryWSTool::as_CATLV ( UInt_t  idx)
inlinestatic

Definition at line 97 of file RooFactoryWSTool.h.

Referenced by createArg().

static RooAbsData& RooFactoryWSTool::as_DATA ( UInt_t  idx)
inlinestatic

Definition at line 103 of file RooFactoryWSTool.h.

Referenced by createArg().

static RooDataHist& RooFactoryWSTool::as_DHIST ( UInt_t  idx)
inlinestatic

Definition at line 104 of file RooFactoryWSTool.h.

Referenced by createArg().

static Double_t RooFactoryWSTool::as_DOUBLE ( UInt_t  idx)
inlinestatic

Definition at line 111 of file RooFactoryWSTool.h.

Referenced by createArg().

static Double_t RooFactoryWSTool::as_DOUBLE ( UInt_t  idx,
Double_t  defVal 
)
inlinestatic

Definition at line 113 of file RooFactoryWSTool.h.

static RooDataSet& RooFactoryWSTool::as_DSET ( UInt_t  idx)
inlinestatic

Definition at line 105 of file RooFactoryWSTool.h.

Referenced by createArg().

static RooAbsReal& RooFactoryWSTool::as_FUNC ( UInt_t  idx)
inlinestatic

Definition at line 91 of file RooFactoryWSTool.h.

Referenced by createArg().

static Int_t RooFactoryWSTool::as_INT ( UInt_t  idx)
inlinestatic

Definition at line 110 of file RooFactoryWSTool.h.

Referenced by createArg().

static Int_t RooFactoryWSTool::as_INT ( UInt_t  idx,
Int_t  defVal 
)
inlinestatic

Definition at line 112 of file RooFactoryWSTool.h.

static RooArgList RooFactoryWSTool::as_LIST ( UInt_t  idx)
inlinestatic

Definition at line 101 of file RooFactoryWSTool.h.

Referenced by createArg().

static TObject& RooFactoryWSTool::as_OBJ ( UInt_t  idx)
inlinestatic

Definition at line 107 of file RooFactoryWSTool.h.

Referenced by createArg().

static RooAbsPdf& RooFactoryWSTool::as_PDF ( UInt_t  idx)
inlinestatic

Definition at line 90 of file RooFactoryWSTool.h.

Referenced by createArg().

static RooResolutionModel& RooFactoryWSTool::as_RMODEL ( UInt_t  idx)
inlinestatic

Definition at line 94 of file RooFactoryWSTool.h.

Referenced by createArg().

static RooArgSet RooFactoryWSTool::as_SET ( UInt_t  idx)
inlinestatic

Definition at line 100 of file RooFactoryWSTool.h.

Referenced by createArg().

static const char* RooFactoryWSTool::as_STRING ( UInt_t  idx)
inlinestatic

Definition at line 109 of file RooFactoryWSTool.h.

Referenced by createArg().

static RooRealVar& RooFactoryWSTool::as_VAR ( UInt_t  idx)
inlinestatic

Definition at line 92 of file RooFactoryWSTool.h.

Referenced by createArg().

static RooAbsRealLValue& RooFactoryWSTool::as_VARLV ( UInt_t  idx)
inlinestatic

Definition at line 93 of file RooFactoryWSTool.h.

Referenced by createArg().

RooAbsArg & RooFactoryWSTool::asARG ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as RooAbsArg reference found in workspace.

Definition at line 1545 of file RooFactoryWSTool.cxx.

Referenced by as_ARG(), RooClassFactory::ClassFacIFace::create(), and RooFactoryWSTool::SpecialsIFace::create().

RooCategory & RooFactoryWSTool::asCAT ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as RooCategory reference found in workspace.

Definition at line 1697 of file RooFactoryWSTool.cxx.

Referenced by as_CAT().

RooAbsCategory & RooFactoryWSTool::asCATFUNC ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as RooAbsCategory reference found in workspace.

Definition at line 1660 of file RooFactoryWSTool.cxx.

Referenced by as_CATFUNC().

RooAbsCategoryLValue & RooFactoryWSTool::asCATLV ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as RooAbsCategoryLValue reference found in workspace.

Definition at line 1678 of file RooFactoryWSTool.cxx.

Referenced by as_CATLV(), and simul().

RooAbsData & RooFactoryWSTool::asDATA ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as RooAbsData object found in workspace.

Definition at line 1789 of file RooFactoryWSTool.cxx.

Referenced by as_DATA(), and RooFactoryWSTool::SpecialsIFace::create().

RooDataHist & RooFactoryWSTool::asDHIST ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as RooDataHist object found in workspace.

Definition at line 1803 of file RooFactoryWSTool.cxx.

Referenced by as_DHIST(), and RooFactoryWSTool::SpecialsIFace::create().

Double_t RooFactoryWSTool::asDOUBLE ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as Double_t.

Definition at line 1890 of file RooFactoryWSTool.cxx.

Referenced by as_DOUBLE().

RooDataSet & RooFactoryWSTool::asDSET ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as RooDataSet object found in workspace.

Definition at line 1820 of file RooFactoryWSTool.cxx.

Referenced by as_DSET(), and RooFactoryWSTool::SpecialsIFace::create().

RooAbsReal & RooFactoryWSTool::asFUNC ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as RooAbsReal reference found in workspace.

Definition at line 1565 of file RooFactoryWSTool.cxx.

Referenced by add(), addfunc(), amplAdd(), as_FUNC(), and RooFactoryWSTool::SpecialsIFace::create().

Int_t RooFactoryWSTool::asINT ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as Int_t.

Definition at line 1881 of file RooFactoryWSTool.cxx.

Referenced by as_INT(), and RooFactoryWSTool::SpecialsIFace::create().

RooArgList RooFactoryWSTool::asLIST ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as RooArgList of objects found in workspace.

Definition at line 1757 of file RooFactoryWSTool.cxx.

Referenced by as_LIST(), and RooClassFactory::ClassFacIFace::create().

TObject & RooFactoryWSTool::asOBJ ( const char *  arg)

Definition at line 1837 of file RooFactoryWSTool.cxx.

Referenced by as_OBJ().

RooAbsPdf & RooFactoryWSTool::asPDF ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as RooAbsPdf reference found in workspace.

Definition at line 1626 of file RooFactoryWSTool.cxx.

Referenced by add(), as_PDF(), RooFactoryWSTool::SpecialsIFace::create(), and simul().

RooResolutionModel & RooFactoryWSTool::asRMODEL ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as RooResolutionModel reference found in workspace.

Definition at line 1641 of file RooFactoryWSTool.cxx.

Referenced by as_RMODEL().

RooArgSet RooFactoryWSTool::asSET ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as RooArgSet of objects found in workspace.

Definition at line 1713 of file RooFactoryWSTool.cxx.

Referenced by as_SET(), RooFactoryWSTool::SpecialsIFace::create(), and prod().

const char * RooFactoryWSTool::asSTRING ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as const char*.

Definition at line 1851 of file RooFactoryWSTool.cxx.

Referenced by as_STRING().

RooRealVar & RooFactoryWSTool::asVAR ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as RooRealVar reference found in workspace.

Definition at line 1611 of file RooFactoryWSTool.cxx.

Referenced by as_VAR(), and RooFactoryWSTool::SpecialsIFace::create().

RooAbsRealLValue & RooFactoryWSTool::asVARLV ( const char *  arg)

CINT constructor interface, return constructor string argument #idx as RooAbsRealLValue reference found in workspace.

Definition at line 1588 of file RooFactoryWSTool.cxx.

Referenced by as_VARLV().

const char* RooFactoryWSTool::autoClassNamePostFix ( ) const
inline

Definition at line 156 of file RooFactoryWSTool.h.

Referenced by RooClassFactory::ClassFacIFace::create().

void RooFactoryWSTool::checkIndex ( UInt_t  index)
staticprotected
Bool_t RooFactoryWSTool::checkSyntax ( const char *  arg)
protected

Perform basic syntax on given factory expression.

If function returns true syntax errors are found.

Definition at line 1500 of file RooFactoryWSTool.cxx.

Referenced by process().

void RooFactoryWSTool::clearError ( )
inlineprotected

Associated workspace.

Definition at line 193 of file RooFactoryWSTool.h.

Referenced by process().

RooAbsArg * RooFactoryWSTool::createArg ( const char *  className,
const char *  objName,
const char *  varList 
)

Low-level factory interface for creating a RooAbsPdf of a given class with a given list of input variables The variable list varList should be of the form "a,b,c" where the interpretation of the argument is dependent on the p.d.f.

Set and List arguments can be passed by substituting a single argument with the form (a,b,c), i.e. one can set varList to "x,(a0,a1,a2)" to pass a RooAbsReal and a RooArgSet as arguments.

Definition at line 237 of file RooFactoryWSTool.cxx.

Referenced by RooFactoryWSTool::SpecialsIFace::create(), processCreateArg(), and prodfunc().

RooCategory * RooFactoryWSTool::createCategory ( const char *  name,
const char *  stateNameList = 0 
)

Low-level factory interface for creating a RooCategory with a given list of state names.

The State name list can be of the form 'name1,name2,name3' or of the form 'name1=id1,name2=id2,name3=id3'

Definition at line 194 of file RooFactoryWSTool.cxx.

Referenced by processCreateVar().

RooRealVar * RooFactoryWSTool::createVariable ( const char *  name,
Double_t  xmin,
Double_t  xmax 
)

Low-level factory interface for creating a RooRealVar with a given range and initial value.

Definition at line 170 of file RooFactoryWSTool.cxx.

vector< string > RooFactoryWSTool::ctorArgs ( const char *  className)

Definition at line 445 of file RooFactoryWSTool.cxx.

Int_t RooFactoryWSTool::errorCount ( )
inlineprotected

Definition at line 194 of file RooFactoryWSTool.h.

Referenced by process().

std::map< std::string, RooFactoryWSTool::IFace * > & RooFactoryWSTool::hooks ( )
staticprotected

Definition at line 1908 of file RooFactoryWSTool.cxx.

Referenced by processCreateArg(), and registerSpecial().

void RooFactoryWSTool::logError ( )
inline
RooFactoryWSTool * RooFactoryWSTool::of ( )
staticprotected
RooAbsArg * RooFactoryWSTool::process ( const char *  expr)

Process high-level object creation syntax Accepted forms of syntax are.

Creating variables

x[-10,10] - Create variable x with given range and put it in workspace x[3,-10,10] - Create variable x with given range and initial value and put it in workspace x[3] - Create variable x with given constant value

<numeric literal>=""> - Numeric literal expressions (0.5, -3 etc..) are converted to a RooConst(<numeric literal>) where ever a RooAbsReal or RooAbsArg argument is expected

Creating categories

c[lep,kao,nt1,nt2] - Create category c with given state names tag[B0=1,B0bar=-1] - Create category tag with given state names and index assignments

Creating functions and p.d.f.s

MyPdf::g(x,m,s) - Create p.d.f or function of type MyPdf with name g with argument x,m,s Interpretation and number of arguments are mapped to the constructor arguments of the class (after the name and title).

MyPdf(x,m,s) - As above, but with an implicitly defined (unique) object name

Creating sets and lists (to be used as inputs above)

{a,b,c} - Create RooArgSet or RooArgList (as determined by context) from given contents

Objects that are not created, are assumed to exist in the workspace Object creation expressions as shown above can be nested, e.g. one can do

RooGaussian::g(x[-10,10],m[0],3)

to create a p.d.f and its variables in one go. This nesting can be applied recursively e.g.

SUM::model( f[0.5,0,1] * RooGaussian::g( x[-10,10], m[0], 3] ), RooChebychev::c( x, {a0[0.1],a1[0.2],a2[-0.3]} ))

creates the sum of a Gaussian and a Chebychev and all its variables

A seperate series of operator meta-type exists to simplify the construction of composite expressions meta-types in all capitals (SUM) create p.d.f.s, meta types in lower case (sum) create functions.

SUM::name(f1*pdf1,f2*pdf2,pdf3] – Create sum p.d.f name with value f1*pdf1+f2*pdf2+(1-f1-f2)*pdf3 RSUM::name(f1*pdf1,f2*pdf2,pdf3] – Create recursive sum p.d.f. name with value f1*pdf1 + (1-f1)(f2*pdf2 + (1-f2)pdf3) ASUM::name(f1*amp1,f2*amp2,amp3] – Create sum p.d.f. name with value f1*amp1+f2*amp2+(1-f1-f2)*amp3 where amplX are amplitudes of type RooAbsReal sum::name(a1,a2,a3] – Create sum function with value a1+a2+a3 sum::name(a1*b1,a2*b2,a3*b 3] – Create sum function with value a1*b1+a2*b2+a3*b3

PROD::name(pdf1,pdf2] – Create product of p.d.f with 'name' with given input p.d.fs PROD::name(pdf1|x,pdf2] – Create product of conditional p.d.f. pdf1 given x and pdf2 prod::name(a,b,c] – Create production function with value a*b*c

SIMUL::name(cat,a=pdf1,b=pdf2] – Create simultaneous p.d.f index category cat. Make pdf1 to state a, pdf2 to state b

EXPR::name('expr',var,...] – Create an generic p.d.f that interprets the given expression expr::name('expr',var,...] – Create an generic function that interprets the given expression

The functionality of high level object creation tools like RooSimWSTool, RooCustomizer and RooClassFactory is also interfaced through meta-types in the factory

Interface to RooSimWSTool

SIMCLONE::name( modelPdf, $ParamSplit(...), $ParamSplitConstrained(...), $Restrict(...) ] – Clone-and-customize modelPdf according to ParamSplit and ParamSplitConstrained() specifications and return a RooSimultaneous p.d.f. of all built clones

MSIMCLONE::name( masterIndex, $AddPdf(mstate1, modelPdf1, $ParamSplit(...)), $AddPdf(mstate2,modelPdf2),...) ] – Clone-and-customize multiple models (modelPdf1,modelPdf2) according to ParamSplit and ParamSplitConstrained() specifications and return a RooSimultaneous p.d.f. of all built clones, using the specified master index to map prototype p.d.f.s to master states Interface to RooCustomizer

EDIT::name( orig, substNode=origNode), ... ] – Create a clone of input object orig, with the specified replacements operations executed EDIT::name( orig, origNode=$REMOVE(), ... ] – Create clone of input removing term origNode from all PROD() terms that contained it EDIT::name( orig, origNode=$REMOVE(prodname,...), ... ] – As above, but restrict removal of origNode to PROD term(s) prodname,...

Interface to RooClassFactory

CEXPR::name('expr',var,...] – Create an custom compiled p.d.f that evaluates the given expression cexpr::name('expr',var,...] – Create an custom compiled function that evaluates the given expression

$MetaType(...) - Meta argument that does not result in construction of an object but is used logically organize input arguments in certain operator p.d.f. constructions. The defined meta arguments are context dependent.

The only meta argument that is defined globally is $Alias(typeName,aliasName) to define aliases for type names. For the definition of meta arguments in operator p.d.f.s see the definitions below

Definition at line 824 of file RooFactoryWSTool.cxx.

Referenced by RooWorkspace::factory().

string RooFactoryWSTool::processAliasExpression ( const char *  arg)
protected

Parse token.

Definition at line 1200 of file RooFactoryWSTool.cxx.

Referenced by processExpression().

std::string RooFactoryWSTool::processCompositeExpression ( const char *  token)
protected

Process a single composite expression.

e.g. 'A=RooGaussian::g[x,m,s]' –> 'A=g' e.g. 'f[0,1]*RooGaussian::g[x,m,s]' –> 'f*g' e.g. 'RooGaussian::g(x,y,s)|x' –> g|x' e.g. '$MetaArg(RooGaussian::g[x,m,s],blah)' –> '$MetaArg(g,blah)'

Definition at line 916 of file RooFactoryWSTool.cxx.

Referenced by processExpression().

string RooFactoryWSTool::processCreateArg ( std::string &  func,
std::vector< std::string > &  args 
)
protected

Glue function between high-level syntax and low-level factory call to createArg: Process a parsed call to create a p.d.f named func.

The func arg is interpreted as ClassName::ObjectName and the arglist is passed verbatim to createArg. The received arglist is expected to be fully reduced (i.e. all inline object creations must have been compiled)

Definition at line 1352 of file RooFactoryWSTool.cxx.

Referenced by processSingleExpression().

string RooFactoryWSTool::processCreateVar ( std::string &  func,
std::vector< std::string > &  args 
)
protected

Glue function between high-level syntax and low-level factory call to createVariable: Process a parsed call to create a variable named 'func'.

If initial token is non-numeric, a RooCategory will be created, and the args are interpreted as either state names or 'name=id' assignments. Otherwise a RooRealvar is created and the arg list is interpreted as follows: If list has two args, these are interpreted as xmin,xmax If list has three args, these are interpreted as xinit,xmin,xmax If list has one arg, this is interpreted as xinit and the variable is set as constant

Definition at line 1282 of file RooFactoryWSTool.cxx.

Referenced by processSingleExpression().

std::string RooFactoryWSTool::processExpression ( const char *  token)

Process a single high-level expression or list of expressions.

The returned string a the reduced expression where all inline object creations have been executed and substituted with the name of the created object

e.g. 'RooGaussian::g(x,m,s)' –> 'g' '{x(-10,10),s} –> '{x,s}'

Definition at line 889 of file RooFactoryWSTool.cxx.

Referenced by RooFactoryWSTool::SpecialsIFace::create(), process(), processCreateArg(), and processMetaArg().

string RooFactoryWSTool::processListExpression ( const char *  arg)
protected

Process a list of high-level expression.

The returned string a the reduced expression list where all inline object creations have been executed and substituted with the name of the created object

E.g. '{x(-10,10),s} –> '{x,s}'

Definition at line 1130 of file RooFactoryWSTool.cxx.

Referenced by processExpression().

std::string RooFactoryWSTool::processMetaArg ( std::string &  func,
std::vector< std::string > &  args 
)
protected

Concatenate list of args into comma separated string.

Definition at line 1400 of file RooFactoryWSTool.cxx.

Referenced by processSingleExpression().

std::string RooFactoryWSTool::processSingleExpression ( const char *  arg)
protected

Process a single high-level expression.

The returned string a the reduced expression where all inline object creations have been executed and substituted with the name of the created object

e.g. 'RooGaussian::g(x,m,s)' –> 'g' e.g. 'x[-10,10]' –> 'x'

Definition at line 981 of file RooFactoryWSTool.cxx.

Referenced by processCompositeExpression(), and processListExpression().

RooProdPdf * RooFactoryWSTool::prod ( const char *  objName,
const char *  pdfList 
)

Definition at line 539 of file RooFactoryWSTool.cxx.

Referenced by RooFactoryWSTool::SpecialsIFace::create().

RooProduct * RooFactoryWSTool::prodfunc ( const char *  objName,
const char *  pdfList 
)

Definition at line 711 of file RooFactoryWSTool.cxx.

Referenced by RooFactoryWSTool::SpecialsIFace::create().

void RooFactoryWSTool::registerSpecial ( const char *  typeName,
RooFactoryWSTool::IFace iface 
)
static

Register foreign special objects in factory.

Definition at line 1899 of file RooFactoryWSTool.cxx.

Referenced by init().

TClass * RooFactoryWSTool::resolveClassName ( const char *  className)
protected

Definition at line 1220 of file RooFactoryWSTool.cxx.

Referenced by createArg().

void RooFactoryWSTool::setAutoClassNamePostFix ( const char *  pfix)
inline

Definition at line 157 of file RooFactoryWSTool.h.

RooSimultaneous * RooFactoryWSTool::simul ( const char *  objName,
const char *  indexCat,
const char *  pdfMap 
)

Definition at line 607 of file RooFactoryWSTool.cxx.

Referenced by RooFactoryWSTool::SpecialsIFace::create().

vector< string > RooFactoryWSTool::splitFunctionArgs ( const char *  funcExpr)

Allocate and fill work buffer.

Definition at line 1424 of file RooFactoryWSTool.cxx.

Referenced by RooSimWSTool::SimWSIFace::create(), and processAliasExpression().

string RooFactoryWSTool::varTag ( std::string &  func,
std::vector< std::string > &  args 
)
protected

Definition at line 1253 of file RooFactoryWSTool.cxx.

Referenced by processCreateVar().

RooWorkspace& RooFactoryWSTool::ws ( )
inline

Member Data Documentation

std::vector<std::string> RooFactoryWSTool::_args
protected
std::string RooFactoryWSTool::_autoClassPostFix
protected

Definition at line 198 of file RooFactoryWSTool.h.

Referenced by autoClassNamePostFix(), and setAutoClassNamePostFix().

std::stack<std::string> RooFactoryWSTool::_autoNamePrefix
protected
Int_t RooFactoryWSTool::_errorCount
protected

Definition at line 196 of file RooFactoryWSTool.h.

Referenced by clearError(), errorCount(), and logError().

map< string, RooFactoryWSTool::IFace * > * RooFactoryWSTool::_hooks =0
staticprotected

Definition at line 189 of file RooFactoryWSTool.h.

Referenced by hooks().

RooFactoryWSTool * RooFactoryWSTool::_of = 0
staticprotected

Definition at line 184 of file RooFactoryWSTool.h.

Referenced by checkIndex(), createArg(), of(), and prod().

std::map<std::string,std::string> RooFactoryWSTool::_typeAliases
protected

Definition at line 166 of file RooFactoryWSTool.h.

Referenced by processAliasExpression(), and resolveClassName().

RooWorkspace* RooFactoryWSTool::_ws
protected

The documentation for this class was generated from the following files: