Roo1DTable.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: Roo1DTable.h,v 1.19 2007/05/11 09:11:30 verkerke Exp $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 #ifndef ROO_1D_TABLE
00017 #define ROO_1D_TABLE
00018 
00019 #include "Riosfwd.h"
00020 #include <assert.h>
00021 #include "TObjArray.h"
00022 #include "RooTable.h"
00023 #include <vector>
00024 
00025 class Roo1DTable : public RooTable {
00026 public:
00027 
00028   // Constructors, cloning and assignment
00029   Roo1DTable() {
00030     // Default constructor
00031     // coverity[UNINIT_CTOR]
00032   } ;
00033   virtual ~Roo1DTable();
00034   Roo1DTable(const char *name, const char *title, const RooAbsCategory &cat);
00035   Roo1DTable(const Roo1DTable& other) ;
00036 
00037   virtual void fill(RooAbsCategory& cat, Double_t weight=1.0) ;
00038   Double_t get(const char* label, Bool_t silent=kFALSE) const ;
00039   Double_t getFrac(const char* label, Bool_t silent=kFALSE) const ;
00040   Double_t getOverflow() const ;
00041 
00042   // Printing interface (human readable)
00043   virtual void printName(ostream& os) const ;
00044   virtual void printTitle(ostream& os) const ;
00045   virtual void printClassName(ostream& os) const ;
00046   virtual void printValue(ostream& os) const ;
00047   virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const ;
00048   virtual Int_t defaultPrintContents(Option_t* opt) const ;
00049 
00050   inline virtual void Print(Option_t *options= 0) const {
00051     // Printing interface (human readable)
00052     printStream(defaultPrintStream(),defaultPrintContents(options),defaultPrintStyle(options));
00053   }
00054 
00055   virtual Bool_t isIdentical(const RooTable& other) ;
00056 
00057 protected:
00058 
00059   
00060   TObjArray _types ;             // Array of defined category states
00061   std::vector<Double_t> _count ; // Array of counters for each state
00062   Double_t  _total ;             // Total number of entries
00063   Double_t  _nOverflow ;         // Number of overflow entries
00064 
00065   ClassDef(Roo1DTable,1) // 1-dimensional table
00066 };
00067 
00068 #endif

Generated on Tue Jul 5 14:25:55 2011 for ROOT_528-00b_version by  doxygen 1.5.1