RooThreshEntry.cxx

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  * @(#)root/roofitcore:$Id: RooThreshEntry.cxx 24285 2008-06-16 15:05:15Z 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 // Class RooThreshEntry is a utility class for RooThresholdCategory
00021 // END_HTML
00022 //
00023 
00024 #include "RooFit.h"
00025 
00026 #include "TClass.h"
00027 #include "TClass.h"
00028 #include "RooThreshEntry.h"
00029 
00030 ClassImp(RooThreshEntry)
00031 ;
00032 
00033 
00034 //_____________________________________________________________________________
00035 RooThreshEntry::RooThreshEntry(Double_t inThresh, const RooCatType& inCat) : 
00036   _thresh(inThresh), _cat(inCat) 
00037 {
00038   // Constructor with threshold value and associated category value
00039 }
00040 
00041 
00042 
00043 //_____________________________________________________________________________
00044 RooThreshEntry::RooThreshEntry(const RooThreshEntry& other) : 
00045   TObject(other), _thresh(other._thresh), _cat(other._cat) 
00046 {
00047   // Copy constructor
00048 }
00049 
00050 
00051 
00052 //_____________________________________________________________________________
00053 Int_t RooThreshEntry::Compare(const TObject* other) const 
00054 {
00055   // Implement TObject Compare() operator to facilitate sorting of 
00056   // RooThreshEntry object in ROOT collection. Only comparison
00057   // to other RooThreshEntry objects is supported
00058 
00059   // Can only compare objects of same type
00060   if (!other->IsA()->InheritsFrom(RooThreshEntry::Class())) return 0 ;
00061 
00062   RooThreshEntry* otherTE = (RooThreshEntry*) other ;
00063   return (_thresh < otherTE->_thresh) ? -1 : 1 ;
00064 }
00065 
00066 

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