/** @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 $ * * Implementation of the TechmodelPamelaRun class. */ #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"); /** * 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) { 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; throw std::exception(); } else { // :TODO: InputFile should be a dervived class for cross-checking of // packet lengths. } }