runPDSPThinSliceFit.c++
Go to the documentation of this file.
1 #include <iostream>
2 #include <fstream>
3 #include <sstream>
4 #include <string>
5 
10 
11 #include "PDSPThinSliceFitter.h"
12 
13 #include "TFile.h"
14 
15 int main(int argc, char ** argv){
16 
17  std::string fcl_file;
19  // Options to run
20  for (int iArg = 1; iArg < argc; iArg++) {
21  if (!strcasecmp(argv[iArg],"-c")) {
22  fcl_file = argv[++iArg];
23  }
24  if (!strcasecmp(argv[iArg],"-o")) {
25  output_file = argv[++iArg];
26  }
27  if (!strcasecmp(argv[iArg],"-h")) {
28  std::cout << "Usage: runPDSPThinSliceFit -c fclfile.fcl " <<
29  "-o outputfile.root " << std::endl;
30  return 1;
31  }
32  }
33 
35  = new protoana::PDSPThinSliceFitter(fcl_file, output_file);
36  fit->InitializeMCSamples();
37  fit->BuildMCSamples();
38  fit->RunFitAndSave();
39 
40  return 0;
41 }
std::string string
Definition: nybbler.cc:12
int main(int argc, char **argv)
QTextStream & endl(QTextStream &s)