ROOT logo
ROOT » ROOFIT » ROOFITCORE » RooAbsCollection

class RooAbsCollection: public TObject, public RooPrintable



RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects. Collections are ordered and can contain multiple objects of the same name, (but a derived implementation can enforce unique names). The storage of objects in implement through class RooLinkedList, a doubly linked list with an an optional hash-table lookup mechanism for fast indexing of large collections.


Function Members (Methods)

 
    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

public:
virtual~RooAbsCollection()
voidTObject::AbstractMethod(const char* method) const
virtual Bool_tadd(const RooAbsArg& var, Bool_t silent = kFALSE)
virtual Bool_tadd(const RooAbsCollection& list, Bool_t silent = kFALSE)
virtual RooAbsArg*addClone(const RooAbsArg& var, Bool_t silent = kFALSE)
virtual voidaddClone(const RooAbsCollection& list, Bool_t silent = kFALSE)
virtual Bool_taddOwned(RooAbsArg& var, Bool_t silent = kFALSE)
virtual Bool_taddOwned(const RooAbsCollection& list, Bool_t silent = kFALSE)
Bool_tallInRange(const char* rangeSpec) const
virtual voidTObject::AppendPad(Option_t* option = "")
voidassignFast(const RooAbsCollection& other, Bool_t setValDirty = kTRUE)
RooAbsCollection&assignValueOnly(const RooAbsCollection& other, Bool_t oneSafe = kFALSE)
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*clone(const char* newname) const
virtual TObject*Clone(const char* newname = 0) const
virtual Int_tTObject::Compare(const TObject* obj) const
Bool_tcontains(const RooAbsArg& var) const
Bool_tcontainsInstance(const RooAbsArg& var) const
stringcontentsString() const
virtual voidTObject::Copy(TObject& object) const
virtual TObject*create(const char* newname) const
TIterator*createIterator(Bool_t dir = kIterForward) const
virtual Int_tdefaultPrintContents(Option_t* opt) const
static ostream&RooPrintable::defaultPrintStream(ostream* os = 0)
virtual RooPrintable::StyleOptionRooPrintable::defaultPrintStyle(Option_t* opt) 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
voiddump() const
virtual voidTObject::Dump() constMENU
Bool_tequals(const RooAbsCollection& otherColl) const
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
RooAbsArg*find(const char* name) const
RooAbsArg*find(const RooAbsArg&) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
RooAbsArg*first() const
RooFIterfwdIterator() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Int_tgetHashTableSize() const
virtual const char*TObject::GetIconName() const
virtual const char*GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Int_tgetSize() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
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
Bool_tisOwning() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
RooLinkedListIteriterator(Bool_t dir = kIterForward) const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
static voidRooPrintable::nameFieldLength(Int_t newLen)
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
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)
RooAbsCollection&operator=(const RooAbsCollection& other)
Bool_toverlaps(const RooAbsCollection& otherColl) const
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* options = 0) const
virtual voidRooPrintable::printAddress(ostream& os) const
virtual voidRooPrintable::printArgs(ostream& os) const
virtual voidprintClassName(ostream& os) const
virtual voidRooPrintable::printExtras(ostream& os) const
voidprintLatex(ostream& ofs, Int_t ncol, const char* option = "NEYU", Int_t sigDigit = 1, const RooLinkedList& siblingLists = RooLinkedList(), const RooCmdArg* formatCmd = 0) const
voidprintLatex(const RooCmdArg& arg1 = RooCmdArg(), const RooCmdArg& arg2 = RooCmdArg(), const RooCmdArg& arg3 = RooCmdArg(), const RooCmdArg& arg4 = RooCmdArg(), const RooCmdArg& arg5 = RooCmdArg(), const RooCmdArg& arg6 = RooCmdArg(), const RooCmdArg& arg7 = RooCmdArg(), const RooCmdArg& arg8 = RooCmdArg()) const
virtual voidprintMultiline(ostream& os, Int_t contents, Bool_t verbose = kFALSE, TString indent = "") const
virtual voidprintName(ostream& os) const
virtual voidRooPrintable::printStream(ostream& os, Int_t contents, RooPrintable::StyleOption style, TString indent = "") const
virtual voidprintTitle(ostream& os) const
virtual voidRooPrintable::printTree(ostream& os, TString indent = "") const
virtual voidprintValue(ostream& os) const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidreleaseOwnership()
virtual Bool_tremove(const RooAbsArg& var, Bool_t silent = kFALSE, Bool_t matchByNameOnly = kFALSE)
Bool_tremove(const RooAbsCollection& list, Bool_t silent = kFALSE, Bool_t matchByNameOnly = kFALSE)
virtual voidremoveAll()
Bool_treplace(const RooAbsCollection& other)
virtual Bool_treplace(const RooAbsArg& var1, const RooAbsArg& var2)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
RooAbsCollection*selectByAttrib(const char* name, Bool_t value) const
RooAbsCollection*selectByName(const char* nameList, Bool_t verbose = kFALSE) const
RooAbsCollection*selectCommon(const RooAbsCollection& refColl) const
voidsetAttribAll(const Text_t* name, Bool_t value = kTRUE)
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)
voidsetHashTableSize(Int_t i)
voidsetName(const char* name)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp)
RooAbsCollection*snapshot(Bool_t deepCopy = kTRUE) const
Bool_tsnapshot(RooAbsCollection& output, Bool_t deepCopy = kTRUE) const
voidsort(Bool_t ascend = kTRUE)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
voidtakeOwnership()
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:
Bool_taddServerClonesToList(const RooAbsArg& var)
voidclearStructureTags()
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidmakeStructureTag()
voidmakeTypedStructureTag()
voidTObject::MakeZombie()
voidsafeDeleteList()
TNamed*structureTag()
TNamed*typedStructureTag()

