Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
22class RooInt : public TNamed {
23public:
24
25 RooInt() : _value(0) {} ;
27 RooInt(const RooInt& other) : TNamed(other), _value(other._value) {}
28 ~RooInt() override {} ;
29
30 // double 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 override ;
36 bool IsSortable() const override { return true ; }
37
38protected:
39
40 Int_t _value ; ///< Payload
41 ClassDefOverride(RooInt,1) // Container class for Int_t
42};
43
44#endif
int Int_t
Definition RtypesCore.h:45
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
RooInt is a minimal implementation of a TObject holding a Int_t value.
Definition RooInt.h:22
RooInt & operator=(Int_t value)
Definition RooInt.h:32
RooInt()
Definition RooInt.h:25
RooInt(const RooInt &other)
Definition RooInt.h:27
~RooInt() override
Definition RooInt.h:28
Int_t _value
Payload.
Definition RooInt.h:40
Int_t Compare(const TObject *other) const override
Facilitate sorting of RooInts in ROOT container classes Return -1 or +1 if 'other' is a RooInt with v...
Definition RooInt.cxx:41
bool IsSortable() const override
Definition RooInt.h:36
RooInt(Int_t value)
Definition RooInt.h:26
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
Mother of all ROOT objects.
Definition TObject.h:41