Skip to content
Snippets Groups Projects
Commit 49cd12ab authored by Rene Brun's avatar Rene Brun
Browse files

Add conditional debug statements in Streamer (gDebug > 1).

git-svn-id: http://root.cern.ch/svn/root/trunk@4723 27541ba8-7e3a-0410-8455-c3a389f83636
parent 100173eb
No related branches found
No related tags found
No related merge requests found
// @(#)root/cont:$Name: $:$Id: TRef.cxx,v 1.14 2002/04/01 17:19:13 brun Exp $ // @(#)root/cont:$Name: $:$Id: TRef.cxx,v 1.15 2002/05/18 08:21:58 brun Exp $
// Author: Rene Brun 28/09/2001 // Author: Rene Brun 28/09/2001
/************************************************************************* /*************************************************************************
...@@ -382,10 +382,16 @@ void TRef::Streamer(TBuffer &R__b) ...@@ -382,10 +382,16 @@ void TRef::Streamer(TBuffer &R__b)
//by TStreamerInfo::ReadBuffer (Clones) when reading this TRef //by TStreamerInfo::ReadBuffer (Clones) when reading this TRef
Int_t execid = TStreamerInfo::GetCurrentElement()->GetUniqueID(); Int_t execid = TStreamerInfo::GetCurrentElement()->GetUniqueID();
if (execid) SetBit(execid); if (execid) SetBit(execid);
if (gDebug > 1) {
printf("Reading TRef, pidf=%d, fPID=%lx, uid=%d, obj=%lx\n",pidf,(Long_t)fPID,GetUniqueID(),(Long_t)GetObject());
}
} else { } else {
TObject::Streamer(R__b); TObject::Streamer(R__b);
pidf = TProcessID::WriteProcessID(fPID,file); pidf = TProcessID::WriteProcessID(fPID,file);
R__b << pidf; R__b << pidf;
if (gDebug > 1) {
printf("Writing TRef, pidf=%d, fPID=%lx, uid=%d, obj=%lx\n",pidf,(Long_t)fPID,GetUniqueID(),(Long_t)GetObject());
}
} }
} }
// @(#)root/cont:$Name: $:$Id: TRefArray.cxx,v 1.11 2002/05/25 21:00:36 brun Exp $ // @(#)root/cont:$Name: $:$Id: TRefArray.cxx,v 1.12 2002/06/04 19:51:14 brun Exp $
// Author: Rene Brun 02/10/2001 // Author: Rene Brun 02/10/2001
/************************************************************************* /*************************************************************************
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "TRefArray.h" #include "TRefArray.h"
#include "TError.h" #include "TError.h"
#include "TFile.h" #include "TFile.h"
#include "TSystem.h"
ClassImp(TRefArray) ClassImp(TRefArray)
...@@ -319,9 +320,14 @@ void TRefArray::Streamer(TBuffer &R__b) ...@@ -319,9 +320,14 @@ void TRefArray::Streamer(TBuffer &R__b)
fLast = -1; fLast = -1;
R__b >> pidf; R__b >> pidf;
fPID = TProcessID::ReadProcessID(pidf,file); fPID = TProcessID::ReadProcessID(pidf,file);
if (gDebug > 1) printf("Reading TRefArray, pidf=%d, fPID=%lx, nobjects=%d\n",pidf,(Long_t)fPID,nobjects);
for (Int_t i = 0; i < nobjects; i++) { for (Int_t i = 0; i < nobjects; i++) {
R__b >> fUIDs[i]; R__b >> fUIDs[i];
if (fUIDs[i] != 0) fLast = i; if (fUIDs[i] != 0) fLast = i;
if (gDebug > 1) {
printf(" %d",fUIDs[i]);
if ((i > 0 && i%10 == 0) || (i == nobjects-1)) printf("\n");
}
} }
Changed(); Changed();
R__b.CheckByteCount(R__s, R__c,TRefArray::IsA()); R__b.CheckByteCount(R__s, R__c,TRefArray::IsA());
...@@ -334,8 +340,14 @@ void TRefArray::Streamer(TBuffer &R__b) ...@@ -334,8 +340,14 @@ void TRefArray::Streamer(TBuffer &R__b)
R__b << fLowerBound; R__b << fLowerBound;
pidf = TProcessID::WriteProcessID(fPID,file); pidf = TProcessID::WriteProcessID(fPID,file);
R__b << pidf; R__b << pidf;
if (gDebug > 1) printf("Writing TRefArray, pidf=%d, fPID=%lx, nobjects=%d\n",pidf,(Long_t)fPID,nobjects);
for (Int_t i = 0; i < nobjects; i++) { for (Int_t i = 0; i < nobjects; i++) {
R__b << fUIDs[i]; R__b << fUIDs[i];
if (gDebug > 1) {
printf(" %d",fUIDs[i]);
if ((i > 0 && i%10 == 0) || (i == nobjects-1)) printf("\n");
}
} }
R__b.SetByteCount(R__c, kTRUE); R__b.SetByteCount(R__c, kTRUE);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment