1 #include "EEstarTrig.h"
18 EEstarTrig :: ~EEstarTrig() { }
25 void EEstarTrig :: clear() {
26 #define clearVec(x) memset( x, 0, sizeof(x))
28 bX48hi=bX48lo=bX7bit=0;
30 clearVec( offline_id );
48 int EEstarTrig :: get48bXing()
const{
50 unsigned long long int hi=bX48hi;
51 unsigned long long int lo=bX48lo;
52 unsigned long long int bx48=hi<<32;
60 void EEstarTrig :: print(
int k, FILE *fd)
const{
65 fprintf(fd,
"EEstarTrig:: print() bX=%d bX7=%d off=%d\n",bx,bX7bit,off);
69 fprintf(fd,
" daqBits=0x%x npre=%d npost=%d\n",daqbits,npre,npost);
71 fprintf(fd,
" trigID[] --> ");
72 for(ii=0;ii<32;ii++) {
73 if(offline_id[ii]==0)
break;
74 fprintf(fd,
"[%2d]=0x%02X [%u dec], ",ii,offline_id[ii],offline_id[ii]);
75 if(ii%4==3) printf(
"\n ");
79 fprintf(fd,
" bbcTimeDiff=%d spinBits=x%2.2x lastDSM[7]=x%4.4x\n",bbcTimeDiff(), spinBits(),lastDSM[7]);
85 for(ii=0;ii<144;ii++) {
86 if(ii%16==8) printf(
" , ");
87 if(ii%16==0) printf(
"\n EEMC board-%d= ",ii/16+1);
88 fprintf(fd,
"x%2.2x ", EEMC[ii]);
94 fprintf(fd,
" DSM VTX[j] = ");
95 for (j=0; j<8; j++) printf(
"[%d]=x%4.4x ",j, VTX[j]);
97 fprintf(fd,
" emcDSM[j]= ");
98 for (j=0; j<8; j++) printf(
"[%d]=x%4.4x ",j, EMC[j]);
100 fprintf(fd,
" lastDSM[j]= ");
101 for (j=0; j<8; j++) printf(
"[%d]=x%4.4x ",j, lastDSM[j]);
109 int EEstarTrig ::isTrigID(
int trigId) {
112 if(trigId==offline_id[i])
return 1;
113 if(offline_id[i]<=0)
break;