]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/sdigits2digits.C
Updated Linkdef and libTOF.pkg
[u/mrichter/AliRoot.git] / TRD / sdigits2digits.C
1 void sdigits2digits()
2 {
3
4   /////////////////////////////////////////////////////////////////////////
5   //
6   // Converts s-digits to normal digits
7   //
8   /////////////////////////////////////////////////////////////////////////
9
10   // Dynamically link some shared libs
11   if (gClassTable->GetID("AliRun") < 0) {
12     gROOT->LoadMacro("loadlibs.C");
13     loadlibs();
14     cout << "Loaded shared libraries" << endl;
15   }
16
17   Char_t *fileName = "galice.root";
18
19   // Create the TRD digits merger
20   AliTRDdigitizer *digitizer = new AliTRDdigitizer("digitizer","Digitizer class");  
21
22   // Set the parameter
23   digitizer->SetDebug(1);
24
25   // Initialize the geometry 
26   digitizer->Open(fileName);
27
28   // Create the digits manager for the input s-digits
29   AliTRDdigitsManager *sdigitsManager = new AliTRDdigitsManager();
30   sdigitsManager->SetDebug(1);
31   sdigitsManager->SetSDigits(kTRUE);
32   sdigitsManager->ReadDigits();
33
34   // Add the s-digits to the input list 
35   digitizer->AddSDigitsManager(sdigitsManager);
36
37   // Convert the s-digits to normal digits
38   digitizer->SDigits2Digits();
39
40   // Store the digits
41   digitizer->WriteDigits();
42
43 }