/[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.2 by mocchiut, Fri Jun 30 09:22:06 2006 UTC revision 1.4 by mocchiut, Fri Aug 4 10:31:34 2006 UTC
# Line 3  Line 3 
3  ClassImp(TrigLevel2);  ClassImp(TrigLevel2);
4    
5  TrigLevel2::TrigLevel2() {      TrigLevel2::TrigLevel2() {    
6      evcount = 0;
7      memset(pmtpl, 0, 3*sizeof(Int_t));
8      memset(patternbusy, 0, 3*sizeof(Int_t));
9      memset(trigrate, 0, 6*sizeof(Int_t));
10      memset(patterntrig, 0, 6*sizeof(Int_t));
11      memset(dltime, 0, 2*sizeof(Int_t));
12      memset(s4calcount, 0, 2*sizeof(Int_t));
13      memset(pmtcount1, 0, 24*sizeof(Int_t));
14      memset(pmtcount2, 0, 24*sizeof(Int_t));
15      trigconf = 0;
16    }
17    
18    void TrigLevel2::Clear(){
19    evcount = 0;    evcount = 0;
20    for (Int_t kk=0; kk<3;kk++){    memset(pmtpl, 0, 3*sizeof(Int_t));
21      pmtpl[kk] = 0;    memset(patternbusy, 0, 3*sizeof(Int_t));
22      patternbusy[kk] = 0;    memset(trigrate, 0, 6*sizeof(Int_t));
23    }    memset(patterntrig, 0, 6*sizeof(Int_t));
24        memset(dltime, 0, 2*sizeof(Int_t));
25    for (Int_t kk=0; kk<6;kk++){    memset(s4calcount, 0, 2*sizeof(Int_t));
26      trigrate[kk] = 0;    memset(pmtcount1, 0, 24*sizeof(Int_t));
27      patterntrig[kk] = 0;    memset(pmtcount2, 0, 24*sizeof(Int_t));
28    }    trigconf = 0;
29      }
30    for (Int_t kk=0; kk<2;kk++){  
31      dltime[kk] = 0;  /**
32      s4calcount[kk] = 0;   * Fills a struct cTrigLevel2 with values from a TrigLevel2 object (to put data into a F77 common).
33    }   */
34    void TrigLevel2::GetLevel2Struct(cTrigLevel2 *l2) const{
35    for (Int_t kk=0; kk<24;kk++){  
36      pmtcount1[kk] = 0;    l2->evcount  = evcount;
37      pmtcount2[kk] = 0;    l2->trigconf = trigconf;
38      
39      for(int i=0;i<2;i++){
40        l2->s4calcount[i] = s4calcount[i];
41        l2->dltime[i]     = dltime[i];
42    }    }
43        
44    trigconf = 0;    for(int i=0;i<3;i++){
45        l2->pmtpl[i]       = pmtpl[i];
46        l2->patternbusy[i] = patternbusy[i];
47      }
48      
49      for(int i=0;i<6;i++){
50        l2->trigrate[i]    = trigrate[i];
51        l2->patterntrig[i] = patterntrig[i];
52      }
53      
54      for(int i=0;i<24;i++){
55        l2->pmtcount1[i] = pmtcount1[i];
56        l2->pmtcount2[i] = pmtcount2[i];
57      }
58  }  }
59    
60  void TrigLevel2::Clear(){  void TrigLevel2::SetFromLevel2Struct(cTrigLevel2 *l2){
61    
62    evcount = 0;    evcount  = l2->evcount;
63    for (Int_t kk=0; kk<3;kk++){    trigconf = l2->trigconf;
64      pmtpl[kk] = 0;    
65      patternbusy[kk] = 0;    for(int i=0;i<2;i++){
66    }      s4calcount[i] = l2->s4calcount[i];
67          dltime[i]     = l2->dltime[i];
   for (Int_t kk=0; kk<6;kk++){  
     trigrate[kk] = 0;  
     patterntrig[kk] = 0;  
   }  
     
   for (Int_t kk=0; kk<2;kk++){  
     dltime[kk] = 0;  
     s4calcount[kk] = 0;  
   }  
   
   for (Int_t kk=0; kk<24;kk++){  
     pmtcount1[kk] = 0;  
     pmtcount2[kk] = 0;  
68    }    }
69        
70    trigconf = 0;    for(int i=0;i<3;i++){
71        pmtpl[i]       = l2->pmtpl[i];
72        patternbusy[i] = l2->patternbusy[i];
73      }
74      
75      for(int i=0;i<6;i++){
76        trigrate[i]    = l2->trigrate[i];
77        patterntrig[i] = l2->patterntrig[i];
78      }
79      
80      for(int i=0;i<24;i++){
81        pmtcount1[i] = l2->pmtcount1[i];
82        pmtcount2[i] = l2->pmtcount2[i];
83      }
84  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.23