/[PAMELA software]/DarthVader/AnticounterLevel2/src/AcLevel2.cpp
ViewVC logotype

Contents of /DarthVader/AnticounterLevel2/src/AcLevel2.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri Aug 4 10:31:24 2006 UTC (18 years, 4 months ago) by mocchiut
Branch: MAIN
CVS Tags: v2r00BETA
Changes since 1.3: +0 -3 lines
Small memory leaks fixed

1 #include <TObject.h>
2 #include <AcLevel2.h>
3 ClassImp(AcLevel2);
4
5 AcLevel2::AcLevel2() {
6 status[0]=0;
7 hitmap[0]=0;
8 hitstatus[0]=0;
9 trigger[0]=0;
10 status[1]=0;
11 hitmap[1]=0;
12 hitstatus[1]=0;
13 trigger[1]=0;
14 }
15
16 void AcLevel2::Clear(){
17 status[0]=0;
18 hitmap[0]=0;
19 hitstatus[0]=0;
20 trigger[0]=0;
21 status[1]=0;
22 hitmap[1]=0;
23 hitstatus[1]=0;
24 trigger[1]=0;
25 }
26
27 /**
28 * Fills a struct cAcLevel2 with values from a AcLevel2 object (to put data into a F77 common).
29 */
30 void AcLevel2::GetLevel2Struct(cAcLevel2 *l2) const{
31 for(int i=0;i<2;i++){
32 l2->status[i] = status[i];
33 l2->hitmap[i] = hitmap[i];
34 l2->hitstatus[i] = hitstatus[i];
35 l2->trigger[i] = trigger[i];
36 }
37 }
38
39 void AcLevel2::SetFromLevel2Struct(cAcLevel2 *l2){
40 for(int i=0;i<2;i++){
41 status[i] = l2->status[i];
42 hitmap[i] = l2->hitmap[i];
43 hitstatus[i] = l2->hitstatus[i];
44 trigger[i] = l2->trigger[i];
45 }
46 }

  ViewVC Help
Powered by ViewVC 1.1.23