Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
THaFormula Class Reference

Definition at line 21 of file THaFormula.h.

Classes

class  FVarDef_t
 

Public Member Functions

virtual Int_t Compile (const char *expression="")
 
virtual Int_t DefinedCut (TString &variable)
 
virtual Int_t DefinedGlobalVariable (TString &variable)
 
virtual Int_t DefinedGlobalVariableExtraList (TString &variable, const THaVarList *extralist)
 
virtual Int_t DefinedSpecialFunction (TString &name)
 
virtual char * DefinedString (Int_t i)
 
virtual Double_t DefinedValue (Int_t i)
 
virtual Int_t DefinedVariable (TString &variable, Int_t &action)
 
virtual Double_t Eval ()
 
virtual Double_t Eval (Double_t, Double_t=0.0, Double_t=0.0, Double_t=0.0) const
 
virtual Double_t EvalInstance (Int_t instance)
 
virtual Int_t GetNdata () const
 
virtual Bool_t IsArray () const
 
Bool_t IsError () const
 
Bool_t IsInvalid () const
 
virtual Bool_t IsVarArray () const
 
THaFormulaoperator= (const THaFormula &rhs)
 
virtual void Print (Option_t *option="") const
 
void SetCutList (const THaCutList *lst)
 
void SetList (const THaVarList *lst)
 
 THaFormula ()
 
 THaFormula (const char *name, const char *formula, Bool_t do_register=true, const THaVarList *vlst=gHaVars, const THaCutList *clst=gHaCuts)
 
 THaFormula (const THaFormula &rhs)
 
virtual ~THaFormula ()
 
- Public Member Functions inherited from ROOT::v5::TFormula
virtual void Analyze (const char *schain, Int_t &err, Int_t offset=0)
 
virtual Bool_t AnalyzeFunction (TString &chaine, Int_t &err, Int_t offset=0)
 
void Clear (Option_t *option="") override
 
void Copy (TObject &formula) const override
 
virtual Double_t EvalPar (const Double_t *x, const Double_t *params=nullptr)
 
virtual Double_t EvalParOld (const Double_t *x, const Double_t *params=nullptr)
 
virtual TString GetExpFormula (Option_t *option="") const
 
virtual const TObjectGetLinearPart (Int_t i)
 
virtual Int_t GetNdim () const
 
virtual Int_t GetNpar () const
 
virtual Int_t GetNumber () const
 
Double_t GetParameter (const char *name) const
 
Double_t GetParameter (Int_t ipar) const
 
virtual Double_tGetParameters () const
 
virtual void GetParameters (Double_t *params)
 
virtual const char * GetParName (Int_t ipar) const
 
virtual Int_t GetParNumber (const char *name) const
 
TClassIsA () const override
 
virtual Bool_t IsLinear () const
 
virtual Bool_t IsNormalized () const
 
TFormulaoperator= (const TFormula &rhs)
 
void Optimize ()
 
virtual void ProcessLinear (TString &replaceformula)
 
virtual void SetNumber (Int_t number)
 
virtual void SetParameter (const char *name, Double_t parvalue)
 
virtual void SetParameter (Int_t ipar, Double_t parvalue)
 
virtual void SetParameters (const Double_t *params)
 
virtual void SetParameters (Double_t p0, Double_t p1, Double_t p2=0, Double_t p3=0, Double_t p4=0, Double_t p5=0, Double_t p6=0, Double_t p7=0, Double_t p8=0, Double_t p9=0, Double_t p10=0)
 
virtual void SetParName (Int_t ipar, const char *name)
 
virtual void SetParNames (const char *name0="p0", const char *name1="p1", const char *name2="p2", const char *name3="p3", const char *name4="p4", const char *name5="p5", const char *name6="p6", const char *name7="p7", const char *name8="p8", const char *name9="p9", const char *name10="p10")
 
void Streamer (TBuffer &) override
 
void Streamer (TBuffer &b, const TClass *onfile_class)
 
void Streamer (TBuffer &b, Int_t version, UInt_t start, UInt_t count, const TClass *onfile_class=nullptr)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
 TFormula ()
 
 TFormula (const char *name, const char *formula)
 
 TFormula (const TFormula &formula)
 
