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