11 #include <sys/types.h>
19 ,
const int subeventid
21 ,
const int delete_flag
22 ,
const int maxlength)
26 m_eventType = eventtype;
27 m_subeventid = subeventid;
29 _maxlength = maxlength;
31 if ( delete_flag) _delete_flag = 1;
47 if (etype != m_eventType )
54 if ( !sarg.is_open())
return 0;
66 sevt->
sub_id = m_subeventid;
70 int *d = (
int *) &sevt->
data;
76 getline ( sarg, line);
78 istringstream is ( line);
82 if ( i + 6 + 1 >= length)
84 cout << __FILE__ <<
" " << __LINE__
85 <<
" too large payload in Packet " << m_subeventid
86 <<
" current size " << i + 6 +1
87 <<
" max is " << length << endl;
94 if ( _delete_flag) unlink (
filename.c_str());
109 sevt->sub_id = m_subeventid;
111 sevt->sub_decoding =
ID4EVT;
112 sevt->reserved[0] = 0;
113 sevt->reserved[1] = 0;
116 int *d = (
int *) &sevt->data;
122 getline ( sarg, line);
124 istringstream is ( line);
130 cout << __FILE__ <<
" " << __LINE__
131 <<
" too large payload in Packet " << m_subeventid
133 <<
" max is " << length << endl;
140 if ( _delete_flag) unlink (
filename.c_str());
142 sevt->sub_padding =
i%2;
143 sevt->sub_length += (
i + sevt->sub_padding);
144 return sevt->sub_length;
153 os <<
"File Number Reader Event Type: " << m_eventType
154 <<
" Subevent id: " << m_subeventid;
155 if ( _delete_flag ) os <<
" reading from and deleting ";
156 else os <<
" reading from ";
163 if (etype != m_eventType)
return 0;