Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
RooDataHistSliceIter.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id$
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 #ifndef ROO_DATA_HIST_SLICE_ITER
17 #define ROO_DATA_HIST_SLICE_ITER
18 
19 #include "TIterator.h"
20 #include "RooArgSet.h"
21 #include "TObjString.h"
22 class RooDataHist ;
23 
24 typedef TIterator* pTIterator ;
25 
26 class RooDataHistSliceIter : public TIterator {
27 public:
28  // Constructors, assignment etc.
29  RooDataHistSliceIter(const RooDataHistSliceIter& other) ;
30  virtual ~RooDataHistSliceIter() ;
31 
32  // Iterator implementation
33  virtual const TCollection* GetCollection() const ;
34  virtual TObject* Next() ;
35  virtual void Reset() ;
36  virtual bool operator!=(const TIterator &aIter) const ;
37  virtual TObject *operator*() const ;
38 protected:
39 
40  friend class RooDataHist ;
41  RooDataHistSliceIter(RooDataHist& hist, RooAbsArg& sliceArg) ;
42 
43  RooDataHist* _hist ;
44  RooAbsArg* _sliceArg ;
45  Int_t _baseIndex ;
46  Int_t _stepSize ;
47  Int_t _nStep ;
48  Int_t _curStep ;
49 
50  TIterator& operator=(const TIterator&) {
51  // Prohibit iterator assignment
52  return *this ;
53  }
54 
55  ClassDef(RooDataHistSliceIter,0) // Iterator over a one-dimensional slice of a RooDataHist
56 };
57 
58 #endif