| 1 |
#include <TObject.h> |
| 2 |
#include <TrigLevel2.h> |
| 3 |
ClassImp(TrigLevel2); |
| 4 |
|
| 5 |
TrigLevel2::TrigLevel2() { |
| 6 |
|
| 7 |
evcount = 0; |
| 8 |
for (Int_t kk=0; kk<3;kk++){ |
| 9 |
pmtpl[kk] = 0; |
| 10 |
patternbusy[kk] = 0; |
| 11 |
} |
| 12 |
|
| 13 |
for (Int_t kk=0; kk<6;kk++){ |
| 14 |
trigrate[kk] = 0; |
| 15 |
patterntrig[kk] = 0; |
| 16 |
} |
| 17 |
|
| 18 |
for (Int_t kk=0; kk<2;kk++){ |
| 19 |
dltime[kk] = 0; |
| 20 |
s4calcount[kk] = 0; |
| 21 |
} |
| 22 |
|
| 23 |
for (Int_t kk=0; kk<24;kk++){ |
| 24 |
pmtcount1[kk] = 0; |
| 25 |
pmtcount2[kk] = 0; |
| 26 |
} |
| 27 |
|
| 28 |
trigconf = 0; |
| 29 |
} |
| 30 |
|
| 31 |
void TrigLevel2::Clear(){ |
| 32 |
|
| 33 |
evcount = 0; |
| 34 |
for (Int_t kk=0; kk<3;kk++){ |
| 35 |
pmtpl[kk] = 0; |
| 36 |
patternbusy[kk] = 0; |
| 37 |
} |
| 38 |
|
| 39 |
for (Int_t kk=0; kk<6;kk++){ |
| 40 |
trigrate[kk] = 0; |
| 41 |
patterntrig[kk] = 0; |
| 42 |
} |
| 43 |
|
| 44 |
for (Int_t kk=0; kk<2;kk++){ |
| 45 |
dltime[kk] = 0; |
| 46 |
s4calcount[kk] = 0; |
| 47 |
} |
| 48 |
|
| 49 |
for (Int_t kk=0; kk<24;kk++){ |
| 50 |
pmtcount1[kk] = 0; |
| 51 |
pmtcount2[kk] = 0; |
| 52 |
} |
| 53 |
|
| 54 |
trigconf = 0; |
| 55 |
} |
| 56 |
|
| 57 |
/** |
| 58 |
* Fills a struct cTrigLevel2 with values from a TrigLevel2 object (to put data into a F77 common). |
| 59 |
*/ |
| 60 |
void TrigLevel2::GetLevel2Struct(cTrigLevel2 *l2) const{ |
| 61 |
|
| 62 |
l2->evcount = evcount; |
| 63 |
l2->trigconf = trigconf; |
| 64 |
|
| 65 |
for(int i=0;i<2;i++){ |
| 66 |
l2->s4calcount[i] = s4calcount[i]; |
| 67 |
l2->dltime[i] = dltime[i]; |
| 68 |
} |
| 69 |
|
| 70 |
for(int i=0;i<3;i++){ |
| 71 |
l2->pmtpl[i] = pmtpl[i]; |
| 72 |
l2->patternbusy[i] = patternbusy[i]; |
| 73 |
} |
| 74 |
|
| 75 |
for(int i=0;i<6;i++){ |
| 76 |
l2->trigrate[i] = trigrate[i]; |
| 77 |
l2->patterntrig[i] = patterntrig[i]; |
| 78 |
} |
| 79 |
|
| 80 |
for(int i=0;i<24;i++){ |
| 81 |
l2->pmtcount1[i] = pmtcount1[i]; |
| 82 |
l2->pmtcount2[i] = pmtcount2[i]; |
| 83 |
} |
| 84 |
} |
| 85 |
|
| 86 |
void TrigLevel2::SetFromLevel2Struct(cTrigLevel2 *l2){ |
| 87 |
|
| 88 |
evcount = l2->evcount; |
| 89 |
trigconf = l2->trigconf; |
| 90 |
|
| 91 |
for(int i=0;i<2;i++){ |
| 92 |
s4calcount[i] = l2->s4calcount[i]; |
| 93 |
dltime[i] = l2->dltime[i]; |
| 94 |
} |
| 95 |
|
| 96 |
for(int i=0;i<3;i++){ |
| 97 |
pmtpl[i] = l2->pmtpl[i]; |
| 98 |
patternbusy[i] = l2->patternbusy[i]; |
| 99 |
} |
| 100 |
|
| 101 |
for(int i=0;i<6;i++){ |
| 102 |
trigrate[i] = l2->trigrate[i]; |
| 103 |
patterntrig[i] = l2->patterntrig[i]; |
| 104 |
} |
| 105 |
|
| 106 |
for(int i=0;i<24;i++){ |
| 107 |
pmtcount1[i] = l2->pmtcount1[i]; |
| 108 |
pmtcount2[i] = l2->pmtcount2[i]; |
| 109 |
} |
| 110 |
} |