62 for (
int i=0 ; i<nbin ; i++)
_count[i] = 0 ;
71 RooTable(other), _count(other._count), _total(other._total), _nOverflow(other._nOverflow)
103 if (weight==0) return ;
149 os << IsA()->GetName() ;
194 Int_t labelWidth(0) ;
204 labelWidth = lwidth > labelWidth ? lwidth : labelWidth;
209 labelWidth=labelWidth>8?labelWidth:8 ;
215 os <<
indent <<
" +-" << setw(labelWidth) << setfill(
'-') <<
"-" <<
"-+-" << setw(countWidth) <<
"-" <<
"-+" << endl ;
222 os <<
" | " << setw(labelWidth) << entry->
GetName() <<
" | " << setw(countWidth) <<
_count[i] <<
" |" << endl ;
228 os <<
indent <<
" +-" << setw(labelWidth) << setfill(
'-') <<
"-" <<
"-+-" << setw(countWidth) <<
"-" <<
"-+" << endl ;
229 os <<
indent <<
" | " <<
"Overflow" <<
" | " << setw(countWidth) <<
_nOverflow <<
" |" << endl ;
233 os <<
indent <<
" +-" << setw(labelWidth) << setfill(
'-') <<
"-" <<
"-+-" << setw(countWidth) <<
"-" <<
"-+" << endl ;
269 if (cat->
getVal() == index) {
306 if (!silent)
coutW(
Contents) <<
"Roo1DTable::getFrac: WARNING table empty, returning 0" << endl ;
323 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 common abstract base class for objects that represent a discrete value with a f...
virtual Int_t getIndex() const
Return index number of current state.
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.