1 void AliTRDdigits2cluster()
4 /////////////////////////////////////////////////////////////////////////
6 // Creates cluster from the digit information.
8 /////////////////////////////////////////////////////////////////////////
10 // Dynamically link some shared libs
11 if (gClassTable->GetID("AliRun") < 0) {
12 gROOT->LoadMacro("loadlibs.C");
14 cout << "Loaded shared libraries" << endl;
17 // Input and output file names
18 Char_t *infile = "galice.root";
19 Char_t *outfile = "AliTRDclusters.root";
21 // Create the clusterizer
22 AliTRDclusterizerV1 *clusterizer =
23 new AliTRDclusterizerV1("clusterizer","Clusterizer class");
26 TFile *parfile = TFile::Open(infile);
27 AliTRDparameter *par = (AliTRDparameter *) parfile->Get("TRDparameter");
29 clusterizer->SetParameter(par);
32 clusterizer->SetVerbose(1);
34 // Open the AliRoot file
35 clusterizer->Open(infile,0);
36 //clusterizer->Open(infile,outfile,0);
40 clusterizer->ReadDigits();
44 clusterizer->MakeClusters();
46 // Write the cluster tree into file AliTRDclusters.root
47 clusterizer->WriteClusters(-1);
49 // Save the clusterizer class in the AliROOT file
50 // clusterizer->Write();