]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/macros/alieve_create_vsd.C
Extra header added to the list
[u/mrichter/AliRoot.git] / EVE / macros / alieve_create_vsd.C
1 // $Id$
2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 void alieve_create_vsd(Int_t nEvents=1, Int_t minTracks=0)
11 {
12   // Invoke from a running alieve.
13   // nEvents will be domped starting from current one.
14   // If minTracks is set at least that many ESD tracks must exist.
15
16   TEveVSD::DisableTObjectStreamersForVSDStruct();
17
18   AliEveVSDCreator vc;
19   vc.SetDebugLevel(2);
20
21   Int_t nDone = 0;
22   while (nDone < nEvents)
23   {
24     if (minTracks)
25     {
26       AliESDEvent* esd = AliEveEventManager::AssertESD();
27       while (esd->GetNumberOfTracks() < minTracks)
28       {
29         AliEveEventManager::GetMaster()->NextEvent();
30         esd = AliEveEventManager::AssertESD();
31       }
32     }
33     vc.CreateVSD("AliVSD.root");
34     ++nDone;
35
36     AliEveEventManager::GetMaster()->NextEvent();
37   }
38 }