Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooMultiCategory.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: RooMultiCategory.h,v 1.9 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_MULTI_CATEGORY
0017 #define ROO_MULTI_CATEGORY
0018 
0019 class TObject;
0020 #include "RooAbsCategoryLValue.h"
0021 #include "RooArgSet.h"
0022 #include "RooSetProxy.h"
0023 #include <string>
0024 
0025 class RooSuperCategory;
0026 
0027 
0028 class RooMultiCategory : public RooAbsCategory {
0029 public:
0030   // Constructors etc.
0031   inline RooMultiCategory() { setShapeDirty(); }
0032   RooMultiCategory(const char *name, const char *title, const RooArgSet& inputCatList);
0033   RooMultiCategory(const RooMultiCategory& other, const char *name=nullptr) ;
0034   TObject* clone(const char* newname) const override { return new RooMultiCategory(*this,newname); }
0035 
0036   // Printing interface (human readable)
0037   void printMultiline(std::ostream& os, Int_t content, bool verbose=false, TString indent="") const override;
0038 
0039   /// Multi categories cannot be read from streams.
0040   bool readFromStream(std::istream& /*is*/, bool /*compact*/, bool /*verbose=false*/) override { return true; }
0041   void writeToStream(std::ostream& os, bool compact) const override;
0042 
0043   const RooArgSet& inputCatList() const { return _catSet ; }
0044   const char* getCurrentLabel() const override;
0045 
0046 protected:
0047 
0048   std::string createLabel() const;
0049   value_type evaluate() const override;
0050   void recomputeShape() override;
0051 
0052   RooSetProxy _catSet ; ///< Set of input category
0053 
0054   friend class RooSuperCategory;
0055   ClassDefOverride(RooMultiCategory,1) // Product operator for categories
0056 };
0057 
0058 #endif