Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooBinningCategory.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$
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_BINNING_CATEGORY
0017 #define ROO_BINNING_CATEGORY
0018 
0019 #include "RooAbsCategory.h"
0020 #include "RooTemplateProxy.h"
0021 #include "TString.h"
0022 
0023 class RooBinningCategory : public RooAbsCategory {
0024 
0025 public:
0026   RooBinningCategory() = default;
0027   RooBinningCategory(const char *name, const char *title, RooAbsRealLValue& inputVar, const char* binningName=nullptr, const char* catTypeName=nullptr);
0028   RooBinningCategory(const RooBinningCategory& other, const char *name=nullptr) ;
0029   TObject* clone(const char* newname) const override { return new RooBinningCategory(*this, newname); }
0030 
0031   /// Printing interface (human readable)
0032   void printMultiline(std::ostream& os, Int_t content, bool verbose=false, TString indent="") const override ;
0033 
0034 protected:
0035 
0036   void initialize(const char* catTypeName=nullptr) ;
0037 
0038   RooTemplateProxy<RooAbsRealLValue> _inputVar; ///< Input variable that is mapped
0039   TString _bname ;         ///< Name of the binning specification to be used to perform the mapping
0040 
0041   value_type evaluate() const override;
0042   /// The shape of this category does not need to be recomputed, as it creates states on the fly.
0043   void recomputeShape() override { }
0044 
0045   ClassDefOverride(RooBinningCategory,1) // RealVar-to-Category function defined by bin boundaries on input var
0046 };
0047 
0048 #endif