--- yoda/techmodel/TechmodelPamelaRun.cpp 2004/07/06 12:20:23 1.1.1.1 +++ yoda/techmodel/TechmodelPamelaRun.cpp 2006/02/07 17:11:10 6.0 @@ -1,37 +1,34 @@ /** @file - * $Source: /home/cvspamela/yoda/techmodel/TechmodelPamelaRun.cpp,v $ - * $Id: TechmodelPamelaRun.cpp,v 1.7 2004/04/28 09:01:27 nagni Exp $ - * $Author: nagni $ + * $Source: /home/cvsmanager/yoda/techmodel/TechmodelPamelaRun.cpp,v $ + * $Id: TechmodelPamelaRun.cpp,v 5.1 2006/02/04 12:37:45 kusanagi Exp $ + * $Author: kusanagi $ * * Implementation of the TechmodelPamelaRun class. */ -#include -#include -#include -#include -#include + +#include #include "TechmodelPamelaRun.h" using namespace pamela; using namespace pamela::techmodel; - -static log4cpp::Category& cat = log4cpp::Category::getInstance("pamela.techmodel.TechmodelPamelaRun"); +static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.TechmodelPamelaRun")); /** * Create a new Pamela run structure to write the data from the * techmodel data files into the ROOT TTrees. * @param run Run number */ -TechmodelPamelaRun::TechmodelPamelaRun(std::string fileName, std::string path) : - PamelaRun(fileName, path) { +TechmodelPamelaRun::TechmodelPamelaRun(std::string fileName, std::string path, bool multiFile, short compression) : + PamelaRun(fileName, path, multiFile, compression) { InputFile = new ifstream(fileName.c_str(), std::ios::binary); //inserito ios::binary maurizio 01/03/2004 if (!*InputFile){ - cat << log4cpp::Priority::ERROR - << "Cannot open file " + fileName - << "\n " << log4cpp::CategoryStream::ENDLINE; + std::stringstream oss; + oss.str(""); + oss << "Cannot open file " << fileName; + logger->error(oss.str().c_str()); throw std::exception(); } else