22 hitid = ULONG_LONG_MAX;
26 for (
int i = 0; i<2;i++)
47 std::cout<<
"New Hitv1 0x"<< hex << hitid
48 << dec <<
" on track "<<trackid<<
" EDep "<<
edep<<std::endl;
49 std::cout<<
"Location: X "<<
x[0]<<
"/"<<
x[1]<<
" Y "<<
y[0]<<
"/"<<
y[1]<<
" Z "<<
z[0]<<
"/"<<
z[1]<<std::endl;
50 std::cout<<
"Time "<<
t[0]<<
"/"<<
t[1]<<std::endl;
52 for (prop_map_t::const_iterator i = prop_map.begin(); i!= prop_map.end(); ++i)
55 pair<const string, PROPERTY_TYPE> property_info = get_property_info(prop_id);
56 cout <<
"\t" << prop_id <<
":\t" << property_info.first <<
" = \t";
57 switch(property_info.second)
60 cout << get_property_int(prop_id);
63 cout << get_property_uint(prop_id);
66 cout << get_property_float(prop_id);
69 cout <<
" unknown type ";
78 prop_map_t::const_iterator i = prop_map.find(prop_id);
79 return i!=prop_map.end();
85 if (!check_property(prop_id,type_float))
87 pair<const string,PROPERTY_TYPE> property_info =get_property_info(prop_id);
88 cout <<
PHWHERE <<
" Property " << property_info.first <<
" with id "
89 << prop_id <<
" is of type " << get_property_type(property_info.second)
90 <<
" not " << get_property_type(type_float) << endl;
93 prop_map_t::const_iterator i = prop_map.find(prop_id);
103 if (!check_property(prop_id,type_int))
105 pair<const string,PROPERTY_TYPE> property_info =get_property_info(prop_id);
106 cout <<
PHWHERE <<
" Property " << property_info.first <<
" with id "
107 << prop_id <<
" is of type " << get_property_type(property_info.second)
108 <<
" not " << get_property_type(type_int) << endl;
111 prop_map_t::const_iterator i = prop_map.find(prop_id);
121 if (!check_property(prop_id,type_uint))
123 pair<const string,PROPERTY_TYPE> property_info =get_property_info(prop_id);
124 cout <<
PHWHERE <<
" Property " << property_info.first <<
" with id "
125 << prop_id <<
" is of type " << get_property_type(property_info.second)
126 <<
" not " << get_property_type(type_uint) << endl;
129 prop_map_t::const_iterator i = prop_map.find(prop_id);
139 if (!check_property(prop_id,type_float))
141 pair<const string,PROPERTY_TYPE> property_info = get_property_info(prop_id);
142 cout <<
PHWHERE <<
" Property " << property_info.first <<
" with id "
143 << prop_id <<
" is of type " << get_property_type(property_info.second)
144 <<
" not " << get_property_type(type_float) << endl;
153 if (!check_property(prop_id,type_int))
155 pair<const string,PROPERTY_TYPE> property_info = get_property_info(prop_id);
156 cout <<
PHWHERE <<
" Property " << property_info.first <<
" with id "
157 << prop_id <<
" is of type " << get_property_type(property_info.second)
158 <<
" not " << get_property_type(type_int) << endl;
167 if (!check_property(prop_id,type_uint))
169 pair<const string,PROPERTY_TYPE> property_info = get_property_info(prop_id);
170 cout <<
PHWHERE <<
" Property " << property_info.first <<
" with id "
171 << prop_id <<
" is of type " << get_property_type(property_info.second)
172 <<
" not " << get_property_type(type_uint) << endl;
181 prop_map_t::const_iterator iter = prop_map.find(prop_id);
182 if (iter != prop_map.end())
195 return get_property_float(prop_px_0);
197 return get_property_float(prop_px_1);
199 cout <<
"Invalid index in get_px: " << i << endl;
210 return get_property_float(prop_py_0);
212 return get_property_float(prop_py_1);
214 cout <<
"Invalid index in get_py: " << i << endl;
225 return get_property_float(prop_pz_0);
227 return get_property_float(prop_pz_1);
229 cout <<
"Invalid index in get_pz: " << i << endl;
240 set_property(prop_px_0,f);
243 set_property(prop_px_1,f);
246 cout <<
"Invalid index in set_px: " << i << endl;
257 set_property(prop_py_0,f);
260 set_property(prop_py_1,f);
263 cout <<
"Invalid index in set_py: " << i << endl;
274 set_property(prop_pz_0,f);
277 set_property(prop_pz_1,f);
280 cout <<
"Invalid index in set_pz: " << i << endl;
292 return get_property_float(prop_local_x_0);
294 return get_property_float(prop_local_x_1);
296 cout <<
"Invalid index in get_local_x: " << i << endl;
307 return get_property_float(prop_local_y_0);
309 return get_property_float(prop_local_y_1);
311 cout <<
"Invalid index in get_local_y: " << i << endl;
322 return get_property_float(prop_local_z_0);
324 return get_property_float(prop_local_z_1);
326 cout <<
"Invalid index in get_local_z: " << i << endl;
337 set_property(prop_local_x_0,f);
340 set_property(prop_local_x_1,f);
343 cout <<
"Invalid index in set_local_x: " << i << endl;
354 set_property(prop_local_y_0,f);
357 set_property(prop_local_y_1,f);
360 cout <<
"Invalid index in set_local_y: " << i << endl;
371 set_property(prop_local_z_0,f);
374 set_property(prop_local_z_1,f);
377 cout <<
"Invalid index in set_local_z: " << i << endl;
385 os <<
"Class " << this->ClassName() << endl;
386 os <<
"hitid: 0x" << hex << hitid << dec << endl;
387 os <<
"x0: " << get_x(0)
388 <<
", y0: " << get_y(0)
389 <<
", z0: " << get_z(0)
390 <<
", t0: " << get_t(0) << endl;
391 os <<
"x1: " << get_x(1)
392 <<
", y1: " << get_y(1)
393 <<
", z1: " << get_z(1)
394 <<
", t1: " << get_t(1) << endl;
395 os <<
"trackid: " << trackid <<
", showerid: " << showerid
396 <<
", edep: " <<
edep << endl;
397 for (prop_map_t::const_iterator i = prop_map.begin(); i!= prop_map.end(); ++i)
400 pair<const string, PROPERTY_TYPE> property_info = get_property_info(prop_id);
401 os <<
"\t" << prop_id <<
":\t" << property_info.first <<
" = \t";
402 switch(property_info.second)
405 os << get_property_int(prop_id);
408 os << get_property_uint(prop_id);
411 os << get_property_float(prop_id);
414 os <<
" unknown type ";