00001 00002 // $Id: CandRefCounted.cxx,v 1.2 2003/03/13 23:54:10 gmieg Exp $ 00003 // 00004 // CandRefCounted.cxx 00005 // 00006 // The CandBase class inherits from CandRefCounted for ref-counting. 00007 // 00008 // Each concrete CandBase must define a Dup function. 00009 // Each concrete CandBase must grant friendship to class CandRefer. 00010 // 00011 // Adapted from Babar's BbrRefCounted (written by Gautier Hamel de 00012 // Monchenault and Bob Jacobsen). 00013 // 00014 // Author: G. Irwin 1/2000 00016 00017 #include "Candidate/CandRefCounted.h" 00018 00019 #include "TBuffer.h" 00020 #include "TClass.h" 00021 00022 ClassImp(CandRefCounted) 00023 00024 //______________________________________________________________________ 00025 CandRefCounted::CandRefCounted() : 00026 fNLinks(0) 00027 { 00028 } 00029 00030 //______________________________________________________________________ 00031 CandRefCounted::~CandRefCounted() 00032 { 00033 } 00034 00035 //______________________________________________________________________ 00036 void CandRefCounted::Streamer(TBuffer &R__b) 00037 { 00038 00039 // Stream an object of class CandRefCounted. 00040 if (R__b.IsReading()) { 00041 CandRefCounted::Class()->ReadBuffer(R__b, this); 00042 fNLinks = 0; // Ref count incremented from CandRefer Streamer:2/03 00043 } else { 00044 CandRefCounted::Class()->WriteBuffer(R__b, this); 00045 } 00046 }
1.3.9.1