output.cc File Reference

Id
output.cc,v 1.5 2009/02/02 17:39:10 freg Exp
More...

#include <iostream>
#include <string>
#include <stdarg.h>
#include <stdio.h>
#include "output.h"
#include "MPImanager.h"

Include dependency graph for output.cc:

Go to the source code of this file.

Functions

void message (const char *message,...)
void warning (const char *str,...)
void error (const char *str,...)
void fatal (const char *str,...)


Detailed Description

Id
output.cc,v 1.5 2009/02/02 17:39:10 freg Exp

Nemo2

Copyright (C) 2006 Frederic Guillaume guillaum@zoology.ubc.ca

This file is part of Nemo

Nemo is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Nemo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

created on

Date:
08.09.05
Author:
fred

Definition in file output.cc.


Function Documentation

void error ( const char *  str,
  ... 
)

Definition at line 65 of file output.cc.

Referenced by LifeCycleEvent::attach_trait(), LCE_Disperse_base::checkBackwardDispersalMatrix(), LCE_Disperse_base::checkForwardDispersalMatrix(), TMatrix::divide(), StatHandler< SH >::execute(), BinaryDataLoader::extractPop(), TTNeutralGenesFH::FHread(), TTDeletMutBitstrFH::FHread(), BinaryDataSaver::finish(), TMatrix::get(), tstring::getBlock(), TMatrix::getColumnView(), TMatrix::getRowView(), StatHandlerBase::getStatRecIndex(), StatServices::init(), SimRunner::init(), Metapop::init(), Individual::init(), SimRunner::init_components(), LCE_StatServiceNotifier::loadStatServices(), TMatrix::minus(), TMatrix::multi(), Individual::operator=(), ParamManager::param_consistency_check(), Param::parseArgument(), Param::parseTemporalArgument(), TMatrix::plus(), BinaryDataSaver::printData(), SimRunner::printLog(), SimRunner::printLogHeader(), IndFactory::recycle(), Patch::remove(), tstring::removeEnclosingChar(), TProtoNeutralGenes::retrieve_data(), TProtoDeletMutations_bitstring::retrieve_data(), Metapop::retrieve_data(), SimRunner::run_event(), SimRunner::runPostExec(), FHLogWriter::save_simparams(), TMatrix::set(), LCE_Selection_base::set_fit_model(), LCE_Patch_Extinction::set_matrix_param(), FileHandler::set_path(), LCE_Selection_base::set_sel_model(), LCE_Disperse_base::setDispMatrix(), LCE_Breed_base::setFecundity(), LCE_Disperse_base::setIsland_PropagulePool_Matrix(), LCE_Disperse_base::setLatticeMatrix(), TProtoNeutralGenes::setParameters(), LCE_Patch_Extinction::setParameters(), LCE_Disperse_EvolDisp::setParameters(), LCE_Disperse_ConstDisp::setParameters(), LCE_Disperse_base::setParameters(), LCE_Breed_Selection::setParameters(), LCE_Breed_Disperse::setParameters(), Metapop::setPopulationParameters(), LCE_Selection_base::setSelectionMatrix(), TProtoDeletMutations_bitstring::setSelectionParameters(), LCE_Breed_base::setSexRatio(), LCE_Selection_base::setSpatialMatrix(), StatRecorder< S >::setVal(), Param::update(), LCE_Disperse_base::updateDispMatrix(), and LCE_Resize::updateParameters().

00066 {
00067   va_list(ap);
00068   
00069   std::cerr<<"***ERROR*** ";
00070  
00071   va_start(ap, str);
00072 #ifdef _R_OUTPUT_
00073   REvprintf(str, ap);
00074 #else
00075   vfprintf(stderr,str, ap);
00076 #endif
00077   va_end(ap);
00078 }

void fatal ( const char *  str,
  ... 
)

Definition at line 80 of file output.cc.