Data Members

protected:
Bool_t_allRRVAll contents are RRV
RooLinkedList_listActual object store
TString_nameOur name.
static Int_tRooPrintable::_nameLength
Bool_t_ownContFlag to identify a list that owns its contents.
TNamed*_structureTag! Structure tag
TNamed*_typedStructureTag! Typed structure tag

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

~RooAbsCollection()
 Destructor
RooLinkedListIter iterator(Bool_t dir = kIterForward) const
RooFIter fwdIterator() const
void safeDeleteList()
 Examine client server dependencies in list and
 delete contents in safe order: any client
 is deleted before a server is deleted
RooAbsCollection* snapshot(Bool_t deepCopy = kTRUE) const
 Take a snap shot of current collection contents:
 An owning collection is returned containing clones of

     - Elements in this collection
     - External dependents of all elements
       and recursively any dependents of those dependents
       (if deepCopy flag is set)

 If deepCopy is specified, the client-server links between the cloned
 list elements and the cloned external dependents are reconnected to
 each other, making the snapshot a completely self-contained entity.


Bool_t snapshot(RooAbsCollection& output, Bool_t deepCopy = kTRUE) const
 Take a snap shot of current collection contents:
 An owning collection is returned containing clones of

     - Elements in this collection
     - External dependents of all elements
       and recursively any dependents of those dependents
       (if deepCopy flag is set)

 If deepCopy is specified, the client-server links between the cloned
 list elements and the cloned external dependents are reconnected to
 each other, making the snapshot a completely self-contained entity.


Bool_t addServerClonesToList(const RooAbsArg& var)
 Add clones of servers of given argument to list
RooAbsCollection & operator=(const RooAbsCollection& other)
 The assignment operator sets the value of any argument in our set
 that also appears in the other set.
RooAbsCollection & assignValueOnly(const RooAbsCollection& other, Bool_t oneSafe = kFALSE)
 The assignment operator sets the value of any argument in our set
 that also appears in the other set.
void assignFast(const RooAbsCollection& other, Bool_t setValDirty = kTRUE)
 Functional equivalent of operator=() but assumes this and other collection
 have same layout. Also no attributes are copied
