3 #include <Event/Event.h>
4 #include <Event/EventTypes.h>
5 #include <Event/packetConstants.h>
6 #include <Event/packet.h>
7 #include <Event/packet_hbd_fpgashort.h>
12 #include <pdbcalbase/PdbParameterMap.h>
13 #include <phparameter/PHParameters.h>
19 #include <mvtx/MvtxDefs.h>
20 #include <mvtx/MvtxHit.h>
93 for (
int istave=0; istave<
NLAYER; istave++){
94 for (
int ichip=0; ichip<
NCHIP; ichip++){
106 cout <<
"-----MvtxPrototype2UnpackPRDF::Init-----" << endl;
117 cout <<
"-----MvtxPrototype2UnpackPRDF::Init-----" << endl;
125 _event = findNode::getClass<Event>(topNode,
"PRDF");
128 cout <<
"MvtxPrototype2UnpackPRDF::Process_Event - Event not found" << endl;
134 cout << __FILE__ <<
" - run event header found. Aborting "<< endl;
141 cout <<
"MvtxPrototype2UnpackPRDF::Process_Event - non-data event type " \
148 _hitsetcon = findNode::getClass<TrkrHitSetContainer>(topNode,
"TRKR_HITSET");
151 cout <<
"MvtxPrototype2UnpackPRDF::Process_Event - TRKR_HITSET not found" << endl;
181 cout <<
"EVENT: " <<
_nevents << endl;
188 cout <<
"-----MvtxPrototype2UnpackPRDF::process_event Check HitSetCon" << endl;
190 for (
int istave=0; istave<
NLAYER; istave++)
192 for (
int ichip=0; ichip<
NCHIP; ichip++)
201 int nhits = hitset->
size();
202 cout <<
"Stave: " << istave
203 <<
" Chip: " << ichip <<
" Nhits: " << nhits << endl;
224 cout <<
"PHComposite node created: DST" << endl;
241 trkrNode->
addNode(hitsetconNode);
267 bool event_err =
false;
271 for (
int iru=0; iru<
NMAXRU+1; iru++)
285 if ( p->
iValue(iru) != -1 )
287 for (
int ich = 0; ich <
NMAXRUCHN+1; ich++)
289 if ( p->
iValue(iru, ich) > 0 )
301 cout <<
PHWHERE <<
"invalid: (iru " << iru <<
", ich " \
302 << ich <<
") " << endl;
306 std::pair<int,int> chip_pos =
s_map_chips[{iru, ich}];
307 int stave_id_from_map = chip_pos.first;
308 int chip_id_from_map = chip_pos.second;
311 if ( stave_id_from_map==-1 || chip_id_from_map==-1 )
358 int nhits_per_ch = p->
iValue(iru, ich);
365 if ( row_hit>=
NROW || col_hit>=
NCOL )
368 <<
" Hit out of window"
371 <<
" ROW: " << row_hit
372 <<
" COL: " << col_hit
383 _hitsetcon->findOrAddHitSet(hitsetkey);
389 TrkrHit *hit = hitsetit->second->getHit(hitkey);
393 hitsetit->second->addHitSpecificKey(hitkey, hit);
398 <<
" duplicated Hit "
399 <<
" STAVE: " << stave_id_from_map
400 <<
" CHIP: " << chip_id_from_map
401 <<
" ROW: " << row_hit
402 <<
" COL: " << col_hit
432 return (val & 0xffff);
442 cout <<
"-----MvtxPrototype2UnpackPRDF::End::PrintSummary-----" << endl;
443 for (
int istave=0; istave<
NLAYER; istave++){
444 for (
int ichip=0; ichip<
NCHIP; ichip++){
446 cout <<
"LAYER: " << istave <<
", CHIP: " << ichip <<
", "