]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDcreateCluster.C
added tcsh UI
[u/mrichter/AliRoot.git] / TRD / AliTRDcreateCluster.C
1 Int_t AliTRDcreateCluster()
2 {
3   //
4   // Creates the cluster from the digits
5   //
6
7   Int_t rc = 0;
8
9   // Create the clusterizer
10   AliTRDclusterizerV1 *Clusterizer =
11     new AliTRDclusterizerV1("clusterizer","Clusterizer class");
12
13   // Set the parameter
14   Clusterizer->SetClusMaxThresh(0);
15   Clusterizer->SetClusSigThresh(0);
16   Clusterizer->Dump();
17  
18   // Open the file
19   if (!(Clusterizer->Open("TRD_test.root",0))) {
20     rc = 1;
21     return rc;
22   }    
23
24   // Load the digits
25   if (!(Clusterizer->ReadDigits())) {
26     rc = 2;
27     return rc;
28   }    
29
30   // Find the cluster
31   if (!(Clusterizer->MakeClusters())) {
32     rc = 3;
33     return rc;
34   }
35
36   // Write the cluster tree into the file 
37   if (!(Clusterizer->WriteClusters(-1))) {
38     rc = 4;
39     return rc;
40   }
41
42   // Save the clusterizer class in the file
43   if (!(Clusterizer->Write())) {
44     rc = 5;
45     return rc;
46   }
47
48   return rc;
49
50 }