--- DarthVader/AnticounterLevel2/src/AcLevel2.cpp 2006/05/19 13:16:00 1.1.1.1 +++ DarthVader/AnticounterLevel2/src/AcLevel2.cpp 2006/11/09 17:05:43 1.5 @@ -3,15 +3,38 @@ ClassImp(AcLevel2); AcLevel2::AcLevel2() { + this->Clear(); +} + +void AcLevel2::Clear(){ status[0]=0; hitmap[0]=0; hitstatus[0]=0; trigger[0]=0; - //OBT=0ULL; - //pro_num=0; - //pkt_num=0ULL; status[1]=0; hitmap[1]=0; hitstatus[1]=0; trigger[1]=0; -} + unpackError=0; +} + +/** + * Fills a struct cAcLevel2 with values from a AcLevel2 object (to put data into a F77 common). + */ +void AcLevel2::GetLevel2Struct(cAcLevel2 *l2) const{ + for(int i=0;i<2;i++){ + l2->status[i] = status[i]; + l2->hitmap[i] = hitmap[i]; + l2->hitstatus[i] = hitstatus[i]; + l2->trigger[i] = trigger[i]; + } +} + +void AcLevel2::SetFromLevel2Struct(cAcLevel2 *l2){ + for(int i=0;i<2;i++){ + status[i] = l2->status[i]; + hitmap[i] = l2->hitmap[i]; + hitstatus[i] = l2->hitstatus[i]; + trigger[i] = l2->trigger[i]; + } +}