virtual void Update ()
 
 ~TFormula () override
 
- Public Member Functions inherited from TNamed
void Clear (Option_t *option="") override
 
TObjectClone (const char *newname="") const override
 
Int_t Compare (const TObject *obj) const override
 
void Copy (TObject &named) const override
 
virtual void FillBuffer (char *&buffer)
 
const char * GetName () const override
 
const char * GetTitle () const override
 
ULong_t Hash () const override
 
TClassIsA () const override
 
Bool_t IsSortable () const override
 
void ls (Option_t *option="") const override
 
TNamedoperator= (const TNamed &rhs)
 
void Print (Option_t *option="") const override
 
virtual void SetName (const char *name)
 
virtual void SetNameTitle (const char *name, const char *title)
 
virtual void SetTitle (const char *title="")
 
virtual Int_t Sizeof () const
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TNamed &named)
 
 TNamed (const TString &name, const TString &title)
 
virtual ~TNamed ()
 
- Public Member Functions inherited from TObject
void AbstractMethod (const char *method) const
 
virtual void AppendPad (Option_t *option="")
 
virtual void Browse (TBrowser *b)
 
ULong_t CheckedHash ()
 
virtual const char * ClassName () const
 
virtual void Delete (Option_t *option="")
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 
virtual void Draw (Option_t *option="")
 
virtual void DrawClass () const
 
virtual TObjectDrawClone (Option_t *option="") const
 
virtual void Dump () const
 
virtual void Error (const char *method, const char *msgfmt,...) const
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 
virtual TObjectFindObject (const char *name) const
 
virtual TObjectFindObject (const TObject *obj) const
 
virtual Option_tGetDrawOption () const
 
virtual const char * GetIconName () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
virtual Option_tGetOption () const
 
virtual UInt_t GetUniqueID () const
 
virtual Bool_t HandleTimer (TTimer *timer)
 
Bool_t HasInconsistentHash () const
 
virtual void Info (const char *method, const char *msgfmt,...) const
 
virtual Bool_t InheritsFrom (const char *classname) const
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 
virtual void Inspect () const
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 
virtual Bool_t IsEqual (const TObject *obj) const
 
virtual Bool_t IsFolder () const
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
void MayNotUse (const char *method) const
 
virtual Bool_t Notify ()
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 
void operator delete (void *ptr)
 
void operator delete[] (void *ptr)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 
virtual void Paint (Option_t *option="")
 
virtual void Pop ()
 
virtual Int_t Read (const char *name)
 
virtual void RecursiveRemove (TObject *obj)
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 
virtual void SetDrawOption (Option_t *option="")
 
virtual void SetUniqueID (UInt_t uid)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
 TObject ()
 
 TObject (const TObject &object)
 
virtual void UseCurrentStyle ()
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 
virtual ~TObject ()
 

Static Public Attributes

static const Option_t *const kPRINTBRIEF = "BRIEF"
 
static const Option_t *const kPRINTFULL = "FULL"
 

Protected Types

enum  {
  kError = BIT(0) , kInvalid = BIT(1) , kVarArray = BIT(2) , kArrayFormula = BIT(3) ,
  kFuncOfVarArray = BIT(4)
}
 
enum  EVariableType {
  kVariable , kCut , kString , kArray ,
  kFunction , kFormula , kVarFormula , kCutScaler ,
  kCutNCalled
}
 
- Protected Types inherited from ROOT::v5::TFormula
typedef Double_t(TObject::* TFuncG) (const Double_t *, const Double_t *) const
 

Protected Member Functions

virtual Int_t DefinedCutWithType (TString &variable, EVariableType type)
 
Double_t EvalInstanceUnchecked (Int_t instance)
 
Int_t GetNdataUnchecked () const
 
Int_t Init (const char *name, const char *expression)
 
virtual Bool_t IsString (Int_t oper) const
 
virtual void RegisterFormula (Bool_t add=true)
 
- Protected Member Functions inherited from ROOT::v5::TFormula
virtual Bool_t CheckOperands (Int_t leftoperand, Int_t rightoperartion, Int_t &err)
 
