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>
13 #include <pdbcalbase/PdbParameterMap.h>
14 #include <phparameter/PHParameters.h>
42 cout <<
"-----MvtxRunInfoUnpackPRDF::Init-----" << endl;
53 cout <<
"-----MvtxRunInfoUnpackPRDF::Init-----" << endl;
70 stringstream ss_packet;
72 char par_name[30], par_sval[30], par_unit[30];
75 Event *
event = findNode::getClass<Event>(topNode,
"PRDF");
79 cout <<
"RunInfoUnpackPRDF::Process_Event - Event not found" << endl;
83 EventHeaderv1 *eventheader = findNode::getClass<EventHeaderv1>(topNode,
"EventHeader");
102 cout <<
"RunInfoUnpackPRDF::process_event - with BEGRUNEVENT events ";
108 Packet *packet =
event->getPacket(910);
111 cout <<
"RunInfoUnpackPRDF::process_event - failed to locate packet 910" << endl;
114 packet->
dump(ss_packet);
116 getline(ss_packet,s_packet);
117 sscanf(s_packet.c_str(),
"%s = %i %s", par_name, &par_ival, par_unit);
120 getline(ss_packet,s_packet);
121 sscanf(s_packet.c_str(),
"%s = %s", par_name, par_sval);
125 packet =
event->getPacket(920);
128 cout <<
"RunInfoUnpackPRDF::process_event - failed to locate packet 910" << endl;
132 packet->
dump(ss_packet);
134 getline(ss_packet,s_packet);
135 sscanf(s_packet.c_str(),
"%s = %i", par_name, &par_ival);
138 getline(ss_packet,s_packet);
139 sscanf(s_packet.c_str(),
"%s = %s", par_name, par_sval);
142 getline(ss_packet,s_packet);
143 sscanf(s_packet.c_str(),
"%s = %i %s", par_name, &par_ival, par_unit);
146 while ( getline(ss_packet,s_packet) )
148 sscanf(s_packet.c_str(),
"%s = %i", par_name, &par_ival);
153 packet =
event->getPacket(930);
156 cout <<
"RunInfoUnpackPRDF::process_event - failed to locate packet 930" << endl;
160 packet->
dump(ss_packet);
162 while ( getline(ss_packet,s_packet) )
164 sscanf(s_packet.c_str(),
"%s = %i %s", par_name, &par_ival, par_unit);
192 cout <<
"PHComposite node created: RUN" << endl;
197 PdbParameterMap *nodeparams = findNode::getClass<PdbParameterMap>(run_node,
"RUN_INFO");
207 cout <<
"PHComposite node created: DST" << endl;
214 dst_node->
addNode(EventHeaderNode);
222 cout <<
"-----MvtxRunInfoUnpackPRDF::End-----" << endl;