]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
test macro for DIME
authormorsch <andreas.morsch@cern.ch>
Thu, 16 Oct 2014 07:02:50 +0000 (09:02 +0200)
committermorsch <andreas.morsch@cern.ch>
Thu, 16 Oct 2014 07:02:50 +0000 (09:02 +0200)
DIME/test.C [new file with mode: 0644]

diff --git a/DIME/test.C b/DIME/test.C
new file mode 100644 (file)
index 0000000..e55d5f6
--- /dev/null
@@ -0,0 +1,24 @@
+void test()
+{
+  gSystem->Load("libEG.so");
+  gSystem->Load("libdime.so");
+  gSystem->Load("libTDime.so");
+  
+  TDime* dime = new TDime();
+  dime->SetEnergyCMS(7000.);
+  dime->Initialize();
+  
+  TClonesArray* particles = new TClonesArray("TParticle", 100);
+  
+  for (Int_t i = 0; i < 10; i++)
+    {    
+    dime->GenerateEvent();
+    Int_t np = dime->ImportParticles(particles, "All");
+    printf("\n Imported %3d particles \n", np);
+    for (Int_t ip = 0; ip < np; ip++) {
+      TParticle* part = (TParticle*) (particles->At(ip));
+      part->Print();
+    }
+  }
+
+}