Commit de2ab4f6 authored by miller86's avatar miller86
Browse files

ensuring calls too <somobj>->Print(DebugStream::StreamN) are predicated on if...

ensuring calls too <somobj>->Print(DebugStream::StreamN) are predicated on if (DebugStream::LevelN())

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12769 18c085ea-50e0-402c-830e-de6fd14e8384
parent 501e87bd
......@@ -888,6 +888,8 @@ CommandMetaDataToCommandSpec(visit_handle h, avtSimulationCommandSpecification &
//
// Modifications:
//
// Mark C. Miller, Tue Oct 19 20:23:57 PDT 2010
// Added test of debug level before calling MD's Print() method.
// ****************************************************************************
void
......@@ -1127,7 +1129,8 @@ avtSimV2FileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
}
}
md->Print(DebugStream::Stream4());
if (DebugStream::Level4())
md->Print(DebugStream::Stream4());
simv2_SimulationMetaData_free(h);
#endif
......
......@@ -2501,6 +2501,9 @@ FileServerList::GetOpenFile() const
// of which plugin we used to open a given file. So when we re-open
// it, we don't get it wrong.
//
// Mark C. Miller, Tue Oct 19 17:19:48 PDT 2010
// Wrapped attempt to print MD in a TRY/CATCHALL block just to be safe.
// Added test for debug level prior to calling Print() method.
// ****************************************************************************
const avtDatabaseMetaData *
......@@ -2583,7 +2586,15 @@ FileServerList::GetMetaData(const QualifiedFilename &filename,
if (key) *key = useKey;
debug3 << "Caching metadata with key \"" << useKey << "\"" << endl;
newmd->Print(DebugStream::Stream3());
TRY
{
if (DebugStream::Level3())
newmd->Print(DebugStream::Stream3());
}
CATCHALL
{
}
ENDTRY
return fileMetaData[useKey];
}
else
......@@ -2685,6 +2696,9 @@ FileServerList::GetCreateVectorMagnitudeExpressions() const
// Mark C. Miller, Tue Oct 19 17:19:48 PDT 2010
// Wrapped attempt to print SIL in a TRY/CATCHALL block as we discovered
// a case where avtSIL would through an exception causing GUI to die.
//
// Mark C. Miller, Tue Oct 19 20:23:27 PDT 2010
// Added test for debug level before calling Print() method for SIL.
// ****************************************************************************
const avtSIL *
......@@ -2754,7 +2768,8 @@ FileServerList::GetSIL(const QualifiedFilename &filename, int timeState,
debug3 << "Caching SIL with key \"" << useKey << "\"" << endl;
TRY
{
newSIL->Print(DebugStream::Stream3());
if (DebugStream::Level3())
newSIL->Print(DebugStream::Stream3());
}
CATCHALL
{
......
......@@ -505,13 +505,17 @@ dbg_4x4_matrix(const char *pfx, const GLfloat m[16])
// Modifications:
// Tom Fogal, Thu Apr 23 14:48:21 MDT 2009
// Updated for recent change w.r.t. accessing debug streams.
//
// Mark C. Miller, Tue Oct 19 20:24:35 PDT 2010
// Added test for debug level before calling cam's Print() method
static void
debug_view(const avtViewInfo &v)
{
vtkCamera *cam = vtkCamera::New();
v.SetCameraFromView(cam);
cam->Print(DebugStream::Stream1());
if (DebugStream::Level1())
cam->Print(DebugStream::Stream1());
debug5 << "imagepan: [" << v.imagePan[0] << ", " << v.imagePan[1] << "]"
<< std::endl << "imagezoom: " << v.imageZoom << std::endl;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment