-
Notifications
You must be signed in to change notification settings - Fork 0
/
compilereference_4mu_single.C
61 lines (43 loc) · 1.21 KB
/
compilereference_4mu_single.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#if !defined(__CINT__) || defined(__MAKECINT__)
#include "HZZ4LeptonsAnalysis_4mu.h"
#include <TTree.h>
#include <TFile.h>
#include <TString.h>
#include <TROOT.h>
#include <string>
#include <iostream>
#include <TSystem.h>
#include <TH2.h>
#include "TChain.h"
#include <stdlib.h>
#include <TDCacheFile.h>
#endif
using namespace std;
int main(int argc, char ** argv){
string site=argv[1];
cout << site << " configuration" <<endl;
string dataconf=argv[2];
cout << dataconf << " dataconfiguration" <<endl;
string mcconf=argv[3];
cout << mcconf << " mc configuration" <<endl;
Char_t nome[300];
sprintf(nome,"roottree_leptons.root");
TFile *file3;
file3 = TFile::Open(nome);
//if (site.find("FNAL")<5){
// file3 = new TDCacheFile (nome,"READ","ROOT file with trees",0);
//}
//else {
// file3 = TFile::Open(nome);
//}
cout << "Read file with name: " << nome << endl;
TTree *tree3 = (TTree*)file3->Get("HZZ4LeptonsAnalysis");
// HZZ4LeptonsAnalysis make3(tree3,1.,dataconf,mcconf);
HZZ4LeptonsAnalysis make3(tree3);
sprintf(nome,"output_Fall15_Higgs.root");
make3.Loop(nome);
cout << "Create file with name: " << nome << endl;
delete tree3;
file3 -> Close();
return 0;
}