ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitHzz4l/ElectronStudies/src/runZeeTreeWriter.cc
Revision: 1.1
Committed: Tue Jul 17 14:09:14 2012 UTC (12 years, 10 months ago) by anlevin
Content type: text/plain
Branch: MAIN
Log Message:
added electron regression stuff

File Contents

# User Rev Content
1 anlevin 1.1 //./bin/runZeeTreeWriter.exe --catalogDir "/home/mitprod/catalog" --book "cern/filefi/028" --dataset "s12-zllm50-2-v9" --fileset "0000" --outputFilename "delete.root" --n_events_to_process 1000
2    
3     #include "ZeeTreeWriterMod.h"
4     #include "ZeeTreeWriterArgs.h"
5     #include "TChain.h"
6    
7     int main(int argc, char** argv)
8     {
9     ZeeTreeWriterFlags ctrl;
10    
11     parse_zee_tree_writer_args( argc, argv, ctrl );
12     if( ctrl.catalogDir.empty() || ctrl.book.empty() || ctrl.dataset.empty()|| ctrl.fileset.empty()|| ctrl.outputFilename.empty()|| ctrl.n_events_to_process == -2)
13     {
14     cerr << "usage: runZeeTreeWriter.exe <flags> " << endl;
15     ctrl.dump();
16    
17     return 1;
18     }
19     ctrl.dump();
20    
21     mithep::ZeeTreeWriterMod *eertwMod = new mithep::ZeeTreeWriterMod;
22     mithep::Analysis *ana = new mithep::Analysis;
23     if(ctrl.n_events_to_process == -1)
24     ana->SetProcessNEvents(TChain::kBigNumber);
25     else
26     ana->SetProcessNEvents(ctrl.n_events_to_process);
27    
28     ana->AddSuperModule(eertwMod);
29    
30     mithep::Catalog *c = new mithep::Catalog(TString(ctrl.catalogDir));
31     mithep::Dataset *d = c->FindDataset(TString(ctrl.book),TString(ctrl.dataset),TString(ctrl.fileset));
32     ana->AddDataset(d);
33     //ana->AddFile("root://castorcms//castor/cern.ch/user/p/paus/filefi/028/r12a-dmu-pr-v1/FEF8A575-A785-E111-A21A-003048D37538.root");
34     eertwMod->fOutputName = ctrl.outputFilename;
35     ana->Run(kFALSE);
36    
37    
38     }
39