Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/Roo1DTable.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitCore                                                       *
0004  *    File: $Id: Roo1DTable.h,v 1.19 2007/05/11 09:11:30 verkerke Exp $
0005  * Authors:                                                                  *
0006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
0007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
0008  *                                                                           *
0009  * Copyright (c) 2000-2005, Regents of the University of California          *
0010  *                          and Stanford University. All rights reserved.    *
0011  *                                                                           *
0012  * Redistribution and use in source and binary forms,                        *
0013  * with or without modification, are permitted according to the terms        *
0014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0015  *****************************************************************************/
0016 #ifndef ROO_1D_TABLE
0017 #define ROO_1D_TABLE
0018 
0019 #include "TObjArray.h"
0020 #include "RooTable.h"
0021 #include <vector>
0022 
0023 class Roo1DTable : public RooTable {
0024 public:
0025 
0026   // Constructors, cloning and assignment
0027   Roo1DTable() {
0028     // Default constructor
0029     // coverity[UNINIT_CTOR]
0030   } ;
0031   ~Roo1DTable() override;
0032   Roo1DTable(const char *name, const char *title, const RooAbsCategory &cat);
0033   Roo1DTable(const Roo1DTable& other) ;
0034 
0035   void fill(RooAbsCategory& cat, double weight=1.0) override ;
0036   double get(const char* label, bool silent=false) const ;
0037   double getFrac(const char* label, bool silent=false) const ;
0038   double get(const int index, bool silent=false) const ;
0039   double getFrac(const int index, bool silent=false) const ;
0040   double getOverflow() const ;
0041 
0042   // Printing interface (human readable)
0043   void printName(std::ostream& os) const override ;
0044   void printTitle(std::ostream& os) const override ;
0045   void printClassName(std::ostream& os) const override ;
0046   void printValue(std::ostream& os) const override ;
0047   void printMultiline(std::ostream& os, Int_t contents, bool verbose=false, TString indent="") const override ;
0048   Int_t defaultPrintContents(Option_t* opt) const override ;
0049 
0050   inline void Print(Option_t *options= nullptr) const override {
0051     // Printing interface (human readable)
0052     printStream(defaultPrintStream(),defaultPrintContents(options),defaultPrintStyle(options));
0053   }
0054 
0055   bool isIdentical(const RooTable& other, bool verbose) override ;
0056 
0057 protected:
0058 
0059 
0060   TObjArray _types ;             ///< Array of defined category states
0061   std::vector<double> _count ; ///< Array of counters for each state
0062   double  _total ;             ///< Total number of entries
0063   double  _nOverflow ;         ///< Number of overflow entries
0064 
0065   ClassDefOverride(Roo1DTable,1) // 1-dimensional table
0066 };
0067 
0068 #endif