17 ,
const int subeventid
19 ,
const int delete_flag
20 ,
const int maxlength)
23 m_eventType = eventtype;
24 m_subeventid = subeventid;
26 _maxlength = maxlength;
28 if ( delete_flag) _delete_flag = 1;
48 if (etype != m_eventType )
76 if ( (nbytes+3)/4 + 6 + 1 >=
length)
78 cout << __FILE__ <<
" " << __LINE__
79 <<
" too large payload in Packet " << m_subeventid
80 <<
" size " << (nbytes+3)/4 + 6 +1
81 <<
" max is " << length <<
" -- truncated" << endl;
82 nbytes = 4*(length - 6 -2);
91 sevt->
sub_id = m_subeventid;
95 char *d = (
char *) &sevt->
data;
97 int c =
read( my_fd, d, nbytes);
101 if ( _delete_flag) unlink (
filename.c_str());
104 if ( padding) padding = 8-padding;
119 cout << __FILE__ <<
" " << __LINE__
120 <<
" too large payload in Packet " << m_subeventid
122 <<
" max is " << length <<
" -- truncated" << endl;
131 sevt->
sub_id = m_subeventid;
137 char *d = (
char *) &sevt->
data;
139 int c =
read( my_fd, d, nbytes);
143 if ( _delete_flag) unlink (
filename.c_str());
158 os <<
"File Device Event Type: " << m_eventType
159 <<
" Subevent id: " << m_subeventid;
160 if ( _delete_flag ) os <<
" reading from and deleting ";
161 else os <<
" reading from ";
168 if (etype != m_eventType)
return 0;