/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 *    File: $Id: RooSharedProperties.h,v 1.3 2007/05/11 09:11:30 verkerke Exp $
 * Authors:                                                                  *
 *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
 *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
 *                                                                           *
 * Copyright (c) 2000-2005, Regents of the University of California          *
 *                          and Stanford University. All rights reserved.    *
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/
#ifndef ROO_ABS_SHARED_PROPERTY
#define ROO_ABS_SHARED_PROPERTY

#include "TObject.h"
#include "TUUID.h"
#include "TString.h"

class RooSharedProperties : public TObject {
public:

  RooSharedProperties() ;
  RooSharedProperties(const char* uuidstr) ;
  virtual ~RooSharedProperties() ;
  Bool_t operator==(const RooSharedProperties& other) ;

  virtual RooSharedProperties* clone() = 0 ;

  virtual void Print(Option_t* opts=0) const ;

  void increaseRefCount() { _refCount++ ; }
  void decreaseRefCount() { if (_refCount>0) _refCount-- ; }
  Int_t refCount() const { return _refCount ; }

  void setInSharedList() { _inSharedList = kTRUE ; }
  Bool_t inSharedList() const { return _inSharedList ; }

   TString asString() { return TString(_uuid.AsString()); }

protected:

  TUUID _uuid ; // Unique object ID
  Int_t _refCount ; //! Use count 
  Int_t _inSharedList ; //! Is in shared list

  ClassDef(RooSharedProperties,1) // Abstract interface for shared property implementations
};


#endif
 RooSharedProperties.h:1
 RooSharedProperties.h:2
 RooSharedProperties.h:3
 RooSharedProperties.h:4
 RooSharedProperties.h:5
 RooSharedProperties.h:6
 RooSharedProperties.h:7
 RooSharedProperties.h:8
 RooSharedProperties.h:9
 RooSharedProperties.h:10
 RooSharedProperties.h:11
 RooSharedProperties.h:12
 RooSharedProperties.h:13
 RooSharedProperties.h:14
 RooSharedProperties.h:15
 RooSharedProperties.h:16
 RooSharedProperties.h:17
 RooSharedProperties.h:18
 RooSharedProperties.h:19
 RooSharedProperties.h:20
 RooSharedProperties.h:21
 RooSharedProperties.h:22
 RooSharedProperties.h:23
 RooSharedProperties.h:24
 RooSharedProperties.h:25
 RooSharedProperties.h:26
 RooSharedProperties.h:27
 RooSharedProperties.h:28
 RooSharedProperties.h:29
 RooSharedProperties.h:30
 RooSharedProperties.h:31
 RooSharedProperties.h:32
 RooSharedProperties.h:33
 RooSharedProperties.h:34
 RooSharedProperties.h:35
 RooSharedProperties.h:36
 RooSharedProperties.h:37
 RooSharedProperties.h:38
 RooSharedProperties.h:39
 RooSharedProperties.h:40
 RooSharedProperties.h:41
 RooSharedProperties.h:42
 RooSharedProperties.h:43
 RooSharedProperties.h:44
 RooSharedProperties.h:45
 RooSharedProperties.h:46
 RooSharedProperties.h:47
 RooSharedProperties.h:48
 RooSharedProperties.h:49
 RooSharedProperties.h:50
 RooSharedProperties.h:51
 RooSharedProperties.h:52
 RooSharedProperties.h:53
 RooSharedProperties.h:54