]>
Commit | Line | Data |
---|---|---|
928e9fae | 1 | void AliTRDDigits2Clusters() |
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 | ||
20 | // Create the clusterizer | |
21 | AliTRDclusterizerV1 *clusterizer = | |
22 | new AliTRDclusterizerV1("clusterizer","Clusterizer class"); | |
23 | ||
24 | // Read the parameter | |
25 | TFile *parfile = TFile::Open(infile); | |
26 | AliTRDparameter *par = (AliTRDparameter *) parfile->Get("TRDparameter"); | |
27 | par->ReInit(); | |
28 | clusterizer->SetParameter(par); | |
29 | ||
30 | // Set the parameter | |
31 | clusterizer->SetVerbose(1); | |
32 | ||
33 | //Number of events | |
34 | TTree * te = (TTree*)parfile->Get("TE"); | |
35 | Int_t nev = (Int_t)te->GetEntries(); | |
36 | ||
37 | for(Int_t iev=0;iev<nev;iev++) { | |
38 | ||
39 | // Open the AliRoot file | |
40 | clusterizer->Open(infile,iev); | |
41 | ||
42 | // Load the digits | |
43 | clusterizer->ReadDigits(); | |
44 | clusterizer->Dump(); | |
45 | ||
46 | // Find the cluster | |
47 | clusterizer->MakeClusters(); | |
48 | ||
49 | // Write the cluster tree into file AliTRDclusters.root | |
50 | clusterizer->WriteClusters(-1); | |
51 | ||
52 | } | |
53 | ||
54 | } |