1 |
// |
2 |
// Written by Emiliano Mocchiutti |
3 |
// |
4 |
#include "ccal2struct.h" |
5 |
#define crcalol2 crcalol2_ |
6 |
extern "C" int crcalol2(); |
7 |
|
8 |
void cfillcalol2( CaLevel1 & clevel1, CaLevel2 & clevel2 ) { |
9 |
extern struct CaLevel1 clevel1_; |
10 |
extern struct CaLevel2 clevel2_; |
11 |
memcpy(&clevel1_, &clevel1, sizeof(clevel1)); |
12 |
// memcpy(&clevel2_, &clevel2, sizeof(clevel2)); |
13 |
clevel2_.OBT = clevel2.OBT; |
14 |
clevel2_.pkt_num = clevel2.pkt_num; |
15 |
clevel2_.pro_num = clevel2.pro_num; |
16 |
clevel2_.trigty = clevel2.trigty; |
17 |
clevel2_.good = clevel2.good; |
18 |
for (Int_t s = 0; s < 4; s++){ |
19 |
clevel2_.perr[s] = clevel2.perr[s]; |
20 |
clevel2_.swerr[s] = clevel2.swerr[s]; |
21 |
clevel2_.crc[s] = clevel2.crc[s]; |
22 |
} |
23 |
crcalol2(); |
24 |
memcpy(&clevel2, &clevel2_, sizeof(clevel2)); |
25 |
}; |