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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by mocchiut, Sat Jun 17 12:14:34 2006 UTC revision 1.6 by mocchiut, Mon Nov 26 08:01:18 2007 UTC
# Line 3  Line 3 
3  ClassImp(TrigLevel2);  ClassImp(TrigLevel2);
4    
5  TrigLevel2::TrigLevel2() {      TrigLevel2::TrigLevel2() {    
6      this->Clear();
7    }
8    
9    void TrigLevel2::Clear(Option_t *t){
10    evcount = 0;    evcount = 0;
11    for (Int_t kk=0; kk<3;kk++){    memset(pmtpl, 0, 3*sizeof(Int_t));
12      pmtpl[kk] = 0;    memset(patternbusy, 0, 3*sizeof(Int_t));
13      patternbusy[kk] = 0;    memset(trigrate, 0, 6*sizeof(Int_t));
14    }    memset(patterntrig, 0, 6*sizeof(Int_t));
15        memset(dltime, 0, 2*sizeof(Int_t));
16    for (Int_t kk=0; kk<6;kk++){    memset(s4calcount, 0, 2*sizeof(Int_t));
17      trigrate[kk] = 0;    memset(pmtcount1, 0, 24*sizeof(Int_t));
18      patterntrig[kk] = 0;    memset(pmtcount2, 0, 24*sizeof(Int_t));
19    }    trigconf = 0;
20        unpackError = 0;
21    for (Int_t kk=0; kk<2;kk++){  }
22      dltime[kk] = 0;  
23      s4calcount[kk] = 0;  /**
24    }   * Fills a struct cTrigLevel2 with values from a TrigLevel2 object (to put data into a F77 common).
25     */
26    for (Int_t kk=0; kk<24;kk++){  void TrigLevel2::GetLevel2Struct(cTrigLevel2 *l2) const{
27      pmtcount1[kk] = 0;  
28      pmtcount2[kk] = 0;    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    trigconf = 0;    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  }  }

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.23