Using getter instead of global constant
[u/mrichter/AliRoot.git] / TRD / AliTRDhits2sdigits.C
CommitLineData
fa148e6c 1void 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
88cb7938 21 AliTRDdigitizer *digitizer = new AliTRDdigitizer("TRDdigitizer","TRD digitizer class");
fa148e6c 22
23 // Set the parameter
24 digitizer->SetDebug(1);
25
26 // For the summable digits
27 digitizer->SetSDigits(kTRUE);
28
29 // Open the AliRoot file
30 digitizer->Open(alifile);
31
32 // Define the parameter object
33 // If no external parameter object is defined,
34 // default parameter will be used
35 AliTRDparameter *parameter = new AliTRDparameter("TRDparameter"
36 ,"TRD parameter class");
37 digitizer->SetParameter(parameter);
38
39 // Create the digits
40 digitizer->MakeDigits();
41
42 // Write the digits into the input file
43 digitizer->WriteDigits();
44
45 // Save the parameter object in the AliROOT file
f5a857b2 46 AliRunLoader* rl = AliRunLoader::GetRunLoader(AliConfig::GetDefaultEventFolderName());
88cb7938 47 rl->CdGAFile();
fa148e6c 48 parameter->Write();
49
50}