Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef ROO_MULTIREAL
0002 #define ROO_MULTIREAL
0003 
0004 #include "RooAbsReal.h"
0005 #include "RooCategory.h"
0006 #include "RooCategoryProxy.h"
0007 #include "RooListProxy.h"
0008 
0009 class RooMultiReal : public RooAbsReal {
0010 public:
0011    RooMultiReal() = default;
0012    RooMultiReal(const char *name, const char *title, RooCategory &indexCat, const RooArgList &models);
0013    RooMultiReal(const RooMultiReal &other, const char *name = nullptr);
0014    virtual ~RooMultiReal() {}
0015 
0016    TObject *clone(const char *newname) const override { return new RooMultiReal(*this, newname); }
0017 
0018    inline int getCurrentIndex() const { return static_cast<int>(_index); }
0019    inline RooAbsReal *getCurrentReal() const { return static_cast<RooAbsReal *>(_models.at(getCurrentIndex())); }
0020    inline int getNumModels() const { return _models.getSize(); }
0021    inline const RooCategoryProxy &indexCategory() const { return _index; }
0022    inline const RooListProxy &getModelList() const { return _models; }
0023 
0024    void getParametersHook(const RooArgSet *nset, RooArgSet *list, bool stripDisconnected) const override;
0025 
0026 protected:
0027    RooListProxy _models;    // list of RooAbsReal models
0028    RooCategoryProxy _index; // index category proxy
0029 
0030    Double_t evaluate() const override;
0031 
0032 private:
0033    ClassDefOverride(RooMultiReal, 1)
0034 };
0035 
0036 #endif