]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/trd_loader.C
From Alexandru: new/improved TRD macros.
[u/mrichter/AliRoot.git] / EVE / alice-macros / trd_loader.C
CommitLineData
6983e87a 1//
2// How to steer the TRD loaders from a macro
3// For the usage of only the TRD data containers and
4// AliEve event loop check the macro "trd_detectors.C"
5//
6// Usage:
7// .L trd_loader.C
8// AliEveTRDLoader *loader = trd_loader();
9// loader->NextEvent();
10//
11// Caution:
12// In order to update the screen one has to go to GLViewer
13// and click the UpdateScene button after each NextEvent().
14//
15// Author:
16// Alex Bercuci (A.Bercuci@gsi.de)
17//
18AliEveTRDLoader* trd_loader()
19{
20 // init MC loader
21 AliEveTRDLoader *loader = new AliEveTRDLoaderSim("MC");
22
23 // init single file loader
24 // AliEveTRDLoader *loader = new AliEveTRDLoader("Digits");
25
26 // link the run loader and define the chamber setting and data type
27 loader->Open("galice.root");
28 loader->AddChambers(3, 3);
29 loader->SetDataType(AliEveTRDLoader::kTRDHits | AliEveTRDLoader::kTRDDigits | AliEveTRDLoader::kTRDClusters);
30
31 // load first event
32 loader->GoToEvent(0);
33
34 // register loader with alieve
35 gEve->AddElement(loader);
36 loader->SpawnEditor();
37 gEve->Redraw3D();
38
39 return loader;
40}