64 for (
int i=0 ; i<nbin ; i++)
_count[i] = 0 ;
73 RooTable(other), _count(other._count), _total(other._total), _nOverflow(other._nOverflow)
105 if (weight==0) return ;
151 os << IsA()->GetName() ;
196 Int_t labelWidth(0) ;
206 labelWidth = lwidth > labelWidth ? lwidth : labelWidth;
211 labelWidth=labelWidth>8?labelWidth:8 ;
217 os <<
indent <<
" +-" << setw(labelWidth) << setfill(
'-') <<
"-" <<
"-+-" << setw(countWidth) <<
"-" <<
"-+" << endl ;
223 if (
_count[i]>0 || verbose) {
224 os <<
" | " << setw(labelWidth) << entry->
GetName() <<
" | " << setw(countWidth) <<
_count[i] <<
" |" << endl ;
230 os <<
indent <<
" +-" << setw(labelWidth) << setfill(
'-') <<
"-" <<
"-+-" << setw(countWidth) <<
"-" <<
"-+" << endl ;
231 os <<
indent <<
" | " <<
"Overflow" <<
" | " << setw(countWidth) <<
_nOverflow <<
" |" << endl ;
235 os <<
indent <<
" +-" << setw(labelWidth) << setfill(
'-') <<
"-" <<
"-+-" << setw(countWidth) <<
"-" <<
"-+" << endl ;
252 coutE(InputArguments) <<
"Roo1DTable::get: ERROR: no such entry: " << label << endl ;
271 if (cat->
getVal() == index) {
279 coutE(InputArguments) <<
"Roo1DTable::get: ERROR: no such entry: " << index << endl ;
308 if (!silent)
coutW(Contents) <<
"Roo1DTable::getFrac: WARNING table empty, returning 0" << endl ;
325 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.
virtual Bool_t isIdentical(const RooTable &other, bool verbose)
Return true if table is identical in contents to given reference table.
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.
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.