File indexing completed on 2025-08-06 08:17:55
0001 #include "DumpInttRawHitContainer.h"
0002
0003 #include <phool/PHIODataNode.h>
0004
0005 #include <ffarawobjects/InttRawHit.h>
0006 #include <ffarawobjects/InttRawHitContainer.h>
0007
0008 #include <ostream>
0009 #include <string>
0010
0011 using MyNode_t = PHIODataNode<InttRawHitContainer>;
0012
0013 DumpInttRawHitContainer::DumpInttRawHitContainer(const std::string &NodeName)
0014 : DumpObject(NodeName)
0015 {
0016 return;
0017 }
0018
0019 int DumpInttRawHitContainer::process_Node(PHNode *myNode)
0020 {
0021 InttRawHitContainer *inttrawhitcontainer = nullptr;
0022 MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
0023 if (thisNode)
0024 {
0025 inttrawhitcontainer = thisNode->getData();
0026 }
0027 if (inttrawhitcontainer)
0028 {
0029 unsigned int nhits = inttrawhitcontainer->get_nhits();
0030 *fout << "size: " << inttrawhitcontainer->get_nhits() << std::endl;
0031 for (unsigned int ihit = 0; ihit < nhits; ihit++)
0032 {
0033 InttRawHit *rawhit = inttrawhitcontainer->get_hit(ihit);
0034 *fout << "bco: " << rawhit->get_bco() << std::endl;
0035 *fout << "packetid: " << rawhit->get_packetid() << std::endl;
0036 *fout << "word: " << rawhit->get_word() << std::endl;
0037 *fout << "fee: " << rawhit->get_fee() << std::endl;
0038 *fout << "channel_id: " << rawhit->get_channel_id() << std::endl;
0039 *fout << "chip_id: " << rawhit->get_chip_id() << std::endl;
0040 *fout << "adc: " << rawhit->get_adc() << std::endl;
0041 *fout << "FPHX_BCO: " << rawhit->get_FPHX_BCO() << std::endl;
0042 *fout << "full_FPHX: " << rawhit->get_full_FPHX() << std::endl;
0043 *fout << "full_ROC: " << rawhit->get_full_ROC() << std::endl;
0044 *fout << "amplitude: " << rawhit->get_amplitude() << std::endl;
0045 }
0046 }
0047 return 0;
0048 }