/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitModels                                                     *
 *    File: $Id$
 * Authors:                                                                  *
 *    Tristan du Pree, Nikhef, Amsterdam, tdupree@nikhef.nl                  *
 *                                                                           *
 * Copyright (c) 2000-2005, Stanford University. All rights reserved.        *
 *           
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/
#ifndef ROO_STEP_FUNCTION
#define ROO_STEP_FUNCTION

#include "TArrayD.h"
#include "RooAbsReal.h"
#include "RooRealProxy.h"
#include "RooListProxy.h"

class RooRealVar;
class RooArgList ;

class RooStepFunction : public RooAbsReal {
 public:

  RooStepFunction() ;
  RooStepFunction(const char *name, const char *title,
		  RooAbsReal& x, const RooArgList& coefList, const RooArgList& limits, Bool_t interpolate=kFALSE) ;

  RooStepFunction(const RooStepFunction& other, const char* name = 0);
  virtual TObject* clone(const char* newname) const { return new RooStepFunction(*this, newname); }
  virtual ~RooStepFunction() ;

  const RooArgList& coefficients() { return _coefList; }
  const RooArgList& boundaries() { return _boundaryList; }

 protected:
  
  Double_t evaluate() const;

 private:

  RooRealProxy _x;
  RooListProxy _coefList ;
  RooListProxy _boundaryList ;
  Bool_t       _interpolate ;
  TIterator* _coefIter ;  //! do not persist
  TIterator* _boundIter ;  //! do not persist

  ClassDef(RooStepFunction,1) //  Step Function
};

#endif
 RooStepFunction.h:1
 RooStepFunction.h:2
 RooStepFunction.h:3
 RooStepFunction.h:4
 RooStepFunction.h:5
 RooStepFunction.h:6
 RooStepFunction.h:7
 RooStepFunction.h:8
 RooStepFunction.h:9
 RooStepFunction.h:10
 RooStepFunction.h:11
 RooStepFunction.h:12
 RooStepFunction.h:13
 RooStepFunction.h:14
 RooStepFunction.h:15
 RooStepFunction.h:16
 RooStepFunction.h:17
 RooStepFunction.h:18
 RooStepFunction.h:19
 RooStepFunction.h:20
 RooStepFunction.h:21
 RooStepFunction.h:22
 RooStepFunction.h:23
 RooStepFunction.h:24
 RooStepFunction.h:25
 RooStepFunction.h:26
 RooStepFunction.h:27
 RooStepFunction.h:28
 RooStepFunction.h:29
 RooStepFunction.h:30
 RooStepFunction.h:31
 RooStepFunction.h:32
 RooStepFunction.h:33
 RooStepFunction.h:34
 RooStepFunction.h:35
 RooStepFunction.h:36
 RooStepFunction.h:37
 RooStepFunction.h:38
 RooStepFunction.h:39
 RooStepFunction.h:40
 RooStepFunction.h:41
 RooStepFunction.h:42
 RooStepFunction.h:43
 RooStepFunction.h:44
 RooStepFunction.h:45
 RooStepFunction.h:46
 RooStepFunction.h:47
 RooStepFunction.h:48
 RooStepFunction.h:49
 RooStepFunction.h:50
 RooStepFunction.h:51
 RooStepFunction.h:52
 RooStepFunction.h:53
 RooStepFunction.h:54
 RooStepFunction.h:55
 RooStepFunction.h:56
 RooStepFunction.h:57
 RooStepFunction.h:58