| 1 | 
mocchiut | 
1.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 | 
mocchiut | 
1.2 | 
 | 
| 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 | 
pam-fi | 
1.3 | 
 | 
| 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 | 
  | 
  | 
} |