Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:48:17

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 #include "HBHEMuonOfflineAnalyzer.C"
0020 
0021 int main(Int_t argc, Char_t *argv[]) {
0022   
0023   if (argc<4) {
0024     std::cerr << "Please give 11 arguments \n"
0025           << "InputFileName" << "\n"
0026           << "outputFileName" << "\n"
0027           << "corrFileName" << "\n"
0028           << "flag (default 0)\n"
0029           << "mode (default 2)\n"
0030           << "maxDHB (default 5)\n"
0031           << "maxDHE (default 7)\n"
0032           << "runLo (default 0)\n"
0033           << "runHi (default 99999999)\n"
0034           << "etaMin (default 1)\n"
0035           << "etaMax (default 29)\n"
0036           << std::endl;
0037     return -1;
0038   }
0039 
0040   const char *inputFileList   = argv[1];
0041   const char *outFileName     = argv[2];
0042   const char *corrFileName    = argv[3];
0043   std::cout << "Input File List "  << inputFileList << std::endl
0044         << "Output FIle Name " << outFileName << std::endl
0045         << "Correction File Name " << corrFileName << std::endl;
0046   
0047   int flag(0), mode(2), maxDHB(5), maxDHE(7), runLo(0), runHi(9999999);
0048   int etaMin(1), etaMax(29);
0049   if (argc>4)  flag   = atoi(argv[4]);
0050   if (argc>5)  mode   = atoi(argv[5]);
0051   if (argc>6)  maxDHB = atoi(argv[6]);
0052   if (argc>7)  maxDHE = atoi(argv[7]);
0053   if (argc>8)  runLo  = atoi(argv[8]);
0054   if (argc>9)  runHi  = atoi(argv[9]);
0055   if (argc>10) etaMin = atoi(argv[10]);
0056   if (argc>11) etaMax = atoi(argv[11]);
0057 
0058   HBHEMuonOfflineAnalyzer* tree = 
0059     new HBHEMuonOfflineAnalyzer(inputFileList, outFileName, corrFileName,
0060                 flag, mode, maxDHB, maxDHE, runLo, runHi,
0061                 etaMin, etaMax, false);
0062   tree->Loop();
0063 
0064   return 0;
0065 }