Logo ROOT  
Reference Guide
RooInt.cxx
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * @(#)root/roofitcore:$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
17/**
18\file RooInt.cxx
19\class RooInt
20\ingroup Roofitcore
21
22RooInt is a minimal implementation of a TObject holding a Int_t
23value.
24**/
25
26#include "RooInt.h"
27
28using namespace std;
29
31;
32
33
34
35////////////////////////////////////////////////////////////////////////////////
36/// Facilitate sorting of RooInts in ROOT container classes
37/// Return -1 or +1 if 'other' is a RooInt with value
38/// greater or lesser than self. Return zero if other
39/// object is not a RooInt
40
41Int_t RooInt::Compare(const TObject* other) const
42{
43 const RooInt* otherD = dynamic_cast<const RooInt*>(other) ;
44 if (!otherD) return 0 ;
45 return (_value>otherD->_value) ? 1 : -1 ;
46}
#define ClassImp(name)
Definition: Rtypes.h:375
RooInt is a minimal implementation of a TObject holding a Int_t value.
Definition: RooInt.h:22
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
Mother of all ROOT objects.
Definition: TObject.h:37