ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/kiesel/TreeWriter/executable.cc
(Generate patch)

Comparing UserCode/kiesel/TreeWriter/executable.cc (file contents):
Revision 1.3 by kiesel, Fri Apr 19 10:14:01 2013 UTC vs.
Revision 1.5 by kiesel, Wed Apr 24 14:21:44 2013 UTC

# Line 2 | Line 2
2  
3   int main( int argc, char** argv ) {
4  
5 <        std::string filename = "../susyEvents.root";
6 <        //std::string filename = "dcache:dcap://dcache-cms-dcap.desy.de/pnfs/desy.de/cms/tier2/store/user/jschulz/nTuples/WJets_V01/susyEvents_812_1_Fbi.root";
7 <        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 <        TreeWriter *tw = new TreeWriter( filename, outputFilename, 0 );
11 >        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  
19          // settings
20          tw->PileUpWeightFile("pileUpReweighting/puWeights.root");
21          tw->SetProcessNEvents(-1);
22 <        tw->SetReportEvents(1000);
22 >        tw->SetReportEvents(20000);
23          tw->SkimEvents(true);
24          tw->Loop();
25  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines