/[PAMELA software]/DarthVader/TriggerLevel2/src/TrigLevel2.cpp
ViewVC logotype

Contents of /DarthVader/TriggerLevel2/src/TrigLevel2.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Thu Nov 9 17:05:50 2006 UTC (18 years, 1 month ago) by mocchiut
Branch: MAIN
CVS Tags: v4r00, v2r01, v3r04, v3r05, v3r06, v3r00, v3r03
Changes since 1.4: +2 -10 lines
Added unpackError in all classes, ToF .rz bug fixed, install_GL_PARAM time screw bug fixed

1 #include <TObject.h>
2 #include <TrigLevel2.h>
3 ClassImp(TrigLevel2);
4
5 TrigLevel2::TrigLevel2() {
6 this->Clear();
7 }
8
9 void TrigLevel2::Clear(){
10 evcount = 0;
11 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 trigconf = 0;
20 unpackError = 0;
21 }
22
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 }

  ViewVC Help
Powered by ViewVC 1.1.23