Logo ROOT   6.14/05
Reference Guide
RooThreshEntry.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 RooThreshEntry.cxx
19 \class RooThreshEntry
20 \ingroup Roofitcore
21 
22 Class RooThreshEntry is a utility class for RooThresholdCategory
23 **/
24 
25 #include "RooFit.h"
26 
27 #include "TClass.h"
28 #include "TClass.h"
29 #include "RooThreshEntry.h"
30 
31 using namespace std;
32 
34 ;
35 
36 
37 ////////////////////////////////////////////////////////////////////////////////
38 /// Constructor with threshold value and associated category value
39 
41  _thresh(inThresh), _cat(inCat)
42 {
43 }
44 
45 
46 
47 ////////////////////////////////////////////////////////////////////////////////
48 /// Copy constructor
49 
51  TObject(other), _thresh(other._thresh), _cat(other._cat)
52 {
53 }
54 
55 
56 
57 ////////////////////////////////////////////////////////////////////////////////
58 /// Implement TObject Compare() operator to facilitate sorting of
59 /// RooThreshEntry object in ROOT collection. Only comparison
60 /// to other RooThreshEntry objects is supported
61 
63 {
64  // Can only compare objects of same type
65  if (!other->IsA()->InheritsFrom(RooThreshEntry::Class())) return 0 ;
66 
67  RooThreshEntry* otherTE = (RooThreshEntry*) other ;
68  return (_thresh < otherTE->_thresh) ? -1 : 1 ;
69 }
70 
71 
Double_t _thresh
int Int_t
Definition: RtypesCore.h:41
STL namespace.
virtual Int_t Compare(const TObject *) const
Implement TObject Compare() operator to facilitate sorting of RooThreshEntry object in ROOT collectio...
void Class()
Definition: Class.C:29
RooCatType _cat
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state...
Definition: RooCatType.h:22
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition: TObject.cxx:443
Class RooThreshEntry is a utility class for RooThresholdCategory.
#define ClassImp(name)
Definition: Rtypes.h:359
double Double_t
Definition: RtypesCore.h:55
Mother of all ROOT objects.
Definition: TObject.h:37