]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDsdigits2digits.C
Update to track display by Chuncheng
[u/mrichter/AliRoot.git] / TRD / AliTRDsdigits2digits.C
1 void AliTRDsdigits2digits()
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("TRDdigitizer"
21                                                   ,"TRD digitizer class");  
22
23   // Set the parameter
24   digitizer->SetDebug(1);
25
26   // Initialize the geometry 
27   digitizer->Open(fileName);
28
29   // Define the parameter object
30   // If no external parameter object is defined, 
31   // default parameter will be used
32   AliTRDparameter *parameter = new AliTRDparameter("TRDparameter"
33                                                   ,"TRD parameter class");
34   digitizer->SetParameter(parameter);
35
36   // Create the digits manager for the input s-digits
37   AliTRDdigitsManager *sdigitsManager = new AliTRDdigitsManager();
38   sdigitsManager->SetDebug(1);
39   sdigitsManager->SetSDigits(kTRUE);
40   sdigitsManager->ReadDigits();
41
42   // Add the s-digits to the input list 
43   digitizer->AddSDigitsManager(sdigitsManager);
44
45   // Convert the s-digits to normal digits
46   digitizer->SDigits2Digits();
47
48   // Store the digits
49   digitizer->WriteDigits();
50
51   // Save the parameter object in the AliROOT file
52   parameter->Write();
53
54 }