Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
RooInt.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooInt.h,v 1.6 2007/05/11 09:11:30 verkerke Exp $
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_INT
17 #define ROO_INT
18 
19 #include "Rtypes.h"
20 #include "TNamed.h"
21 
22 class RooInt : public TNamed {
23 public:
24 
25  RooInt() : _value(0) {} ;
26  RooInt(Int_t value) : TNamed(), _value(value) {} ;
27  RooInt(const RooInt& other) : TNamed(other), _value(other._value) {}
28  virtual ~RooInt() {} ;
29 
30  // Double_t cast operator
31  inline operator Int_t() const { return _value ; }
32  RooInt& operator=(Int_t value) { _value = value ; return *this ; }
33 
34  // Sorting interface ;
35  Int_t Compare(const TObject* other) const ;
36  virtual Bool_t IsSortable() const { return kTRUE ; }
37 
38 protected:
39 
40  Int_t _value ; // Payload
41  ClassDef(RooInt,1) // Container class for Int_t
42 };
43 
44 #endif