RooInt.cxx

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  * @(#)root/roofitcore:$Id: RooInt.cxx 36210 2010-10-08 21:59:38Z wouter $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 
00017 //////////////////////////////////////////////////////////////////////////////
00018 //
00019 // BEGIN_HTML
00020 // RooInt is a minimal implementation of a TObject holding a Int_t
00021 // value.
00022 // END_HTML
00023 //
00024 
00025 #include "RooFit.h"
00026 
00027 #include "RooInt.h"
00028 #include "RooInt.h"
00029 
00030 ClassImp(RooInt)
00031 ;
00032 
00033 
00034 
00035 //_____________________________________________________________________________
00036 Int_t RooInt::Compare(const TObject* other) const 
00037 {
00038   // Facilitate sorting of RooInts in ROOT container classes
00039   // Return -1 or +1 if 'other' is a RooInt with value
00040   // greater or lesser than self. Return zero if other
00041   // object is not a RooInt
00042 
00043   const RooInt* otherD = dynamic_cast<const RooInt*>(other) ;
00044   if (!otherD) return 0 ;
00045   return (_value>otherD->_value) ? 1 : -1 ;
00046 }

Generated on Tue Jul 5 15:06:42 2011 for ROOT_528-00b_version by  doxygen 1.5.1