ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/kiesel/TreeWriter/executable.cc
Revision: 1.5
Committed: Wed Apr 24 14:21:44 2013 UTC (12 years ago) by kiesel
Content type: text/plain
Branch: MAIN
Changes since 1.4: +1 -1 lines
Log Message:
no root scripts any more, horay!

File Contents

# User Rev Content
1 kiesel 1.1 #include "treeWriter.h"
2    
3     int main( int argc, char** argv ) {
4    
5 kiesel 1.4 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 kiesel 1.1
11 kiesel 1.4 TChain *inputTree = new TChain("susyTree");
12     for( unsigned int i=2; i<argc; ++i)
13     inputTree->Add( argv[i] );
14    
15     std::cout << "Write to output file \"" << outputFileName << "\"" << std::endl;
16    
17     TreeWriter *tw = new TreeWriter( inputTree, outputFileName, 0 );
18 kiesel 1.1
19     // settings
20     tw->PileUpWeightFile("pileUpReweighting/puWeights.root");
21 kiesel 1.3 tw->SetProcessNEvents(-1);
22 kiesel 1.5 tw->SetReportEvents(20000);
23 kiesel 1.1 tw->SkimEvents(true);
24     tw->Loop();
25    
26     }
27