Bool_t addOwned(RooAbsArg& var, Bool_t silent = kFALSE)
 Add the specified argument to list. Returns kTRUE if successful, or
 else kFALSE if a variable of the same name is already in the list.
 This method can only be called on a list that is flagged as owning
 all of its contents, or else on an empty list (which will force the
 list into that mode).
RooAbsArg * addClone(const RooAbsArg& var, Bool_t silent = kFALSE)
 Add a clone of the specified argument to list. Returns a pointer to
 the clone if successful, or else zero if a variable of the same name
 is already in the list or the list does *not* own its variables (in
 this case, try add() instead.) Calling addClone() on an empty list
 forces it to take ownership of all its subsequent variables.
Bool_t add(const RooAbsArg& var, Bool_t silent = kFALSE)
 Add the specified argument to list. Returns kTRUE if successful, or
 else kFALSE if a variable of the same name is already in the list
 or the list owns its variables (in this case, try addClone() or addOwned() instead).
Bool_t add(const RooAbsCollection& list, Bool_t silent = kFALSE)
 Add a collection of arguments to this collection by calling add()
 for each element in the source collection
Bool_t addOwned(const RooAbsCollection& list, Bool_t silent = kFALSE)
 Add a collection of arguments to this collection by calling addOwned()
 for each element in the source collection
void addClone(const RooAbsCollection& list, Bool_t silent = kFALSE)
 Add a collection of arguments to this collection by calling addOwned()
 for each element in the source collection
Bool_t replace(const RooAbsCollection& other)
 Replace any args in our set with args of the same name from the other set
 and return kTRUE for success. Fails if this list is a copy of another.
Bool_t replace(const RooAbsArg& var1, const RooAbsArg& var2)
 Replace var1 with var2 and return kTRUE for success. Fails if
 this list is a copy of another, if var1 is not already in this set,
 or if var2 is already in this set. var1 and var2 do not need to have
 the same name.
Bool_t remove(const RooAbsArg& var, Bool_t silent = kFALSE, Bool_t matchByNameOnly = kFALSE)
 Remove the specified argument from our list. Return kFALSE if
 the specified argument is not found in our list. An exact pointer
 match is required, not just a match by name. A variable can be
 removed from a copied list and will be deleted at the same time.
Bool_t remove(const RooAbsCollection& list, Bool_t silent = kFALSE, Bool_t matchByNameOnly = kFALSE)
 Remove each argument in the input list from our list using remove(const RooAbsArg&).
 Return kFALSE in case of problems.
void removeAll()
 Remove all arguments from our set, deleting them if we own them.
 This effectively restores our object to the state it would have
 just after calling the RooAbsCollection(const char*) constructor.
void setAttribAll(const Text_t* name, Bool_t value = kTRUE)
 Set given attribute in each element of the collection by
 calling each elements setAttribute() function.
RooAbsCollection* selectByAttrib(const char* name, Bool_t value) const
 Create a subset of the current collection, consisting only of those
 elements with the specified attribute set. The caller is responsibe
 for deleting the returned collection
RooAbsCollection* selectCommon(const RooAbsCollection& refColl) const
 Create a subset of the current collection, consisting only of those
 elements that are contained as well in the given reference collection.
 The caller is responsible for deleting the returned collection
RooAbsCollection* selectByName(const char* nameList, Bool_t verbose = kFALSE) const
 Create a subset of the current collection, consisting only of those
 elements with names matching the wildcard expressions in nameList,
 supplied as a comma separated list
Bool_t equals(const RooAbsCollection& otherColl) const
 Check if this and other collection have identically named contents
Bool_t overlaps(const RooAbsCollection& otherColl) const
 Check if this and other collection have common entries
RooAbsArg * find(const char* name) const
 Find object with given name in list. A null pointer
 is returned if no object with the given name is found
RooAbsArg * find(const RooAbsArg& ) const
 Find object with given name in list. A null pointer
 is returned if no object with the given name is found
string contentsString() const
 Return comma separated list of contained object names as STL string
void printName(ostream& os) const
 Return collection name
void printTitle(ostream& os) const
 Return collection title
void printClassName(ostream& os) const
 Return collection class name
