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

Contents of /yoda/techmodel/TechmodelPamelaRun.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Jul 6 12:20:23 2004 UTC (20 years, 5 months ago) by kusanagi
Branch: MAIN
Initial revision

1 /** @file
2 * $Source: /home/cvspamela/yoda/techmodel/TechmodelPamelaRun.cpp,v $
3 * $Id: TechmodelPamelaRun.cpp,v 1.7 2004/04/28 09:01:27 nagni Exp $
4 * $Author: nagni $
5 *
6 * Implementation of the TechmodelPamelaRun class.
7 */
8 #include <string>
9 #include <exception>
10 #include <iostream>
11 #include <fstream.h>
12 #include <log4cpp/Category.hh>
13
14 #include "TechmodelPamelaRun.h"
15
16 using namespace pamela;
17 using namespace pamela::techmodel;
18
19
20
21 static log4cpp::Category& cat = log4cpp::Category::getInstance("pamela.techmodel.TechmodelPamelaRun");
22
23 /**
24 * Create a new Pamela run structure to write the data from the
25 * techmodel data files into the ROOT TTrees.
26 * @param run Run number
27 */
28 TechmodelPamelaRun::TechmodelPamelaRun(std::string fileName, std::string path) :
29 PamelaRun(fileName, path) {
30 InputFile = new ifstream(fileName.c_str(), std::ios::binary); //inserito ios::binary maurizio 01/03/2004
31 if (!*InputFile){
32 cat << log4cpp::Priority::ERROR
33 << "Cannot open file " + fileName
34 << "\n " << log4cpp::CategoryStream::ENDLINE;
35 throw std::exception();
36 }
37 else
38 {
39 // :TODO: InputFile should be a dervived class for cross-checking of
40 // packet lengths.
41 }
42
43 }
44
45
46
47
48

  ViewVC Help
Powered by ViewVC 1.1.23