1 |
mocchiut |
1.1 |
#include <TObject.h> |
2 |
|
|
#include <TrigLevel2.h> |
3 |
|
|
ClassImp(TrigLevel2); |
4 |
|
|
|
5 |
|
|
TrigLevel2::TrigLevel2() { |
6 |
mocchiut |
1.5 |
this->Clear(); |
7 |
mocchiut |
1.1 |
} |
8 |
mocchiut |
1.2 |
|
9 |
|
|
void TrigLevel2::Clear(){ |
10 |
|
|
evcount = 0; |
11 |
mocchiut |
1.4 |
memset(pmtpl, 0, 3*sizeof(Int_t)); |
12 |
|
|
memset(patternbusy, 0, 3*sizeof(Int_t)); |
13 |
|
|
memset(trigrate, 0, 6*sizeof(Int_t)); |
14 |
|
|
memset(patterntrig, 0, 6*sizeof(Int_t)); |
15 |
|
|
memset(dltime, 0, 2*sizeof(Int_t)); |
16 |
|
|
memset(s4calcount, 0, 2*sizeof(Int_t)); |
17 |
|
|
memset(pmtcount1, 0, 24*sizeof(Int_t)); |
18 |
|
|
memset(pmtcount2, 0, 24*sizeof(Int_t)); |
19 |
mocchiut |
1.2 |
trigconf = 0; |
20 |
mocchiut |
1.5 |
unpackError = 0; |
21 |
mocchiut |
1.2 |
} |
22 |
pam-fi |
1.3 |
|
23 |
|
|
/** |
24 |
|
|
* Fills a struct cTrigLevel2 with values from a TrigLevel2 object (to put data into a F77 common). |
25 |
|
|
*/ |
26 |
|
|
void TrigLevel2::GetLevel2Struct(cTrigLevel2 *l2) const{ |
27 |
|
|
|
28 |
|
|
l2->evcount = evcount; |
29 |
|
|
l2->trigconf = trigconf; |
30 |
|
|
|
31 |
|
|
for(int i=0;i<2;i++){ |
32 |
|
|
l2->s4calcount[i] = s4calcount[i]; |
33 |
|
|
l2->dltime[i] = dltime[i]; |
34 |
|
|
} |
35 |
|
|
|
36 |
|
|
for(int i=0;i<3;i++){ |
37 |
|
|
l2->pmtpl[i] = pmtpl[i]; |
38 |
|
|
l2->patternbusy[i] = patternbusy[i]; |
39 |
|
|
} |
40 |
|
|
|
41 |
|
|
for(int i=0;i<6;i++){ |
42 |
|
|
l2->trigrate[i] = trigrate[i]; |
43 |
|
|
l2->patterntrig[i] = patterntrig[i]; |
44 |
|
|
} |
45 |
|
|
|
46 |
|
|
for(int i=0;i<24;i++){ |
47 |
|
|
l2->pmtcount1[i] = pmtcount1[i]; |
48 |
|
|
l2->pmtcount2[i] = pmtcount2[i]; |
49 |
|
|
} |
50 |
|
|
} |
51 |
|
|
|
52 |
|
|
void TrigLevel2::SetFromLevel2Struct(cTrigLevel2 *l2){ |
53 |
|
|
|
54 |
|
|
evcount = l2->evcount; |
55 |
|
|
trigconf = l2->trigconf; |
56 |
|
|
|
57 |
|
|
for(int i=0;i<2;i++){ |
58 |
|
|
s4calcount[i] = l2->s4calcount[i]; |
59 |
|
|
dltime[i] = l2->dltime[i]; |
60 |
|
|
} |
61 |
|
|
|
62 |
|
|
for(int i=0;i<3;i++){ |
63 |
|
|
pmtpl[i] = l2->pmtpl[i]; |
64 |
|
|
patternbusy[i] = l2->patternbusy[i]; |
65 |
|
|
} |
66 |
|
|
|
67 |
|
|
for(int i=0;i<6;i++){ |
68 |
|
|
trigrate[i] = l2->trigrate[i]; |
69 |
|
|
patterntrig[i] = l2->patterntrig[i]; |
70 |
|
|
} |
71 |
|
|
|
72 |
|
|
for(int i=0;i<24;i++){ |
73 |
|
|
pmtcount1[i] = l2->pmtcount1[i]; |
74 |
|
|
pmtcount2[i] = l2->pmtcount2[i]; |
75 |
|
|
} |
76 |
|
|
} |