/[PAMELA software]/yoda/techmodel/TechmodelPamelaRun.cpp
ViewVC logotype

Diff of /yoda/techmodel/TechmodelPamelaRun.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by kusanagi, Tue Jul 6 12:20:23 2004 UTC revision 3.0 by kusanagi, Fri Mar 4 15:54:11 2005 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Source: /home/cvspamela/yoda/techmodel/TechmodelPamelaRun.cpp,v $   * $Source: /home/cvsmanager/yoda/techmodel/TechmodelPamelaRun.cpp,v $
3   * $Id: TechmodelPamelaRun.cpp,v 1.7 2004/04/28 09:01:27 nagni Exp $   * $Id: TechmodelPamelaRun.cpp,v 2.1 2004/12/03 22:08:01 kusanagi Exp $
4   * $Author: nagni $   * $Author: kusanagi $
5   *   *
6   * Implementation of the TechmodelPamelaRun class.   * Implementation of the TechmodelPamelaRun class.
7   */   */
8  #include <string>  #include <string>
9  #include <exception>  #include <exception>
10  #include <iostream>  #include <iostream>
11  #include <fstream.h>  #include <fstream>
12  #include <log4cpp/Category.hh>  #include <log4cxx/logger.h>
13    
14  #include "TechmodelPamelaRun.h"  #include "TechmodelPamelaRun.h"
15    
# Line 17  using namespace pamela; Line 17  using namespace pamela;
17  using namespace pamela::techmodel;  using namespace pamela::techmodel;
18    
19    
20    static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.TechmodelPamelaRun"));
 static log4cpp::Category& cat = log4cpp::Category::getInstance("pamela.techmodel.TechmodelPamelaRun");    
21    
22  /**  /**
23   * Create a new Pamela run structure to write the data from the   * Create a new Pamela run structure to write the data from the
# Line 29  TechmodelPamelaRun::TechmodelPamelaRun(s Line 28  TechmodelPamelaRun::TechmodelPamelaRun(s
28    PamelaRun(fileName, path) {    PamelaRun(fileName, path) {
29    InputFile = new ifstream(fileName.c_str(), std::ios::binary); //inserito ios::binary maurizio 01/03/2004    InputFile = new ifstream(fileName.c_str(), std::ios::binary); //inserito ios::binary maurizio 01/03/2004
30    if (!*InputFile){    if (!*InputFile){
31      cat <<  log4cpp::Priority::ERROR      std::stringstream oss;
32          <<  "Cannot open file " + fileName      oss.str("");
33          <<  "\n " << log4cpp::CategoryStream::ENDLINE;      oss << "Cannot open file " << fileName;
34        logger->error(oss.str().c_str());
35      throw std::exception();      throw std::exception();
36    }    }
37    else    else

Legend:
Removed from v.1.1  
changed lines
  Added in v.3.0

  ViewVC Help
Powered by ViewVC 1.1.23