#include <string>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <limits>
#include "Jeep/JPrint.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
| Auxiliary program to convert PMT QE(angle) data. More...
|
|
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Auxiliary program to convert PMT QE(angle) data.
- Author
- mdejong
Definition at line 19 of file JPMTAngularAcceptance.cc.
28 JParser<> zap(
"Auxiliary program to convert PMT QE(angle) data.");
35 catch(
const exception &error) {
36 FATAL(error.what() << endl);
40 const string DEG(
"deg");
43 if (inputFile !=
"") {
45 ifstream in(inputFile.c_str());
47 while (in.peek() ==
'#') {
48 in.ignore(numeric_limits<streamsize>::max(),
'\n');
60 istringstream is(buffer);
64 for (
double x; is >>
x; ) {
71 istringstream is(buffer);
75 for (
double x; is >>
x; ) {
76 wavelength.push_back(
x);
87 istringstream is(buffer);
111 for (
double y ; is >>
y; ++i) {
113 if (i != energy.size()) {
118 <<
"[" <<
FIXED(5,2) << -ct <<
"]"
119 <<
"[" <<
FIXED(3,1) << wavelength[i] <<
"]"
126 FATAL(
"Inconsistent data " << i <<
" != " << wavelength.size() << endl);
130 if (i != energy.size()) {
132 FATAL(
"Inconsistent data " << i <<
" != " << wavelength.size() << endl);
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
Auxiliary data structure for floating point format specification.