Int_t defaultPrintContents(Option_t* opt) const
 Define default RooPrinable print options for given Print() flag string
 For inline printing only show value of objects, for default print show
 name,class name value and extras of each object. In verbose mode
 also add object adress, argument and title
void printValue(ostream& os) const
 Print value of collection, i.e. a comma separated list of contained
 object names
void printMultiline(ostream& os, Int_t contents, Bool_t verbose = kFALSE, TString indent = "") const
 Implement multiline printin of collection, one line for each ontained object showing
 the requested content
void dump() const
 Base contents dumper for debugging purposes
void printLatex(const RooCmdArg& arg1 = RooCmdArg(), const RooCmdArg& arg2 = RooCmdArg(), const RooCmdArg& arg3 = RooCmdArg(), const RooCmdArg& arg4 = RooCmdArg(), const RooCmdArg& arg5 = RooCmdArg(), const RooCmdArg& arg6 = RooCmdArg(), const RooCmdArg& arg7 = RooCmdArg(), const RooCmdArg& arg8 = RooCmdArg()) const
 Output content of collection as LaTex table. By default a table with two columns is created: the left
 column contains the name of each variable, the right column the value.

 The following optional named arguments can be used to modify the default behavior

   Columns(Int_t ncol)                    -- Fold table into multiple columns, i.e. ncol=3 will result in 3 x 2 = 6 total columns
   Sibling(const RooAbsCollection& other) -- Define sibling list. The sibling list is assumed to have objects with the same
                                             name in the same order. If this is not the case warnings will be printed. If a single
                                             sibling list is specified, 3 columns will be output: the (common) name, the value of this
                                             list and the value in the sibling list. Multiple sibling lists can be specified by
                                             repeating the Sibling() command.
   Format(const char* str)                -- Classic format string, provided for backward compatibility
   Format(...)                            -- Formatting arguments, details are given below
   OutputFile(const char* fname)          -- Send output to file with given name rather than standard output

 The Format(const char* what,...) has the following structure

   const char* what          -- Controls what is shown. "N" adds name, "E" adds error,
                                "A" shows asymmetric error, "U" shows unit, "H" hides the value
   FixedPrecision(int n)     -- Controls precision, set fixed number of digits
   AutoPrecision(int n)      -- Controls precision. Number of shown digits is calculated from error
                                + n specified additional digits (1 is sensible default)
   VerbatimName(Bool_t flag) -- Put variable name in a \verb+   + clause.

 Example use: list.printLatex(Columns(2), Format("NEU",AutoPrecision(1),VerbatimName()) ) ;
void printLatex(ostream& ofs, Int_t ncol, const char* option = "NEYU", Int_t sigDigit = 1, const RooLinkedList& siblingLists = RooLinkedList(), const RooCmdArg* formatCmd = 0) const
 Internal implementation function of printLatex
Bool_t allInRange(const char* rangeSpec) const
 Return true if all contained object report to have their
 value inside the specified range
void makeStructureTag()
void makeTypedStructureTag()
TObject* clone(const char* newname) const
TObject* create(const char* newname) const
TObject* Clone(const char* newname = 0) const
void setHashTableSize(Int_t i)
 Hash table control
Int_t getHashTableSize() const
 Return size of internal hash table
Bool_t contains(const RooAbsArg& var) const
 Returns true if object with same name as var is contained in this collection
Bool_t containsInstance(const RooAbsArg& var) const
 Returns true if var is contained in this collection
TIterator* createIterator(Bool_t dir = kIterForward) const
 export subset of THashList interface
Int_t getSize() const
 Return the number of elements in the collection
RooAbsArg * first() const
 Return the first element in this collection
void Print(Option_t* options = 0) const
 Printing interface (human readable)
void setName(const char* name)
 Set name of collection
const char* GetName() const
 Return namer of collection
Bool_t isOwning() const
 Does collection own contents?
void releaseOwnership()
void takeOwnership()
{ _ownCont = kTRUE ; }
void sort(Bool_t ascend = kTRUE)
{ _list.Sort(ascend) ; }
TNamed* structureTag()
TNamed* typedStructureTag()
void clearStructureTags()