#include "CAF.h"
#include "TFile.h"
#include "TTree.h"
#include <iostream>
#include <string>
Go to the source code of this file.
int main |
( |
int |
argc, |
|
|
char const * |
argv[] |
|
) |
| |
Definition at line 27 of file cafanatree_module.cxx.
56 correct4origin =
argv[p+1];
69 std::cout <<
"Missing an origin coordinate!" <<
std::endl;
79 if(correct4origin !=
"0" && correct4origin !=
"1")
85 if( x ==
"" && y ==
"" && z ==
"" )
87 printf(
"No TPC offset given, defaulting to (0, 0, 0)!!\n");
91 printf(
"Making CAF from tree dump: %s\n", infile.c_str() );
92 printf(
"Output CAF file: %s\n", outfile.c_str() );
93 printf(
"Correct for Origin: %s\n", correct4origin.c_str() );
94 printf(
"TPC offset: (%s, %s, %s) cm\n", x.c_str(), y.c_str(), z.c_str() );
96 double originTPC[3] = {std::atof(x.c_str()), std::atof(y.c_str()), std::atof(z.c_str())};
98 CAF *
caf =
new CAF(infile, outfile, std::atoi(correct4origin.c_str()), &originTPC[0]);
99 if(not caf->BookTFile())
return -1;
QTextStream & endl(QTextStream &s)
Definition at line 22 of file cafanatree_module.cxx.
24 std::cout <<
"./cafanatree_module --infile <inputfile> --outfile <outputfile> --correct4origin <0/1> --originTPC <x> <y> <z> (in cm)" <<
std::endl;
QTextStream & endl(QTextStream &s)