virtual Bool_t CheckOperands (Int_t operation, Int_t &err)
 
void ClearFormula (Option_t *option="")
 
virtual void Convert (UInt_t fromVersion)
 
Double_t EvalParFast (const Double_t *x, const Double_t *params)
 
Double_t EvalPrimitive (const Double_t *x, const Double_t *params)
 
Double_t EvalPrimitive0 (const Double_t *x, const Double_t *params)
 
Double_t EvalPrimitive1 (const Double_t *x, const Double_t *params)
 
Double_t EvalPrimitive2 (const Double_t *x, const Double_t *params)
 
Double_t EvalPrimitive3 (const Double_t *x, const Double_t *params)
 
Double_t EvalPrimitive4 (const Double_t *x, const Double_t *params)
 
Short_t GetAction (Int_t code) const
 
Short_t GetActionOptimized (Int_t code) const
 
Int_t GetActionParam (Int_t code) const
 
Int_t GetActionParamOptimized (Int_t code) const
 
Int_tGetOper () const
 
Int_tGetOperOptimized () const
 
void MakePrimitive (const char *expr, Int_t pos)
 
Int_t PreCompile ()
 
void SetAction (Int_t code, Int_t value, Int_t param=0)
 
void SetActionOptimized (Int_t code, Int_t value, Int_t param=0)
 
virtual Bool_t StringToNumber (Int_t code)
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 
void MakeZombie ()
 

Protected Attributes

const THaCutListfCutList
 
Int_t fInstance
 
std::vector< FVarDef_tfVarDef
 
const THaVarListfVarList
 
- Protected Attributes inherited from ROOT::v5::TFormula
TBits fAlreadyFound
 
Double_tfConst
 
TStringfExpr
 
TStringfExprOptimized
 
TObjArray fFunctions
 
TObjArray fLinearParts
 
TStringfNames
 
Int_t fNconst
 
Int_t fNdim
 
Int_t fNoper
 
Int_t fNOperOptimized
 
Int_t fNpar
 
Int_t fNstring
 
Int_t fNumber
 
Int_t fNval
 
TOperOffsetfOperOffset
 
Int_tfOperOptimized
 
TFuncG fOptimal
 
Double_tfParams
 
TFormulaPrimitive ** fPredefined
 
 kabs
 
 kacos
 
 kacosh
 
 kAdd
 
 kAnd
 
 kasin
 
 kasinh
 
 katan
 
 katan2
 
 katanh
 
 kBinary
 
 kBitAnd
 
 kBitOr
 
 kBoolOptimize
 
 kBoolOptimizeAnd
 
 kBoolOptimizeOr
 
 kBoolSet
 
 kConstant
 
 kcos
 
 kcosh
 
 kData
 
 kDefinedString
 
 kDefinedVariable
 
 kDivide
 
 kEnd
 
 kEqual
 
 kexp
 
 kexpo
 
 kFD0
 
 kFD1
 
 kFD2
 
 kFD3
 
 kFDM
 
 kfmod
 
 kFunctionCall
 
 kgaus
 
 kGreater
 
 kGreaterThan
 
 kint
 
 kJump
 
 kJumpIf
 
 klandau
 
 kLeftShift
 
 kLess
 
 kLessThan
 
 klog
 
 klog10
 
 kmax
 
 kmin
 
 kModulo
 
 kMultD
 
 kMultDD
 
 kMultiply
 
 kNot
 
 kNotEqual
 
 kOr
 
 kParameter
 
 kpi
 
 kPlusD
 
 kPlusDD
 
 kpol
 
 kpow
 
 kRightShift
 
 krndm
 
 ksign
 
 kSignInv
 
 ksin
 
 ksinh
 
 ksq
 
 ksqrt
 
 kStringConst
 
 kStringEqual
 
 kStringNotEqual
 
 kstrstr
 
 kSubstract
 
 ktan
 
 ktanh
 
 kThree
 
 kUnary
 
 kVariable
 
 kxexpo
 
 kxgaus
 
 kxlandau
 
 kxpol
 
 kxyexpo
 
 kxygaus
 
 kxylandau
 
 kyexpo
 
 kygaus
 
 kylandau
 
 kypol
 
 kzexpo
 
 kzgaus
 
 kzlandau
 
 kzpol
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 
- Protected Attributes inherited from TObject
 kOnlyPrepStep
 

