BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
CalculateTruncation.cc File Reference
#include <string>
#include "Widget/WidgetHelpers/WidgetGenerator.h"

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 16 of file CalculateTruncation.cc.

16 {
17
18 std::cout << std::endl << "*** Recalculating truncation ***" << std::endl << std::endl;
19
20 TString inputfile("");
21 TString outputfile("");
22
23 // ***************************
24 // Parse command line options
25 // ***************************
26
27 for (int i = 1; i < argc; i++){
28
29 std::string arg(argv[i]);
30
31 if (arg == "-f"){
32 if ((i+1 == argc) || (argv[i+1][0] == '-')) arg = "-h";
33 else inputfile = argv[++i]; }
34 if (arg == "-o"){
35 if ((i+1 == argc) || (argv[i+1][0] == '-')) arg = "-h";
36 else outputfile = argv[++i]; }
37 if (arg == "-h"){
38 std::cout << std::endl << " Usage for: " << argv[0] << std::endl << std::endl;
39 std::cout << "\t -f <file>\t Input file" << std::endl;
40 std::cout << "\t -o <file>\t Output file" << std::endl;
41 exit(1);
42 }
43 }
44
45 if( inputfile == "" || outputfile == "" ){
46 std::cout << std::endl << " Usage for: " << argv[0] << std::endl << std::endl;
47 std::cout << "\t -c <file>\t Configuration file" << std::endl;
48 std::cout << "\t -f <file>\t Input file" << std::endl;
49 std::cout << "\t -o <file>\t Output file" << std::endl;
50 exit(1);
51 }
52
53 // Create a widget interface and simulate the trucation
54 WidgetGenerator widget;
55 widget.simulateReconstruction(inputfile,outputfile);
56}
double arg(const EvtComplex &c)
Definition: EvtComplex.hh:227
void simulateReconstruction(TString infilename, TString outfilename)