1 void AliTRDDigitsDDL2Clusters()
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";
20 // Create the clusterizer
21 AliTRDclusterizerV1 *clusterizer =
22 new AliTRDclusterizerV1("clusterizer","Clusterizer class");
25 TFile *parfile = TFile::Open(infile);
26 AliTRDparameter *par = (AliTRDparameter *) parfile->Get("TRDparameter");
28 clusterizer->SetParameter(par);
31 clusterizer->SetVerbose(1);
34 TTree * te = (TTree*)parfile->Get("TE");
35 Int_t nev = (Int_t)te->GetEntries();
37 for(Int_t iev=0;iev<nev;iev++) {
39 AliRawReaderFile rawReader(iev);
41 // Open the AliRoot file
42 clusterizer->Open(infile,iev);
45 clusterizer->ReadDigits(&rawReader);
49 clusterizer->MakeClusters();
51 // Write the cluster tree into file AliTRDclusters.root
52 clusterizer->WriteClusters(-1);