gAlice now only read by AliRunDigitizer. Therefore it is just deleted in AliTRDmerge.C
[u/mrichter/AliRoot.git] / TRD / AliTRDmerge.C
CommitLineData
fa148e6c 1void AliTRDmerge()
2{
3 /////////////////////////////////////////////////////////////////////////
4 //
5 // Merges different file with summable digits
6 //
7 /////////////////////////////////////////////////////////////////////////
8
cec4059b 9 Char_t *fileSignal = "galice_signal.root";
10 Char_t *fileBackground = "galice_background.root";
11
12 if (gAlice) {
c57e2264 13 printf("<AliTRDmerge> Delete the AliRun object from memory.\n");
cec4059b 14 delete gAlice;
c57e2264 15 gAlice = 0;
cec4059b 16 }
17
fa148e6c 18 AliRunDigitizer *manager = new AliRunDigitizer(2,1);
cec4059b 19 manager->SetInputStream(0,fileSignal);
20 manager->SetInputStream(1,fileBackground);
fa148e6c 21
22 AliTRDdigitizer *digitizer = new AliTRDdigitizer(manager
23 ,"TRDdigitizer"
24 ,"TRD digitizer class");
25
26 // Define the parameter object
27 // If no external parameter object is defined,
28 // default parameter will be used
29 AliTRDparameter *parameter = new AliTRDparameter("TRDparameter"
30 ,"TRD parameter class");
31 digitizer->SetParameter(parameter);
32
33 // Do the merging
34 manager->Exec("deb");
35
36}