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 |
1 |
> |
//./bin/runZeeTreeWriter.exe --catalogDir "/home/mitprod/catalog" --book "cern/filefi/028" --dataset "s12-zllm50-2-v9" --fileset "0000" --output_filename "delete.root" --is_data 0 --n_events_to_process 1000 |
2 |
|
|
3 |
|
#include "ZeeTreeWriterMod.h" |
4 |
|
#include "ZeeTreeWriterArgs.h" |
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) |
12 |
> |
if( ctrl.catalogDir.empty() || ctrl.book.empty() || ctrl.dataset.empty()|| ctrl.fileset.empty()|| ctrl.output_filename.empty()|| !(ctrl.is_data == 0 || ctrl.is_data == 1) || ctrl.n_events_to_process == -2) |
13 |
|
{ |
14 |
|
cerr << "usage: runZeeTreeWriter.exe <flags> " << endl; |
15 |
|
ctrl.dump(); |
18 |
|
} |
19 |
|
ctrl.dump(); |
20 |
|
|
21 |
< |
mithep::ZeeTreeWriterMod *eertwMod = new mithep::ZeeTreeWriterMod; |
21 |
> |
mithep::ZeeTreeWriterMod *zeetwMod = 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); |
27 |
> |
|
28 |
> |
ana->AddSuperModule(zeetwMod); |
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; |
34 |
> |
zeetwMod->fOutputName = ctrl.output_filename; |
35 |
> |
zeetwMod->massLo = 60; |
36 |
> |
zeetwMod->massHi = 120; |
37 |
> |
zeetwMod->use_gen = !ctrl.is_data; |
38 |
> |
zeetwMod->use_JSON = ctrl.is_data; |
39 |
> |
|
40 |
|
ana->Run(kFALSE); |
41 |
|
|
42 |
|
|