Additional Inherited Members

- Public Types inherited from TObject
enum  EDeprecatedStatusBits
 
enum  EStatusBits
 
- Static Public Member Functions inherited from ROOT::v5::TFormula
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static void GetMaxima (Int_t &maxop, Int_t &maxpar, Int_t &maxconst)
 
static void SetMaxima (Int_t maxop=1000, Int_t maxpar=1000, Int_t maxconst=1000)
 
- Static Public Member Functions inherited from TNamed
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 
static Bool_t GetObjectStat ()
 
static void SetDtorOnly (void *obj)
 
static void SetObjectStat (Bool_t stat)
 
- Public Attributes inherited from ROOT::v5::TFormula
 kLinear
 
 kNormalized
 
 kNotGlobal
 
- Public Attributes inherited from TObject
 kBitMask
 
 kCanDelete
 
 kCannotPick
 
 kHasUUID
 
 kInconsistent
 
 kInvalidObject
 
 kIsOnHeap
 
 kIsReferenced
 
 kMustCleanup
 
 kNoContextMenu
 
 kNotDeleted
 
 kObjInCanvas
 
 kOverwrite
 
 kSingleKey
 
 kWriteDelete
 
 kZombie
 

#include <THaFormula.h>

Inheritance diagram for THaFormula:

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
kError 
kInvalid 
kVarArray 
kArrayFormula 
kFuncOfVarArray 

Definition at line 61 of file THaFormula.h.

◆ EVariableType

enum THaFormula::EVariableType
protected
Enumerator
kVariable 
kCut 
kString 
kArray 
kFunction 
kFormula 
kVarFormula 
kCutScaler 
kCutNCalled 

Definition at line 69 of file THaFormula.h.

Constructor & Destructor Documentation

◆ THaFormula() [1/3]

THaFormula::THaFormula ( )

Definition at line 64 of file THaFormula.cxx.

◆ THaFormula() [2/3]

THaFormula::THaFormula ( const char *  name,
const char *  formula,
Bool_t  do_register = true,
const THaVarList vlst = gHaVars,
const THaCutList clst = gHaCuts 
)

Definition at line 73 of file THaFormula.cxx.

◆ THaFormula() [3/3]

THaFormula::THaFormula ( const THaFormula rhs)

Definition at line 159 of file THaFormula.cxx.

◆ ~THaFormula()

THaFormula::~THaFormula ( )
virtualdefault

Member Function Documentation

◆ Compile()

Int_t THaFormula::Compile ( const char *  expression = "")
virtual

Reimplemented from ROOT::v5::TFormula.

Definition at line 235 of file THaFormula.cxx.

◆ DefinedCut()

Int_t THaFormula::DefinedCut ( TString variable)
virtual

Definition at line 517 of file THaFormula.cxx.

◆ DefinedCutWithType()

Int_t THaFormula::DefinedCutWithType ( TString variable,
EVariableType  type 
)
protectedvirtual

Definition at line 525 of file THaFormula.cxx.

◆ DefinedGlobalVariable()

Int_t THaFormula::DefinedGlobalVariable ( TString variable)
virtual

Reimplemented in THaVform.

Definition at line 548 of file THaFormula.cxx.

◆ DefinedGlobalVariableExtraList()

Int_t THaFormula::DefinedGlobalVariableExtraList ( TString variable,
const THaVarList extralist 
)
virtual

Definition at line 553 of file THaFormula.cxx.

◆ DefinedSpecialFunction()

Int_t THaFormula::DefinedSpecialFunction ( TString name)
virtual

Definition at line 625 of file THaFormula.cxx.

◆ DefinedString()

char * THaFormula::DefinedString ( Int_t  i)
virtual

Reimplemented from ROOT::v5::TFormula.

Definition at line 265 of file THaFormula.cxx.

◆ DefinedValue()

Double_t THaFormula::DefinedValue ( Int_t  i)
virtual

Reimplemented from ROOT::v5::TFormula.

Definition at line 288 of file THaFormula.cxx.

