ROOT  6.06/09
Reference Guide
RooSharedProperties.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 //
19 // BEGIN_HTML
20 // Class RooSharedProperties is the base class for shared properties
21 // that can be stored in RooSharedPropertiesList.
22 // END_HTML
23 //
24 
25 #include "RooFit.h"
26 #include "RooSharedProperties.h"
27 #include "RooMsgService.h"
28 #include "RooTrace.h"
29 
30 #include "Riostream.h"
31 using std::cout ;
32 using std::endl ;
33 
34 using namespace std;
35 
37 ;
38 
39 
40 
41 ////////////////////////////////////////////////////////////////////////////////
42 /// Default constructor
43 
44 RooSharedProperties::RooSharedProperties() : _refCount(0), _inSharedList(kFALSE)
45 {
46  RooTrace::create(this) ;
47 }
48 
49 
50 ////////////////////////////////////////////////////////////////////////////////
51 /// Constructor with unique-id string
52 
53 RooSharedProperties::RooSharedProperties(const char* uuidstr) : _uuid(uuidstr), _refCount(0), _inSharedList(kFALSE)
54 {
55  RooTrace::create(this) ;
56 }
57 
58 
59 
60 ////////////////////////////////////////////////////////////////////////////////
61 /// Destructor
62 
64 {
65  RooTrace::destroy(this) ;
66 }
67 
68 
69 
70 ////////////////////////////////////////////////////////////////////////////////
71 /// Return true of unique id of this property is equal to that of other
72 
74 {
75  return (_uuid==other._uuid) ;
76 }
77 
78 
79 ////////////////////////////////////////////////////////////////////////////////
80 /// Printing interface
81 
82 void RooSharedProperties::Print(Option_t* /*opts*/) const
83 {
84  cout << "RooSharedProperties(" << this << ") UUID = " << _uuid.AsString() << endl ;
85 }
RooSharedProperties()
Default constructor.
virtual void Print(Option_t *opts=0) const
Printing interface.
const char Option_t
Definition: RtypesCore.h:62
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
STL namespace.
Bool_t operator==(const RooSharedProperties &other)
Return true of unique id of this property is equal to that of other.
static void create(const TObject *obj)
Register creation of object 'obj'.
Definition: RooTrace.cxx:67
const char * AsString() const
Return UUID as string. Copy string immediately since it will be reused.
Definition: TUUID.cxx:531
ClassImp(RooSharedProperties)
static void destroy(const TObject *obj)
Register deletion of object 'obj'.
Definition: RooTrace.cxx:80
virtual ~RooSharedProperties()
Destructor.