source: HiSusy/trunk/Delphes/Delphes-3.0.9/examples/DelphesBrowser.C @ 5

Last change on this file since 5 was 5, checked in by zerwas, 11 years ago

update to Delphes-3.0.9

File size: 795 bytes
Line 
1/*
2root -l examples/DelphesBrowser.C
3*/
4
5{
6  #include <stdexcept>
7  gSystem->Load("libDelphes");
8
9  TFile *outputFile = TFile::Open("test.root", "RECREATE");
10  ExRootTreeWriter *treeWriter = new ExRootTreeWriter(outputFile, "Delphes");
11
12  ExRootConfReader *confReader = new ExRootConfReader;
13 
14  Delphes *modularDelphes = new Delphes("Delphes");
15
16  TObjArray *allParticleOutputArray = modularDelphes->ExportArray("allParticles");
17  TObjArray *stableParticleOutputArray = modularDelphes->ExportArray("stableParticles");
18  TObjArray *partonOutputArray = modularDelphes->ExportArray("partons");
19
20  confReader->ReadFile("examples/delphes_card_CMS.tcl");
21
22  modularDelphes->SetConfReader(confReader);
23  modularDelphes->SetTreeWriter(treeWriter);
24
25  modularDelphes->InitTask();
26
27  TBrowser browser;
28}
Note: See TracBrowser for help on using the repository browser.