65 for (
int i=0 ; i<nbin ; i++)
_count[i] = 0 ;
74 RooTable(other), _count(other._count), _total(other._total), _nOverflow(other._nOverflow)
106 if (weight==0) return ;
152 os << IsA()->GetName() ;
197 Int_t labelWidth(0) ;
207 labelWidth = lwidth > labelWidth ? lwidth : labelWidth;
212 labelWidth=labelWidth>8?labelWidth:8 ;
218 os <<
indent <<
" +-" << setw(labelWidth) << setfill(
'-') <<
"-" <<
"-+-" << setw(countWidth) <<
"-" <<
"-+" << endl ;
225 os <<
" | " << setw(labelWidth) << entry->
GetName() <<
" | " << setw(countWidth) <<
_count[i] <<
" |" << endl ;
231 os <<
indent <<
" +-" << setw(labelWidth) << setfill(
'-') <<
"-" <<
"-+-" << setw(countWidth) <<
"-" <<
"-+" << endl ;
232 os <<
indent <<
" | " <<
"Overflow" <<
" | " << setw(countWidth) <<
_nOverflow <<
" |" << endl ;
236 os <<
indent <<
" +-" << setw(labelWidth) << setfill(
'-') <<
"-" <<
"-+-" << setw(countWidth) <<
"-" <<
"-+" << endl ;
272 if (cat->
getVal() == index) {
309 if (!silent)
coutW(
Contents) <<
"Roo1DTable::getFrac: WARNING table empty, returning 0" << endl ;
326 if (!silent)
coutW(
Contents) <<
"Roo1DTable::getFrac: WARNING table empty, returning 0" << endl ;
static void indent(ostringstream &buf, int indent_level)
Roo1DTable implements a one-dimensional table.
virtual void printValue(std::ostream &os) const
Print the table value, i.e. the contents, in 'inline' format.
Double_t get(const char *label, Bool_t silent=kFALSE) const
Return the table entry named 'label'.
Double_t getFrac(const char *label, Bool_t silent=kFALSE) const
Return the fraction of entries in the table contained in the slot named 'label'.
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default contents to print.
virtual void printTitle(std::ostream &os) const
Print the title of the table.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Print the formatted table contents on the given stream.
virtual void fill(RooAbsCategory &cat, Double_t weight=1.0)
Increment the counter of the table slot with the name corresponding to that of the current category s...
virtual ~Roo1DTable()
Destructor.
Double_t getOverflow() const
Return the number of overflow entries in the table.
virtual void printClassName(std::ostream &os) const
Print the class name of the table.
virtual void printName(std::ostream &os) const
Print the name of the table.
virtual Bool_t isIdentical(const RooTable &other)
Return true if table is identical in contents to given reference table.
std::vector< Double_t > _count
RooAbsCategory is the base class for objects that represent a discrete value with a finite number of ...
virtual value_type getCurrentIndex() const
Return index number of current state.
TIterator * typeIterator() const
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state.
virtual const Text_t * GetName() const
Returns name of object.
RooTable is the abstract interface for table objects.
Iterator abstract base class.
virtual TObject * Next()=0
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
Int_t IndexOf(const TObject *obj) const
Int_t GetEntries() const
Return the number of objects in array (i.e.
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
TObject * At(Int_t idx) const
Mother of all ROOT objects.