Referenced by tstring::__get_block(), Individual::addTrait(), Individual::create(), Individual::createTrait(), LCE_Resize::execute(), LCE_Disperse_ConstDisp::execute(), LCE_Breed_Selection_Disperse::execute(), LCE_Breed_Disperse::execute(), BinaryStorageBuffer::extend_buff(), BinaryDataLoader::extractOffsetTable(), BinaryDataLoader::extractPop(), TTNeutralGenesFH::FHread(), TTDeletMutBitstrFH::FHread(), TTDeletMutBitstrFH::FHwrite(), LCE_StatFH::FHwrite(), RAND::Gamma(), tstring::getBlock(), ParamsParser::getParameters(), Metapop::getPatchPtr(), Individual::getTrait(), TTNeutralGenes::init(), TTDeletMutations_bitstring::init(), StatHandlerBase::init(), StatRecBase::init(), LifeCycleEvent::init(), FileServices::init(), LCE_Breed_Wolbachia::inoculate_wolbachia(), TProtoNeutralGenes::loadFileServices(), Metapop::loadPopFromBinarySource(), Metapop::loadPopFromTraitFile(), Metapop::loadSourcePopulation(), main(), IndFactory::makePrototype(), Individual::operator=(), Param::parse_matrix(), BinaryDataSaver::printData(), BinaryDataSaver::printHeader(), LCE_StatFH::PrintStat_byGen(), BinaryFileParser::read(), FileParser::read(), BinaryStorageBuffer::read(), StreamParser::readUntilCharacter(), LCE_Resize::removeDesignatedPatch(), SimRunner::run(), BinaryStorageBuffer::set_buff(), ParamManager::setArgString(), ParamManager::setFilename(), Metapop::setPopulation(), ParamManager::stripFormatString(), LCE_Resize::updatePatchCapacities(), TTNeutralGenesFH::write_freq(), TTNeutralGenesFH::write_Fst_i(), TTNeutralGenesFH::write_FSTAT(), and TTNeutralGenesFH::write_varcompWC().

00081 {
00082   va_list(ap);
00083   
00084   std::cerr<<"***ERROR*** ";
00085 
00086   va_start(ap, str);
00087 #ifdef _R_OUTPUT_
00088   REvprintf(str, ap);
00089 #else
00090   vfprintf(stderr,str,ap);
00091 #endif
00092   va_end(ap);
00093 
00094   MPIenv::abort(1);
00095 //  exit(1);
00096 }

void message ( const char *  message,
  ... 
)

Definition at line 37 of file output.cc.

Referenced by SimBuilder::build_currentParams(), SimRunner::Cycle(), LCE_StatServiceNotifier::execute(), LCE_FileServicesNotifier::execute(), LCE_ParamUpdaterNotifier::execute(), LCE_Resize::execute(), LCE_Cross::execute(), LCE_Patch_Extinction::execute(), LCE_Regulation::execute(), LCE_Aging::execute(), LCE_Disperse_EvolDisp::execute(), LCE_Disperse_ConstDisp::execute(), LCE_Breed_Selection::execute(), LCE_Breed_Selection_Disperse::execute(), LCE_Breed_Disperse::execute(), LCE_Breed_Wolbachia::execute(), LCE_Breed::execute(), BinaryDataLoader::extractPop(), TTDeletMutBitstrFH::FHread(), TTDeletMutBitstrFH::FHwrite(), LCE_StatFH::FHwrite(), FileServices::init(), SimRunner::init_components(), SimRunner::init_random_seed(), Metapop::loadSourcePopulation(), IndFactory::makePrototype(), StatServices::notify(), ParamsParser::parse(), BinaryDataSaver::printData(), BinaryDataSaver::printHeader(), StreamParser::read(), FileParser::read(), SimRunner::Replicate_LOOP(), Metapop::retrieve_data(), SimRunner::run(), SimRunner::runPostExec(), LCE_Disperse_base::setLatticeMatrix(), Metapop::setPopulation(), TTNeutralGenesSH::setStatRecorders(), TTDeletMutBitstrSH::setStatRecorders(), LCE_Disperse_base::setSteppingStone1DMatrix(), StatRecorder< S >::setVal(), TTNeutralGenes::show_up(), TMatrix::show_up(), Patch::show_up(), Param::show_up(), Metapop::show_up(), Individual::show_up(), DataTable< unsigned int >::show_up(), Metapop::store_data(), BinaryDataSaver::storeData(), TTNeutralGenesFH::write_freq(), TTNeutralGenesFH::write_Fst_i(), TTNeutralGenesFH::write_FSTAT(), TTNeutralGenesFH::write_varcompWC(), and Metapop::~Metapop().

00038 {
00039   va_list(ap);
00040   
00041   va_start(ap, message);
00042 #ifdef _R_OUTPUT_
00043   Rvprintf(message, ap);
00044 #else
00045   vprintf(message,ap);
00046 #endif
00047   va_end(ap);
00048 }

void warning ( const char *  str,
  ... 
)


Generated for Nemo v2.1.2 by  doxygen 1.5.8 -- Nemo is hosted by  SourceForge.net Logo