◆ DefinedVariable()

Int_t THaFormula::DefinedVariable ( TString variable,
Int_t action 
)
virtual

Reimplemented from ROOT::v5::TFormula.

Reimplemented in THaCut.

Definition at line 457 of file THaFormula.cxx.

◆ Eval() [1/2]

Double_t THaFormula::Eval ( )
virtual

Reimplemented in THaCut, and THaCut.

Definition at line 691 of file THaFormula.cxx.

◆ Eval() [2/2]

virtual Double_t THaFormula::Eval ( Double_t  ,
Double_t  = 0.0,
Double_t  = 0.0,
Double_t  = 0.0 
) const
inlinevirtual

Reimplemented from ROOT::v5::TFormula.

Reimplemented in THaCut.

Definition at line 45 of file THaFormula.h.

◆ EvalInstance()

Double_t THaFormula::EvalInstance ( Int_t  instance)
virtual

Definition at line 699 of file THaFormula.cxx.

◆ EvalInstanceUnchecked()

Double_t THaFormula::EvalInstanceUnchecked ( Int_t  instance)
inlineprotected

Definition at line 102 of file THaFormula.h.

◆ GetNdata()

Int_t THaFormula::GetNdata ( ) const
virtual

Definition at line 758 of file THaFormula.cxx.

◆ GetNdataUnchecked()

Int_t THaFormula::GetNdataUnchecked ( ) const
protected

Definition at line 720 of file THaFormula.cxx.

◆ Init()

Int_t THaFormula::Init ( const char *  name,
const char *  expression 
)
protected

Definition at line 100 of file THaFormula.cxx.

◆ IsArray()

virtual Bool_t THaFormula::IsArray ( ) const
inlinevirtual

Reimplemented in THaCut.

Definition at line 51 of file THaFormula.h.

◆ IsError()

Bool_t THaFormula::IsError ( ) const
inline

Definition at line 53 of file THaFormula.h.

◆ IsInvalid()

Bool_t THaFormula::IsInvalid ( ) const
inline

Definition at line 54 of file THaFormula.h.

◆ IsString()

Bool_t THaFormula::IsString ( Int_t  oper) const
protectedvirtual

Reimplemented from ROOT::v5::TFormula.

Definition at line 281 of file THaFormula.cxx.

◆ IsVarArray()

virtual Bool_t THaFormula::IsVarArray ( ) const
inlinevirtual

Reimplemented in THaCut.

Definition at line 52 of file THaFormula.h.

◆ operator=()

THaFormula & THaFormula::operator= ( const THaFormula rhs)

Definition at line 170 of file THaFormula.cxx.

◆ Print()

void THaFormula::Print ( Option_t option = "") const
virtual

Reimplemented from ROOT::v5::TFormula.

Reimplemented in THaCut.

Definition at line 769 of file THaFormula.cxx.

◆ RegisterFormula()

void THaFormula::RegisterFormula ( Bool_t  add = true)
protectedvirtual

Definition at line 783 of file THaFormula.cxx.

◆ SetCutList()

void THaFormula::SetCutList ( const THaCutList lst)
inline

Definition at line 57 of file THaFormula.h.

◆ SetList()

void THaFormula::SetList ( const THaVarList lst)
inline

Definition at line 56 of file THaFormula.h.

Member Data Documentation

◆ fCutList

const THaCutList* THaFormula::fCutList
protected

Definition at line 88 of file THaFormula.h.

◆ fInstance

Int_t THaFormula::fInstance
protected

Definition at line 89 of file THaFormula.h.

◆ fVarDef

std::vector<FVarDef_t> THaFormula::fVarDef
protected

Definition at line 86 of file THaFormula.h.

◆ fVarList

const THaVarList* THaFormula::fVarList
protected

Definition at line 87 of file THaFormula.h.

◆ kPRINTBRIEF

const Option_t *const THaFormula::kPRINTBRIEF = "BRIEF"
static

Definition at line 25 of file THaFormula.h.

◆ kPRINTFULL

const Option_t *const THaFormula::kPRINTFULL = "FULL"
static

Definition at line 24 of file THaFormula.h.

Collaboration diagram for THaFormula:

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