]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/trd_rawloader.C
bug fix: particle map was not added to the event
[u/mrichter/AliRoot.git] / EVE / alice-macros / trd_rawloader.C
CommitLineData
8d415c38 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_rawloader.C
8// AliEveTRDLoader *raw = trd_rawloader(filename);
9// raw->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// Minjug Kweon (minjung@physi.uni-heidelberg.de)
18//
ba978640 19
20#if !defined(__CINT__) || defined(__MAKECINT__)
21#include <TEveManager.h>
22
6c49a8e1 23#include <AliEveTRDLoader.h>
24#include <AliEveTRDLoaderImp.h>
ba978640 25#endif
26
27
8d415c38 28AliEveTRDLoader* trd_rawloader(Char_t *file)
29{
30 Int_t fSuperModule = 0; // -1 for all
31 Int_t fStack = 4; // -1 for all
32 Int_t fLayer = -1; // -1 for all
33
34 // init RAW loader
35 AliEveTRDLoaderRaw *raw = new AliEveTRDLoaderRaw("RAW");
36 raw->SetDataType(AliEveTRDLoader::kTRDRawRoot);
37 raw->AddChambers(fSuperModule, fStack, fLayer);
38 raw->Open(file);
39
40 // load first event
41 raw->GoToEvent(0);
42
43 // register raw with alieve
44 gEve->AddElement(raw);
45 raw->SpawnEditor();
46 gEve->Redraw3D();
47
48 return raw;
49}