]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDhits2sdigits.C
Remove const for CreateGeometry
[u/mrichter/AliRoot.git] / TRD / AliTRDhits2sdigits.C
1 void AliTRDhits2sdigits() 
2 {
3
4   /////////////////////////////////////////////////////////////////////////
5   //
6   // Creates summable digits from the hit information. 
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   // Input (and output) file name
18   Char_t *alifile = "galice.root"; 
19
20   // Create the TRD digitzer 
21   AliTRDdigitizer *digitizer = new AliTRDdigitizer("TRDdigitizer"
22                                                   ,"TRD digitizer class");
23
24   // Set the parameter
25   digitizer->SetDebug(1);
26
27   // For the summable digits
28   digitizer->SetSDigits(kTRUE);
29
30   // Open the AliRoot file
31   digitizer->Open(alifile);
32
33   // Define the parameter object
34   // If no external parameter object is defined, 
35   // default parameter will be used
36   AliTRDparameter *parameter = new AliTRDparameter("TRDparameter"
37                                                   ,"TRD parameter class");
38   digitizer->SetParameter(parameter);
39
40   // Create the digits
41   digitizer->MakeDigits();
42
43   // Write the digits into the input file
44   digitizer->WriteDigits();
45
46   // Save the parameter object in the AliROOT file
47   parameter->Write();
48
49 }