ROOT logo
ROOT » ROOSTATS » RooStats::HLFactory

class RooStats::HLFactory: public TNamed


HLFactory is an High Level model Factory allows you to describe your models in a configuration file (datacards) acting as an interface with the RooFactoryWSTool. Moreover it provides tools for the combination of models and datasets.


Function Members (Methods)

public:
virtual~HLFactory()
voidTObject::AbstractMethod(const char* method) const
intAddChannel(const char* label, const char* SigBkgPdfName, const char* BkgPdfName = 0, const char* datasetName = 0)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
voidDumpCfg(const char* cardname)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TNamed::GetTitle() const
RooAbsPdf*GetTotBkgPdf()
RooCategory*GetTotCategory()
RooDataSet*GetTotDataSet()
RooAbsPdf*GetTotSigBkgPdf()
virtual UInt_tTObject::GetUniqueID() const
RooWorkspace*GetWs()
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
RooStats::HLFactoryHLFactory()
RooStats::HLFactoryHLFactory(const char* name, const char* fileName = 0, bool isVerbose = false)
RooStats::HLFactoryHLFactory(const char* name, RooWorkspace* externalWs, bool isVerbose = false)
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TNamed&TNamed::operator=(const TNamed& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
intProcessCard(const char* filename)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
voidfCreateCategory()
boolfNamesListsConsistent()
intfParseLine(TString& line)
intfReadFile(const char* fileName, bool is_included = false)

Data Members

protected:
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
private:
TListfBkgPdfNames
boolfCombinationDone
RooAbsPdf*fComboBkgPdf
RooCategory*fComboCat
RooDataSet*fComboDataset
RooAbsPdf*fComboSigBkgPdf
TListfDatasetsNames
intfInclusionLevel
TListfLabelsNames
boolfOwnWs
TListfSigBkgPdfNames
boolfVerbose
RooWorkspace*fWs

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HLFactory(const char* name, const char* fileName = 0, bool isVerbose = false)
 Constructor with the name of the config file to interpret and the
 verbosity flag. The extension for the config files is assumed to
 be ".rs".
HLFactory(const char* name, RooWorkspace* externalWs, bool isVerbose = false)
 Constructor without a card but with an exrernal workspace.
HLFactory()
~HLFactory()
 destructor
int AddChannel(const char* label, const char* SigBkgPdfName, const char* BkgPdfName = 0, const char* datasetName = 0)
 Add a channel to the combination. The channel can be specified as:
  - A signal plus background pdf
  - A background only pdf
  - A dataset
 Once the combination of the pdfs is done, no more channels should be
 added.
RooAbsPdf* GetTotSigBkgPdf()
 Return the combination of the signal plus background channels.
 The facory owns the object.
RooAbsPdf* GetTotBkgPdf()
 Return the combination of the background only channels.
 If no background channel is specified a NULL pointer is returned.
 The facory owns the object.
RooDataSet* GetTotDataSet()
 Return the combination of the datasets.
 If no dataset is specified a NULL pointer is returned.
 The facory owns the object.
RooCategory* GetTotCategory()
 Return the category.
 The facory owns the object.
int ProcessCard(const char* filename)
 Process an additional configuration file
int fReadFile(const char* fileName, bool is_included = false)
 Parses the configuration file. The objects can be specified following
 the rules of the RooFactoryWSTool, plus some more flexibility.

 The official format for the datacards is ".rs".

 All the instructions end with a ";" (like in C++).

 Carriage returns and white lines are irrelevant but adviced since they
 improve readability (like in C++).

 The (Roo)ClassName::objname(description) can be replaced with the more
 "pythonic" objname = (Roo)ClassName(description).

 The comments can be specified with a "//" if on a single line or with
 /* */ if on multiple lines (like in C++).

 The "#include path/to/file.rs" statement triggers the inclusion of a
 configuration fragment.

 The "import myobject:myworkspace:myrootfile" will add to the Workspace
 the object myobject located in myworkspace recorded in myrootfile.
 Alternatively, one could choose the "import myobject:myrootfile" in case
 no Workspace is present.

 The "echo" statement prompts a message on screen.
void fCreateCategory()
 Builds the category necessary for the mutidimensional models. Its name
 will be <HLFactory name>_category and the types are specified by the
 model labels.
bool fNamesListsConsistent()
 Check the number of entries in each list. If not the same and the list
 is not empty prompt an error.
int fParseLine(TString& line)
 Parse a single line and puts the content in the RooWorkSpace
void DumpCfg(const char* cardname)
 Dump the Workspace content as configuration file
 It needs some workspace object list or something..
{cardname=0;}
RooWorkspace* GetWs()
 Get the RooWorkspace containing the models and variables
{return fWs;}