Small modificatiosn in monitors
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1391 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
7feb972a77
commit
feba69e213
1 changed files with 4 additions and 3 deletions
|
|
@ -26,9 +26,11 @@ class eoCountedFileMonitor: public eoFileMonitor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
eoCountedFileMonitor(unsigned int _frequency=1, std::string _filename="generation_data", std::string _delim="\t", bool _firstcall=false, bool _lastcall=true):
|
eoCountedFileMonitor(unsigned int _frequency=1, std::string _filename="generation_data", std::string _delim="\t", bool _firstcall=false, bool _lastcall=true):
|
||||||
eoFileMonitor(_filename, _delim, false, true), counter(0), frequency(_frequency), delim(_delim), firstcall(_firstcall), lastcall(_lastcall) {}
|
eoFileMonitor(_filename, _delim, false, true), counter(0), frequency(_frequency), delim(_delim), firstcall(_firstcall), lastcall(_lastcall) { }
|
||||||
|
|
||||||
virtual std::string className(void) const { return "eoCountedFileMonitor"; }
|
virtual std::string className(void) const { return "eoCountedFileMonitor"; }
|
||||||
|
|
||||||
|
|
||||||
eoMonitor& operator()(std::ostream& os)
|
eoMonitor& operator()(std::ostream& os)
|
||||||
{
|
{
|
||||||
if( ! (++counter % frequency) || firstcall )
|
if( ! (++counter % frequency) || firstcall )
|
||||||
|
|
@ -36,8 +38,7 @@ class eoCountedFileMonitor: public eoFileMonitor
|
||||||
firstcall = false;
|
firstcall = false;
|
||||||
os << counter << delim.c_str();
|
os << counter << delim.c_str();
|
||||||
iterator it = vec.begin();
|
iterator it = vec.begin();
|
||||||
|
if(vec.begin()!=vec.end())os << (*it)->getValue();
|
||||||
os << (*it)->getValue();
|
|
||||||
|
|
||||||
for(++it; it != vec.end(); ++it)
|
for(++it; it != vec.end(); ++it)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue