]>
Commit | Line | Data |
---|---|---|
48b962f0 | 1 | |
2 | #include "AliHLTPHOSDigitContainerStruct.h" | |
3 | #include "AliHLTPHOSRecPointContainerStruct.h" | |
4 | #include "AliHLTPHOSClusterizer.h" | |
5 | #include "AliPHOSGetter.h" | |
6 | ||
7 | #define NLOOPS 10 | |
8 | ||
9 | Int_t clusterTest(); | |
10 | ||
11 | int main() | |
12 | { | |
13 | clusterTest(); | |
14 | return 0; | |
15 | } | |
16 | ||
17 | Int_t clusterTest() | |
18 | { | |
19 | ||
20 | AliHLTPHOSDigitContainerStruct *digCon = new AliHLTPHOSDigitContainerStruct(); | |
21 | AliHLTPHOSRecPointContainerStruct *recCon = new AliHLTPHOSRecPointContainerStruct(); | |
22 | AliHLTPHOSClusterizer *clusterizer = new AliHLTPHOSClusterizer(); | |
23 | AliPHOSGetter *getter = AliPHOSGetter::Instance("/home/odjuvsla/Workspace/Simulations/test3/galice.root"); | |
24 | int nClusters = 0; | |
25 | int a = 0; | |
26 | ||
27 | clock_t start = 0; | |
28 | clock_t end = 0; | |
29 | clock_t total = 0; | |
30 | ||
31 | clusterizer->SetOfflineMode(getter); | |
32 | clusterizer->SetRecPointContainer(recCon); | |
33 | ||
34 | while(a < NLOOPS) | |
35 | { | |
36 | for(int k = 0; k < clusterizer->GetNEvents(); k++) | |
37 | { | |
38 | ||
39 | clusterizer->GetEvent(k); | |
40 | ||
41 | start = clock(); | |
42 | clusterizer->SetDigitContainer(digCon); | |
43 | nClusters = clusterizer->ClusterizeEvent(); | |
44 | clusterizer->CalculateCenterOfGravity(); | |
45 | end = clock(); | |
46 | ||
47 | total += end - start; | |
48 | } | |
49 | a++; | |
50 | } | |
51 | printf("Clusterizing done!\n"); | |
52 | ||
53 | printf("Time pr event (us): %f\n", (float)total/((float)clusterizer->GetNEvents()*(float)a)); | |
54 | ||
55 | return 0; | |
56 | } | |
57 | ||
58 |