]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/trd_rawloader.C
Small correction for shifts in SSD (M. Van Leeuwen)
[u/mrichter/AliRoot.git] / EVE / alice-macros / trd_rawloader.C
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 //
19 AliEveTRDLoader* trd_rawloader(Char_t *file)
20 {
21   Int_t fSuperModule = 0; // -1 for all
22   Int_t fStack = 4;       // -1 for all
23   Int_t fLayer = -1;      // -1 for all
24
25   // init RAW loader
26   AliEveTRDLoaderRaw *raw = new AliEveTRDLoaderRaw("RAW");
27   raw->SetDataType(AliEveTRDLoader::kTRDRawRoot);
28   raw->AddChambers(fSuperModule, fStack, fLayer);
29   raw->Open(file);
30
31   // load first event
32   raw->GoToEvent(0);
33   
34   // register raw with alieve
35   gEve->AddElement(raw);
36   raw->SpawnEditor();
37   gEve->Redraw3D();
38
39   return raw;
40 }