2 |
|
|
3 |
|
int main( int argc, char** argv ) { |
4 |
|
|
5 |
< |
std::string filename = "../susyEvents.root"; |
6 |
< |
std::string outputFilename = "susyTree.root"; |
5 |
> |
if( argc < 2 ) { |
6 |
> |
std::cout << "usage: ./execute outputFileName.root input1.root input2.root ..." << std::endl; |
7 |
> |
return 1; |
8 |
> |
} |
9 |
> |
std::string outputFileName = argv[1]; |
10 |
> |
|
11 |
> |
TChain *inputTree = new TChain("susyTree"); |
12 |
> |
for( unsigned int i=2; i<argc; ++i) |
13 |
> |
inputTree->Add( argv[i] ); |
14 |
|
|
15 |
< |
TreeWriter *tw = new TreeWriter( filename, outputFilename, 5 ); |
15 |
> |
std::cout << "Write to output file \"" << outputFileName << "\"" << std::endl; |
16 |
> |
|
17 |
> |
TreeWriter *tw = new TreeWriter( inputTree, outputFileName, 0 ); |
18 |
|
|
19 |
|
// settings |
20 |
|
tw->PileUpWeightFile("pileUpReweighting/puWeights.root"); |
21 |
|
tw->SetProcessNEvents(-1); |
22 |
+ |
tw->SetReportEvents(20000); |
23 |
|
tw->SkimEvents(true); |
24 |
+ |
|
25 |
+ |
double start_time = time(NULL); |
26 |
|
tw->Loop(); |
27 |
+ |
double end_time = time(NULL); |
28 |
+ |
|
29 |
+ |
std::cout << "Job needed " << 1.*(end_time - start_time)/3600 << " h real time." << std::endl; |
30 |
|
|
31 |
|
} |
32 |
|
|