]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDdigits2clusterMI.C
Added a prototection to prevent deleting the run loader in case the getter is inoked...
[u/mrichter/AliRoot.git] / TRD / AliTRDdigits2clusterMI.C
CommitLineData
64b82e53 1void AliTRDdigits2clusterMI()
2{
3
4/////////////////////////////////////////////////////////////////////////
5//
6// Creates cluster from the digit 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 names
18 Char_t *infile = "galice.root";
19 Char_t *outfile = "AliTRDclusters.root";
20
21 // Create the clusterizer
22 AliTRDclusterizerMI *clusterizer =
23 new AliTRDclusterizerMI("clusterizer","Clusterizer class");
24
25 // Read the parameter
26 TFile *parfile = TFile::Open(infile);
27 AliTRDparameter *par = (AliTRDparameter *) parfile->Get("TRDparameter");
28 par->ReInit();
29 clusterizer->SetParameter(par);
30
31 // Set the parameter
32 clusterizer->SetVerbose(1);
33
34 // Open the AliRoot file
35 clusterizer->Open(infile,0);
36 //clusterizer->Open(infile,outfile,0);
37
38
39 // Load the digits
40 clusterizer->ReadDigits();
41 clusterizer->Dump();
42
43 // Find the cluster
44 clusterizer->MakeClusters();
45
46 // Write the cluster tree into file AliTRDclusters.root
47 clusterizer->WriteClusters(-1);
48
49 // Save the clusterizer class in the AliROOT file
50 // clusterizer->Write();
51
52}