File indexing completed on 2024-04-06 11:58:48
0001 #include <TStyle.h>
0002 #include <TCanvas.h>
0003 #include <TROOT.h>
0004 #include <TChain.h>
0005 #include <TFile.h>
0006 #include <TProfile.h>
0007 #include <TH1D.h>
0008 #include <TH2D.h>
0009 #include <TString.h>
0010 #include <TTree.h>
0011
0012 #include <fstream>
0013 #include <iomanip>
0014 #include <iostream>
0015 #include <sstream>
0016 #include <string>
0017 #include <vector>
0018
0019 using namespace std;
0020
0021 #include "AnalyzeLepTree.C"
0022
0023 int main(Int_t argc, Char_t *argv[]) {
0024 if (argc <= 4) {
0025 std::cerr << "Please give 5 arguments \n"
0026 << "InputFileName"
0027 << "\n"
0028 << "outputRootFileName"
0029 << "\n"
0030 << "outputMeanFileName"
0031 << "\n"
0032 << "mode (default 0)\n"
0033 << "modeLHC (default 3)\n"
0034 << std::endl;
0035 return -1;
0036 }
0037
0038 const char *inputFileName = argv[1];
0039 const char *outputFileName = argv[2];
0040 const char *meanFileName = argv[3];
0041 int mode = (argc > 4) ? atoi(argv[4]) : 0;
0042 int modeLHC = (argc > 5) ? atoi(argv[5]) : 3;
0043 int nMax = (argc > 6) ? atoi(argv[6]) : -1;
0044 bool debug = (argc > 7) ? (atoi(argv[7]) > 0) : false;
0045 std::cout << "Input File List " << inputFileName << std::endl
0046 << "Output ROOT File Name " << outputFileName << std::endl
0047 << "Output Mean File Name " << meanFileName << std::endl
0048 << "Mode " << mode << " ModeLHC " << modeLHC << std::endl;
0049
0050 AnalyzeLepTree tree(inputFileName, mode, modeLHC);
0051 tree.Loop(nMax, debug);
0052 tree.writeHisto(outputFileName);
0053 tree.writeMeanError(meanFileName);
0054
0055 return 0;
0056 }