File indexing completed on 2025-08-06 08:17:55
0001 #include "DumpGl1Packet.h"
0002
0003 #include <ffarawobjects/Gl1Packet.h>
0004
0005 #include <phool/PHIODataNode.h>
0006
0007 #include <ostream>
0008 #include <string>
0009
0010 using MyNode_t = PHIODataNode<Gl1Packet>;
0011
0012 DumpGl1Packet::DumpGl1Packet(const std::string &NodeName)
0013 : DumpObject(NodeName)
0014 {
0015 return;
0016 }
0017
0018 int DumpGl1Packet::process_Node(PHNode *myNode)
0019 {
0020 Gl1Packet *gl1packet = nullptr;
0021 MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
0022 if (thisNode)
0023 {
0024 gl1packet = thisNode->getData();
0025 }
0026 if (gl1packet)
0027 {
0028 *fout << "packet_nr: " << gl1packet->iValue(0) << std::endl;
0029 *fout << "BCO: 0x" << gl1packet->lValue(0, "BCO") << std::endl;
0030 *fout << "TriggerInput: " << gl1packet->lValue(0, "TriggerInput") << std::endl;
0031 *fout << "TriggerVector: " << gl1packet->lValue(0, "TriggerVector") << std::endl;
0032 *fout << "BunchNumber: " << gl1packet->lValue(0, "BunchNumber") << std::endl;
0033 for (int i = 0; i < 64; i++)
0034 {
0035 *fout << "lValue(" << i << ",0): " << gl1packet->lValue(i, 0) << std::endl;
0036 *fout << "lValue(" << i << ",1): " << gl1packet->lValue(i, 1) << std::endl;
0037 *fout << "lValue(" << i << ",2): " << gl1packet->lValue(i, 2) << std::endl;
0038 }
0039 }
0040 return 0;
0041 }