Commit 73364c64 authored by miller86's avatar miller86
Browse files

fixing interface to DebugStream

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@6975 18c085ea-50e0-402c-830e-de6fd14e8384
parent e8c6b05b
......@@ -310,6 +310,8 @@ avtStreamlineFilter::ComputeRankList(const vector<int> &domList,
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -325,7 +327,7 @@ avtStreamlineFilter::SetDomain(avtStreamlineWrapper *slSeg)
slSeg->seedPtDomainList.resize(0);
vector<int> doms;
intervalTree->GetElementsListFromRange(xyz, xyz, doms);
if (debug5_real)
if (DebugStream::Level5())
debug5<<"SetDomain(): pt= "<<endPt<<" T= "<<t<<" step= "<<timeStep<<endl;
for (int i = 0; i < doms.size(); i++)
slSeg->seedPtDomainList.push_back(DomainType(doms[i], timeStep));
......@@ -370,7 +372,7 @@ avtStreamlineFilter::SetDomain(avtStreamlineWrapper *slSeg)
if (slSeg->seedPtDomainList.size() == 1)
slSeg->domain = slSeg->seedPtDomainList[0];
if (debug5_real)
if (DebugStream::Level5())
debug5<<"SetDomain: "<<slSeg->domain<<endl;
/*
debug1<<"::SetDomain() pt=["<<endPt.xyz[0]<<" "<<endPt.xyz[1]
......@@ -403,17 +405,19 @@ avtStreamlineFilter::SetDomain(avtStreamlineWrapper *slSeg)
// Hank Childs, Sun Mar 22 13:31:08 CDT 2009
// Add support for getting the "domain" by using a point.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
vtkDataSet *
avtStreamlineFilter::GetDomain(const DomainType &domain,
double X, double Y, double Z)
{
if (debug5_real)
if (DebugStream::Level5())
debug5<<"avtStreamlineFilter::GetDomain("<<domain<<" "<<X<<" "<<Y<<" "<<Z<<");"<<endl;
vtkDataSet *ds = NULL;
if (debug5_real)
if (DebugStream::Level5())
debug5<<"OperatingOnDemand() = "<<OperatingOnDemand()<<endl;
if (OperatingOnDemand())
......@@ -457,7 +461,7 @@ avtStreamlineFilter::GetDomain(const DomainType &domain,
}
if (debug5_real)
if (DebugStream::Level5())
debug5<<"GetDomain("<<domain<<") = "<<ds<<endl;
return ds;
}
......@@ -476,6 +480,8 @@ avtStreamlineFilter::GetDomain(const DomainType &domain,
// Return activeTimeStep obtained from contract instead of 0 when doing
// streamlines.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
int
......@@ -485,7 +491,7 @@ avtStreamlineFilter::GetTimeStep(double &t) const
{
for (int i = 0; i < domainTimeIntervals.size(); i++)
{
if (debug5_real)
if (DebugStream::Level5())
debug5<<" T= "<<t<<" in ["<<domainTimeIntervals[i][0]<<", "<<domainTimeIntervals[i][1]<<"] ?"<<endl;
if (t >= domainTimeIntervals[i][0] &&
t < (domainTimeIntervals[i][1]))
......@@ -1227,6 +1233,8 @@ avtStreamlineFilter::Execute(void)
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -1349,7 +1357,7 @@ avtStreamlineFilter::Initialize()
cacheQLen = numDomains;
#endif
if (debug5_real)
if (DebugStream::Level5())
{
debug5<< "Domain/Data setup:\n";
for (int i = 0; i < numDomains; i++)
......@@ -1367,7 +1375,7 @@ avtStreamlineFilter::Initialize()
if (*dbp == NULL)
EXCEPTION1(InvalidFilesException, db.c_str());
avtDatabaseMetaData *md = dbp->GetMetaData(0);
if (debug5_real)
if (DebugStream::Level5())
debug5<<"Times: [";
for (int i = 0; i < md->GetTimes().size()-1; i++)
{
......@@ -1380,10 +1388,10 @@ avtStreamlineFilter::Initialize()
intv[1] = (double)i+1;
}
domainTimeIntervals.push_back(intv);
if (debug5_real)
if (DebugStream::Level5())
debug5<<" ("<<intv[0]<<", "<<intv[1]<<")";
}
if (debug5_real)
if (DebugStream::Level5())
debug5<<"]"<<endl;
numTimeSteps = domainTimeIntervals.size();
......@@ -1461,12 +1469,14 @@ avtStreamlineFilter::Initialize()
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
bool
avtStreamlineFilter::PointInDomain(avtVector &pt, DomainType &domain)
{
if (debug5_real)
if (DebugStream::Level5())
debug5<< "avtStreamlineFilter::PointInDomain("<<pt<<", dom= "<<domain<<");\n";
vtkDataSet *ds = GetDomain(domain, pt.x, pt.y, pt.z);
......@@ -1484,7 +1494,7 @@ avtStreamlineFilter::PointInDomain(avtVector &pt, DomainType &domain)
{
double bbox[6];
intervalTree->GetElementExtents(domain.domain, bbox);
if (debug5_real)
if (DebugStream::Level5())
debug5<<"[ "<<bbox[0]<<" "<<bbox[1]<<" ] [ "<<bbox[2]<<" "<<bbox[3]<<" ] [ "<<bbox[4]<<" "<<bbox[5]<<" ]"<<endl;
if (pt.x < bbox[0] || pt.x > bbox[1] ||
pt.y < bbox[2] || pt.y > bbox[3])
......@@ -1536,11 +1546,11 @@ avtStreamlineFilter::PointInDomain(avtVector &pt, DomainType &domain)
int foundCell = -1, subId = 0;
int success = cellLocator->FindClosestPointWithinRadius(p, rad, resPt,
foundCell, subId, dist);
if (debug5_real)
if (DebugStream::Level5())
debug5<< "suc = "<<success<<" dist = "<<dist<<" resPt= ["<<resPt[0]
<<" "<<resPt[1]<<" "<<resPt[2]<<"]\n\n";
if (debug5_real)
if (DebugStream::Level5())
debug5<< "PointInDomain() = "<<(success?"TRUE":"FALSE")<<endl;
return (success == 1 ? true : false);
}
......@@ -1590,6 +1600,8 @@ avtStreamlineFilter::OwnDomain(DomainType &domain)
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -1636,20 +1648,20 @@ avtStreamlineFilter::ComputeDomainToRankMapping()
}
#ifdef PARALLEL
if (debug5_real)
if (DebugStream::Level5())
debug5<<"Sum across all procs\n";
SumIntArrayAcrossAllProcessors(&myDoms[0], &domainToRank[0], numDomains);
#endif
for (int i = 0; i < numDomains; i++)
{
if (debug5_real)
if (DebugStream::Level5())
debug5<<"dom: "<<i<<": rank= "<<domainToRank[i]<<" ds= "<<dataSets[i] << endl;
}
}
for (int i = 0; i < numDomains; i++)
if (debug5_real)
if (DebugStream::Level5())
debug5<<i<<": rank= "<< domainToRank[i]<<endl;
#endif
......@@ -1725,6 +1737,8 @@ avtStreamlineFilter::DomainToRank(DomainType &domain)
// Fix problem with streamlines not getting communicated to the right
// processor in parallel.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
avtIVPSolver::Result
......@@ -1736,7 +1750,7 @@ avtStreamlineFilter::IntegrateDomain(avtStreamlineWrapper *slSeg,
avtDataAttributes &a = GetInput()->GetInfo().GetAttributes();
bool haveGhostZones = false; //(a.GetContainsGhostZones()==AVT_NO_GHOSTS ? false : true);
if (debug5_real)
if (DebugStream::Level5())
debug5<< "avtStreamlineFilter::IntegrateDomain(dom= "
<<slSeg->domain<<") HGZ = "<<haveGhostZones <<endl;
......@@ -1855,7 +1869,7 @@ avtStreamlineFilter::IntegrateDomain(avtStreamlineWrapper *slSeg,
if (cellToPt1)
cellToPt1->Delete();
if (debug5_real)
if (DebugStream::Level5())
debug5<<"::IntegrateDomain() result= "<<result<<endl;
return result;
}
......@@ -1885,6 +1899,8 @@ avtStreamlineFilter::IntegrateDomain(avtStreamlineWrapper *slSeg,
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -1897,7 +1913,7 @@ avtStreamlineFilter::IntegrateStreamline(avtStreamlineWrapper *slSeg, int maxSte
slSeg->GetEndPoint(pt);
vtkDataSet *ds = GetDomain(slSeg->domain, pt.x, pt.y, pt.z);
if (debug5_real)
if (DebugStream::Level5())
debug5 << "avtStreamlineFilter::IntegrateStreamline("<<pt<<" "<<slSeg->domain<<")"<<endl;
if (ds == NULL)
......@@ -1912,20 +1928,20 @@ avtStreamlineFilter::IntegrateStreamline(avtStreamlineWrapper *slSeg, int maxSte
double extents[6] = { 0.,0., 0.,0., 0.,0. };
intervalTree->GetElementExtents(slSeg->domain.domain, extents);
avtIVPSolver::Result result = IntegrateDomain(slSeg, ds, extents, maxSteps);
if (debug5_real)
if (DebugStream::Level5())
debug5<<"ISL: result= "<<result<<endl;
//SL exited this domain.
if (slSeg->status == avtStreamlineWrapper::OUTOFBOUNDS)
{
if (debug5_real)
if (DebugStream::Level5())
debug5<<"OOB: call set domain\n";
SetDomain(slSeg);
}
//SL terminates.
else
{
if (debug5_real)
if (DebugStream::Level5())
{
debug5<<"Terminate!\n";
debug5<<avtIVPSolver::OK<<endl;
......@@ -1938,7 +1954,7 @@ avtStreamlineFilter::IntegrateStreamline(avtStreamlineWrapper *slSeg, int maxSte
}
}
if (debug5_real)
if (DebugStream::Level5())
debug5 << " IntegrateStreamline DONE: status = " << (slSeg->status==avtStreamlineWrapper::TERMINATE ? "TERMINATE" : "OOB")
<< " domCnt= "<<slSeg->seedPtDomainList.size()<<endl;
}
......@@ -2177,6 +2193,8 @@ randMinus1_1()
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -2381,7 +2399,7 @@ avtStreamlineFilter::GetSeedPoints(std::vector<avtStreamlineWrapper *> &pts)
continue;
}
if (debug5_real)
if (DebugStream::Level5())
{
debug5<<"Candidate pt: "<<i<<" "<<candidatePts[i];
debug5<<" id= "<<i<<" dom =[";
......
......@@ -467,6 +467,8 @@ avtIVPDopri5::GuessInitialStep(const avtIVPField* field,
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
avtIVPSolver::Result
......@@ -484,7 +486,7 @@ avtIVPDopri5::Step(const avtIVPField* field,
t_max = -t_max;
}
if (debug5_real)
if (DebugStream::Level5())
debug5<<"End= "<<end<<" t_max= "<<t_max<<endl;
const double direction = sign( 1.0, t_max - t );
......@@ -527,7 +529,7 @@ avtIVPDopri5::Step(const avtIVPField* field,
// stepsize underflow?
if( 0.1*std::abs(h) <= std::abs(t)*epsilon )
{
if (debug5_real)
if (DebugStream::Level5())
debug5 << "\tavtIVPDopri5::step(): exiting at t = "
<< t << ", step size too small (h = " << h << ")\n";
return STEPSIZE_UNDERFLOW;
......@@ -542,7 +544,7 @@ avtIVPDopri5::Step(const avtIVPField* field,
n_steps++;
if (debug5_real)
if (DebugStream::Level5())
debug5 << "\tavtIVPDopri5::step(): t = " << t << ", y = " << y
<< ", h = " << h << ", t+h = " << t+h << '\n';
......@@ -622,7 +624,7 @@ avtIVPDopri5::Step(const avtIVPField* field,
if( iasti == 15 )
{
if (debug5_real)
if (DebugStream::Level5())
debug5 << "\tavtIVPDopri5::step(): exiting at t = "
<< t << ", problem seems stiff (y = " << y
<< ")\n";
......@@ -687,7 +689,7 @@ avtIVPDopri5::Step(const avtIVPField* field,
// normal exit
if (debug5_real)
if (DebugStream::Level5())
debug5 << "\tavtIVPDopri5::step(): normal exit, now at t = "
<< t << ", y = " << y << ", h = " << h << '\n';
return OK;
......@@ -703,7 +705,7 @@ avtIVPDopri5::Step(const avtIVPField* field,
h = h_new;
if (debug5_real)
if (DebugStream::Level5())
debug5 << "\tavtIVPDopri5::step(): step rejected, retry with h = "
<< h << '\n';
}
......
......@@ -109,18 +109,20 @@ avtIVPVTKTimeVaryingField::~avtIVPVTKTimeVaryingField()
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
avtVec
avtIVPVTKTimeVaryingField::operator()(const double& t, const avtVecRef& x) const
{
if (debug5_real)
if (DebugStream::Level5())
debug5<<"Eval( "<<t<<", "<<x<<") = ";
// Check for inclusion in this time boundary.
if (t < time1 || t > time2)
{
if (debug5_real)
if (DebugStream::Level5())
debug5<<" **OUT of TIME**\n";
throw Undefined();
}
......@@ -129,7 +131,7 @@ avtIVPVTKTimeVaryingField::operator()(const double& t, const avtVecRef& x) const
avtVec y1(x.dim()), param(pad(x,t)), y2(x.dim());
if ( ! iv1->Evaluate(param.values(), y1.values(), t))
{
if (debug5_real)
if (DebugStream::Level5())
debug5<<" **OUT of BOUNDS**\n";
throw Undefined();
}
......@@ -137,7 +139,7 @@ avtIVPVTKTimeVaryingField::operator()(const double& t, const avtVecRef& x) const
avtVec y(x.dim());
y = y1;
if (debug5_real)
if (DebugStream::Level5())
debug5<<"T= "<<t<<" ["<<time1<<" "<<time2<<"]"<<" Y1 = "<<y1<<" Y2= "<<y2<<" y= "<<y<<endl;
if ( normalized )
......
......@@ -202,6 +202,8 @@ avtStreamline::Advance(const avtIVPField* field,
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
avtIVPSolver::Result
......@@ -230,15 +232,15 @@ avtStreamline::DoAdvance(avtIVPSolver* ivp,
try
{
if (debug5_real)
if (DebugStream::Level5())
debug5<<"Step( mode= "<<termType<<" end= "<<end<<endl;
result = ivp->Step(field, termType, end, step);
if (debug5_real)
if (DebugStream::Level5())
debug5<<" T= "<<ivp->GetCurrentT()<<" "<<ivp->GetCurrentY()<<endl;
}
catch( avtIVPField::Undefined& )
{
if (debug5_real)
if (DebugStream::Level5())
debug5<<ivp->GetCurrentY()<<" not in domain\n";
// integrator left the domain, retry with smaller step
// if step size is below given minimum, give up
......@@ -263,7 +265,7 @@ avtStreamline::DoAdvance(avtIVPSolver* ivp,
{
delete step;
HandleGhostZones((end > 0.0), haveGhostZones, extents);
if (debug5_real)
if (DebugStream::Level5())
debug5<<"avtStreamline::DoAdvance() DONE result= OUTSIDE_DOMAIN\n";
return avtIVPSolver::OUTSIDE_DOMAIN;
}
......@@ -331,6 +333,8 @@ avtStreamline::DoAdvance(avtIVPSolver* ivp,
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -382,9 +386,9 @@ avtStreamline::HandleGhostZones(bool forward,
dir /= len;
double leapingDistance = minRange * 0.001;
if (debug5_real)
if (DebugStream::Level5())
debug5<< "Leaping: "<<leapingDistance<< " dir = "<<dir<<endl;
if (debug5_real)
if (DebugStream::Level5())
debug5<< "Leap: "<<pt;
dir *= leapingDistance;
avtVec newPt = pt + dir;
......@@ -396,7 +400,7 @@ avtStreamline::HandleGhostZones(bool forward,
else
(*_steps.begin())->tEnd -= leapingDistance;
if (debug5_real)
if (DebugStream::Level5())
debug5<<" ==> "<<newPt<<" T: "<<_ivpSolver->GetCurrentT()<<endl;
}
......@@ -541,6 +545,8 @@ avtStreamline::PtEnd(avtVec &end)
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -560,7 +566,7 @@ avtStreamline::Serialize(MemStream::Mode mode, MemStream &buff,
}
else
{
if (debug5_real)
if (DebugStream::Level5())
debug5 << "avtStreamline READ: listSz = " << _steps.size() <<endl;
_steps.clear();
size_t sz = 0;
......@@ -594,6 +600,6 @@ avtStreamline::Serialize(MemStream::Mode mode, MemStream &buff,
_ivpSolver = solver->Clone();
_ivpSolver->PutState(solverState);
}
if (debug5_real)
if (DebugStream::Level5())
debug5 << "DONE: avtStreamline::Serialize. sz= "<<buff.buffLen() << endl;
}
......@@ -161,6 +161,8 @@ avtTerminatingSink::~avtTerminatingSink()
// Cyrus Harrison, Wed Apr 1 12:03:19 PDT 2009
// Change so memory usage info scales up to 4 gigabytes.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -206,7 +208,7 @@ avtTerminatingSink::Execute(avtContract_p contract)
input->Update(contract);
visitTimer->StopTimer(t, "First pipeline update.");
if (debug3_real)
if (DebugStream::Level3())
{
unsigned int size = 0, rss = 0;
GetMemorySize(size, rss);
......@@ -238,7 +240,7 @@ avtTerminatingSink::Execute(avtContract_p contract)
dob->Merge(*input);
iter++;
if (debug3_real)
if (DebugStream::Level3())
{
unsigned int size = 0, rss = 0;
GetMemorySize(size, rss);
......
......@@ -40,35 +40,39 @@
// DebugStream.h //
// ************************************************************************* //
// Expose the ONLY parts of a debug stream object we really need in MOST
// of the source code.
#ifndef DEBUG_STREAM_H
#define DEBUG_STREAM_H
#include <misc_exports.h>
#include <visitstream.h>
#define debug1 if (!(*debug1_realp)) ; else (*debug1_realp)
#define debug2 if (!(*debug2_realp)) ; else (*debug2_realp)
#define debug3 if (!(*debug3_realp)) ; else (*debug3_realp)
#define debug4 if (!(*debug4_realp)) ; else (*debug4_realp)
#define debug5 if (!(*debug5_realp)) ; else (*debug5_realp)
//
// Hide as much of DebugStream interface as possible.
//
namespace DebugStream
{
// Query if a given level is enabled
extern MISC_API bool Level1();
extern MISC_API bool Level2();
extern MISC_API bool Level3();
extern MISC_API bool Level4();
extern MISC_API bool Level5();
// These are defined to maintain backward compatibility with the
// 'debugN_real' symbols before they were turned into pointers
// and which are used variously throughout VisIt.
#define debug1_real (*debug1_realp)
#define debug2_real (*debug2_realp)
#define debug3_real (*debug3_realp)
#define debug4_real (*debug4_realp)
#define debug5_real (*debug5_realp)
// Obtain a given level's stream object
extern MISC_API ostream& Stream1();
extern MISC_API ostream& Stream2();
extern MISC_API ostream& Stream3();
extern MISC_API ostream& Stream4();
extern MISC_API ostream& Stream5();
extern MISC_API ostream *debug1_realp;
extern MISC_API ostream *debug2_realp;
extern MISC_API ostream *debug3_realp;
extern MISC_API ostream *debug4_realp;
extern MISC_API ostream *debug5_realp;
#endif
// Query what the current level is (more expensive than LevelN())
extern MISC_API int GetLevel();
}
#define debug1 if (!DebugStream::Level1()) ; else (DebugStream::Stream1())
#define debug2 if (!DebugStream::Level2()) ; else (DebugStream::Stream2())
#define debug3 if (!DebugStream::Level3()) ; else (DebugStream::Stream3())
#define debug4 if (!DebugStream::Level4()) ; else (DebugStream::Stream4())
#define debug5 if (!DebugStream::Level5()) ; else (DebugStream::Stream5())
#endif
......@@ -37,6 +37,7 @@
*****************************************************************************/
#include <DebugStreamFull.h>
#include <DebugStream.h>
#include <visitstream.h>
#if defined(_WIN32)
......@@ -53,26 +54,40 @@
using std::vector;
// static DebugStreamBuf class data
vector<DebugStream::DebugStreamBuf*> DebugStream::DebugStreamBuf::allBuffers;
int DebugStream::DebugStreamBuf::curLevel;
vector<DebugStreamFull::DebugStreamBuf*> DebugStreamFull::DebugStreamBuf::allBuffers;
int DebugStreamFull::DebugStreamBuf::curLevel;
// global DebugStreams
// We make these static so they are NOT visible outside this file
static DebugStream debug1_realobj(1);
static DebugStream debug2_realobj(2);
static DebugStream debug3_realobj(3);
static DebugStream debug4_realobj(4);
static DebugStream debug5_realobj(5);
// global DebugStream pointers
// These are the only things visible outside this file. Doing this
// prevents all of VisIt from being recompiled when only the interface
// to the DebugStream class changes.
ostream *debug1_realp = &debug1_realobj;
ostream *debug2_realp = &debug2_realobj;
ostream *debug3_realp = &debug3_realobj;
ostream *debug4_realp = &debug4_realobj;
ostream *debug5_realp = &debug5_realobj;
static DebugStreamFull debug1_realobj(1);
static DebugStreamFull debug2_realobj(2);
static DebugStreamFull debug3_realobj(3);
static DebugStreamFull debug4_realobj(4);
static DebugStreamFull debug5_realobj(5);
bool DebugStream::Level1() { return debug1_realobj.isenabled(); };
bool DebugStream::Level2() { return debug2_realobj.isenabled(); };
bool DebugStream::Level3() { return debug3_realobj.isenabled(); };
bool DebugStream::Level4() { return debug4_realobj.isenabled(); };
bool DebugStream::Level5() { return debug5_realobj.isenabled(); };
ostream& DebugStream::Stream1() { return *((ostream*) &debug1_realobj); };
ostream& DebugStream::Stream2() { return *((ostream*) &debug2_realobj); };
ostream& DebugStream::Stream3() { return *((ostream*) &debug3_realobj); };
ostream& DebugStream::Stream4() { return *((ostream*) &debug4_realobj); };
ostream& DebugStream::Stream5() { return *((ostream*) &debug5_realobj); };
int
DebugStream::GetLevel()
{
int level = 0;
level += debug1_realobj.isenabled();
level += debug2_realobj.isenabled();
level += debug3_realobj.isenabled();
level += debug4_realobj.isenabled();
level += debug5_realobj.isenabled();
return level;