gAlice now only read by AliRunDigitizer. Therefore it is just deleted in AliTRDmerge.C
[u/mrichter/AliRoot.git] / TRD / AliTRDmerge.C
1 void AliTRDmerge()
2 {
3   /////////////////////////////////////////////////////////////////////////
4   //
5   // Merges different file with summable digits
6   //
7   /////////////////////////////////////////////////////////////////////////
8
9   Char_t *fileSignal     = "galice_signal.root";
10   Char_t *fileBackground = "galice_background.root";
11
12   if (gAlice) {
13     printf("<AliTRDmerge> Delete the AliRun object from memory.\n");
14     delete gAlice;
15     gAlice = 0;
16   }
17
18   AliRunDigitizer *manager = new AliRunDigitizer(2,1);
19   manager->SetInputStream(0,fileSignal);
20   manager->SetInputStream(1,fileBackground);
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 }