From 3c536cbfc3a61b15200ff84c5ded4649efb75606 Mon Sep 17 00:00:00 2001 From: Chris Pinkenburg Date: Tue, 27 Oct 2026 19:17:54 -0400 Subject: [PATCH 1/2] remove CaloPacketContainer from ClockDiffCheck --- .../framework/ffarawmodules/ClockDiffCheck.cc | 125 ------------------ .../framework/ffarawmodules/ClockDiffCheck.h | 2 - 2 files changed, 127 deletions(-) diff --git a/offline/framework/ffarawmodules/ClockDiffCheck.cc b/offline/framework/ffarawmodules/ClockDiffCheck.cc index c076c0d0c9..48f69144f3 100644 --- a/offline/framework/ffarawmodules/ClockDiffCheck.cc +++ b/offline/framework/ffarawmodules/ClockDiffCheck.cc @@ -5,7 +5,6 @@ #include // for SubsysReco #include -#include #include #include @@ -98,20 +97,6 @@ int ClockDiffCheck::process_event(PHCompositeNode *topNode) FillPacketDiff(pkt); } - std::vector nodenames{"CEMCPackets", "HCALPackets", "MBDPackets", "SEPDPackets", "ZDCPackets"}; - for (const auto &iter : nodenames) - { - CaloPacketContainer *cemccont = findNode::getClass(topNode, iter); - if (!cemccont) - { - // std::cout << "ClockDiffCheck: " << "could not find " << iter << " node" << std::endl; - } - else - { - FillCaloClockDiff(cemccont); - } - } - for (const auto &iter : m_PacketNodeNames) { if (iter == "14001") @@ -195,107 +180,6 @@ int ClockDiffCheck::process_event(PHCompositeNode *topNode) } } - for (const auto &nodeiter : nodenames) - { - CaloPacketContainer *container = findNode::getClass(topNode, nodeiter); - if (!container) - { - continue; - } - if (delBadPkts) - { - for (unsigned int i = 0; i < container->get_npackets(); i++) - { - unsigned int packetID = container->getPacket(i)->getIdentifier(); - for (unsigned int badPacket : badPackets) - { - if (badPacket == packetID) - { - if (Verbosity() > 1) - { - std::cout << "ClockDiffCheck: " << "Dropping packet " << container->getPacket(i)->getIdentifier() << " for XMIT clock mismatch" << std::endl; - } - container->deletePacket(container->getPacket(i)); - break; - } - } - } - } - - std::vector> EvtCounts; - std::vector NrAndCount(2); - NrAndCount[1] = 1; - int counter = 0; - int bestEvt = -1; - int bestEvtCnt = 0; - unsigned int npacket = container->get_npackets(); - for (unsigned int i = 0; i < npacket; i++) - { - CaloPacket *packet = container->getPacket(i); - if (packet) - { - int nrModules = packet->iValue(0, "NRMODULES"); - for (int j = 0; j < nrModules; j++) - { - int k; - for (k = 0; k < counter; k++) - { - if (EvtCounts[k][0] == packet->iValue(j, "FEMEVTNR")) - { - EvtCounts[k][1]++; - break; - } - } - if (k >= counter) - { - NrAndCount[0] = packet->iValue(j, "FEMEVTNR"); - EvtCounts.push_back(NrAndCount); - counter++; - } - } - } - } - if (counter > 1) - { - for (int i = 0; i < counter; i++) - { - if (bestEvtCnt < EvtCounts[i][1]) - { - bestEvtCnt = EvtCounts[i][1]; - bestEvt = EvtCounts[i][0]; - } - } - for (unsigned int i = 0; i < npacket; ++i) - { - CaloPacket *packet = container->getPacket(i); - if (packet) - { - for (int j = 0; j < packet->iValue(0, "NRMODULES"); j++) - { - if (packet->iValue(j, "FEMEVTNR") != bestEvt && bestEvt != -1) - { - static int icnt = 0; - if (icnt < 1000) - { - std::cout << "ClockDiffCheck: " << "found different FEM clock for packet " << packet->getIdentifier() << std::endl; - icnt++; - } - if (delBadPkts) - { - if (Verbosity() > 1) - { - std::cout << "ClockDiffCheck: " << "deleting packet " << packet->getIdentifier() - << " with fem clock mismatch" << std::endl; - } - container->deletePacket(packet); - } - break; - } - } - } - } - } - } for (const auto &iter : m_PacketNodeNames) { CaloPacket *calopacket = findNode::getClass(topNode, iter); @@ -338,15 +222,6 @@ int ClockDiffCheck::process_event(PHCompositeNode *topNode) return Fun4AllReturnCodes::EVENT_OK; } -void ClockDiffCheck::FillCaloClockDiff(CaloPacketContainer *pktcont) -{ - for (unsigned int i = 0; i < pktcont->get_npackets(); i++) - { - FillCaloClockDiffSngl(pktcont->getPacket(i)); - } - return; -} - void ClockDiffCheck::FillCaloClockDiffSngl(CaloPacket *calopkt) { unsigned int packetid = calopkt->getIdentifier(); diff --git a/offline/framework/ffarawmodules/ClockDiffCheck.h b/offline/framework/ffarawmodules/ClockDiffCheck.h index c2b28d4490..c9c4567232 100644 --- a/offline/framework/ffarawmodules/ClockDiffCheck.h +++ b/offline/framework/ffarawmodules/ClockDiffCheck.h @@ -12,7 +12,6 @@ #include class CaloPacket; -class CaloPacketContainer; class Fun4AllInputManager; class PHCompositeNode; class TH1; @@ -30,7 +29,6 @@ class ClockDiffCheck : public SubsysReco, public DumpPacket int End(PHCompositeNode *topNode) override; - void FillCaloClockDiff(CaloPacketContainer *pktcont); void FillCaloClockDiffSngl(CaloPacket *calopkt); void FillPacketDiff(OfflinePacket *pkt); From 9908833ee4850920c57858c8ef42a0b0d30310c0 Mon Sep 17 00:00:00 2001 From: Chris Pinkenburg Date: Tue, 27 Oct 2026 19:22:04 -0400 Subject: [PATCH 2/2] remove obsolete CaloPacketContainer using modules --- offline/framework/ffarawmodules/CemcCheck.cc | 53 ----------------- offline/framework/ffarawmodules/CemcCheck.h | 32 ----------- offline/framework/ffarawmodules/HcalCheck.cc | 53 ----------------- offline/framework/ffarawmodules/HcalCheck.h | 32 ----------- offline/framework/ffarawmodules/Makefile.am | 14 +---- offline/framework/ffarawmodules/MbdCheck.cc | 54 ------------------ offline/framework/ffarawmodules/MbdCheck.h | 36 ------------ offline/framework/ffarawmodules/SEpdCheck.cc | 59 ------------------- offline/framework/ffarawmodules/SEpdCheck.h | 32 ----------- offline/framework/ffarawmodules/ZdcCheck.cc | 60 -------------------- offline/framework/ffarawmodules/ZdcCheck.h | 32 ----------- 11 files changed, 2 insertions(+), 455 deletions(-) delete mode 100644 offline/framework/ffarawmodules/CemcCheck.cc delete mode 100644 offline/framework/ffarawmodules/CemcCheck.h delete mode 100644 offline/framework/ffarawmodules/HcalCheck.cc delete mode 100644 offline/framework/ffarawmodules/HcalCheck.h delete mode 100644 offline/framework/ffarawmodules/MbdCheck.cc delete mode 100644 offline/framework/ffarawmodules/MbdCheck.h delete mode 100644 offline/framework/ffarawmodules/SEpdCheck.cc delete mode 100644 offline/framework/ffarawmodules/SEpdCheck.h delete mode 100644 offline/framework/ffarawmodules/ZdcCheck.cc delete mode 100644 offline/framework/ffarawmodules/ZdcCheck.h diff --git a/offline/framework/ffarawmodules/CemcCheck.cc b/offline/framework/ffarawmodules/CemcCheck.cc deleted file mode 100644 index b42cbe92ed..0000000000 --- a/offline/framework/ffarawmodules/CemcCheck.cc +++ /dev/null @@ -1,53 +0,0 @@ -#include "CemcCheck.h" - -#include -#include -#include // for SubsysReco - -#include -#include - -#include -#include -#include // for PHNode -#include // for PHNodeIterator -#include - -#include - -#include // for operator<<, endl, basic_ost... -#include // for pair -#include // for vector - -//____________________________________________________________________________.. -CemcCheck::CemcCheck(const std::string &name) - : SubsysReco(name) -{ -} - -//____________________________________________________________________________.. -int CemcCheck::Init(PHCompositeNode * /*topNode*/) -{ - return Fun4AllReturnCodes::EVENT_OK; -} - -//____________________________________________________________________________.. -int CemcCheck::process_event(PHCompositeNode *topNode) -{ - CaloPacketContainer *cemccont = findNode::getClass(topNode, "CEMCPackets"); - if (!cemccont) - { - std::cout << "could not find CemcPacket node" << std::endl; - } - else - { - for (unsigned int i = 0; i < cemccont->get_npackets(); i++) - { - if (ddump_enabled()) - { - ddumppacket(cemccont->getPacket(i)); - } - } - } - return Fun4AllReturnCodes::EVENT_OK; -} diff --git a/offline/framework/ffarawmodules/CemcCheck.h b/offline/framework/ffarawmodules/CemcCheck.h deleted file mode 100644 index 145bf32c5c..0000000000 --- a/offline/framework/ffarawmodules/CemcCheck.h +++ /dev/null @@ -1,32 +0,0 @@ -// Tell emacs that this is a C++ source -// -*- C++ -*-. -#ifndef FFARAWMODULES_CEMCCHECK_H -#define FFARAWMODULES_CEMCCHECK_H - -#include "DumpPacket.h" - -#include - -#include -#include - -class Fun4AllInputManager; -class PHCompositeNode; - -class CemcCheck : public SubsysReco, public DumpPacket -{ - public: - CemcCheck(const std::string &name = "CemcCheck"); - - ~CemcCheck() override {} - - int Init(PHCompositeNode *topNode) override; - - int process_event(PHCompositeNode *topNode) override; - - private: - /* std::string m_EvtNodeName = "CEMCRAWHIT"; */ - /* std::set bclk_seen; */ -}; - -#endif // FFARAWMODULES_CEMCCHECK_H diff --git a/offline/framework/ffarawmodules/HcalCheck.cc b/offline/framework/ffarawmodules/HcalCheck.cc deleted file mode 100644 index 99f0220610..0000000000 --- a/offline/framework/ffarawmodules/HcalCheck.cc +++ /dev/null @@ -1,53 +0,0 @@ -#include "HcalCheck.h" - -#include -#include -#include // for SubsysReco - -#include -#include - -#include -#include -#include // for PHNode -#include // for PHNodeIterator -#include - -#include - -#include // for operator<<, endl, basic_ost... -#include // for pair -#include // for vector - -//____________________________________________________________________________.. -HcalCheck::HcalCheck(const std::string &name) - : SubsysReco(name) -{ -} - -//____________________________________________________________________________.. -int HcalCheck::Init(PHCompositeNode * /*topNode*/) -{ - return Fun4AllReturnCodes::EVENT_OK; -} - -//____________________________________________________________________________.. -int HcalCheck::process_event(PHCompositeNode *topNode) -{ - CaloPacketContainer *hcalcont = findNode::getClass(topNode, "HCALPackets"); - if (!hcalcont) - { - std::cout << "could not find HcalPacket node" << std::endl; - } - else - { - for (unsigned int i = 0; i < hcalcont->get_npackets(); i++) - { - if (ddump_enabled()) - { - ddumppacket(hcalcont->getPacket(i)); - } - } - } - return Fun4AllReturnCodes::EVENT_OK; -} diff --git a/offline/framework/ffarawmodules/HcalCheck.h b/offline/framework/ffarawmodules/HcalCheck.h deleted file mode 100644 index 80279832d2..0000000000 --- a/offline/framework/ffarawmodules/HcalCheck.h +++ /dev/null @@ -1,32 +0,0 @@ -// Tell emacs that this is a C++ source -// -*- C++ -*-. -#ifndef FFARAWMODULES_HCALCHECK_H -#define FFARAWMODULES_HCALCHECK_H - -#include "DumpPacket.h" - -#include - -#include -#include - -class Fun4AllInputManager; -class PHCompositeNode; - -class HcalCheck : public SubsysReco, public DumpPacket -{ - public: - HcalCheck(const std::string &name = "HcalCheck"); - - ~HcalCheck() override {} - - int Init(PHCompositeNode *topNode) override; - - int process_event(PHCompositeNode *topNode) override; - - private: - /* std::string m_EvtNodeName = "HCALRAWHIT"; */ - /* std::set bclk_seen; */ -}; - -#endif // FFARAWMODULES_HCALCHECK_H diff --git a/offline/framework/ffarawmodules/Makefile.am b/offline/framework/ffarawmodules/Makefile.am index c05f64ab57..42e9cc204e 100644 --- a/offline/framework/ffarawmodules/Makefile.am +++ b/offline/framework/ffarawmodules/Makefile.am @@ -12,48 +12,38 @@ AM_LDFLAGS = \ pkginclude_HEADERS = \ BcoRangeCheck.h \ - CemcCheck.h \ ClockDiffCheck.h \ DumpPacket.h \ EventCombiner.h \ EventNumberCheck.h \ Gl1BcoDump.h \ Gl1Check.h \ - HcalCheck.h \ InttCheck.h \ InttBcoDump.h \ InttGl1Check.h \ LL1Check.h \ - MbdCheck.h \ StreamingCheck.h \ - SEpdCheck.h \ TpcBcoDump.h \ - TpcCheck.h \ - ZdcCheck.h + TpcCheck.h lib_LTLIBRARIES = \ libffarawmodules.la libffarawmodules_la_SOURCES = \ BcoRangeCheck.cc \ - CemcCheck.cc \ ClockDiffCheck.cc \ DumpPacket.cc \ EventCombiner.cc \ EventNumberCheck.cc \ Gl1BcoDump.cc \ Gl1Check.cc \ - HcalCheck.cc \ InttBcoDump.cc \ InttCheck.cc \ InttGl1Check.cc \ LL1Check.cc \ - MbdCheck.cc \ - SEpdCheck.cc \ StreamingCheck.cc \ TpcBcoDump.cc \ - TpcCheck.cc \ - ZdcCheck.cc + TpcCheck.cc libffarawmodules_la_LIBADD = \ -lEvent \ diff --git a/offline/framework/ffarawmodules/MbdCheck.cc b/offline/framework/ffarawmodules/MbdCheck.cc deleted file mode 100644 index e78807c033..0000000000 --- a/offline/framework/ffarawmodules/MbdCheck.cc +++ /dev/null @@ -1,54 +0,0 @@ -#include "MbdCheck.h" - -#include -#include -#include // for SubsysReco - -#include -#include - -#include -#include -#include // for PHNode -#include // for PHNodeIterator -#include - -#include - -#include // for operator<<, endl, basic_ost... -#include // for pair -#include // for vector - -//____________________________________________________________________________.. -MbdCheck::MbdCheck(const std::string &name) - : SubsysReco(name) -{ -} - -//____________________________________________________________________________.. -int MbdCheck::Init(PHCompositeNode * /*topNode*/) -{ - return Fun4AllReturnCodes::EVENT_OK; -} - -//____________________________________________________________________________.. -int MbdCheck::process_event(PHCompositeNode *topNode) -{ - CaloPacketContainer *mbdcont = findNode::getClass(topNode, "MBDPackets"); - if (!mbdcont) - { - std::cout << "could not find MbdPacket node" << std::endl; - } - else - { - for (unsigned int i = 0; i < mbdcont->get_npackets(); i++) - { - if (ddump_enabled()) - { - ddumppacket(mbdcont->getPacket(i)); - } - mbdcont->getPacket(i)->identify(); - } - } - return Fun4AllReturnCodes::EVENT_OK; -} diff --git a/offline/framework/ffarawmodules/MbdCheck.h b/offline/framework/ffarawmodules/MbdCheck.h deleted file mode 100644 index 2a14a73ae6..0000000000 --- a/offline/framework/ffarawmodules/MbdCheck.h +++ /dev/null @@ -1,36 +0,0 @@ -// Tell emacs that this is a C++ source -// -*- C++ -*-. -#ifndef FFARAWMODULES_MBDCHECK_H -#define FFARAWMODULES_MBDCHECK_H - -#include "DumpPacket.h" - -#include - -#include -#include - -class Fun4AllInputManager; -class PHCompositeNode; - -class MbdCheck : public SubsysReco, public DumpPacket -{ - public: - MbdCheck(const std::string &name = "MbdCheck"); - - ~MbdCheck() override {} - - int Init(PHCompositeNode *topNode) override; - - int process_event(PHCompositeNode *topNode) override; - - // int ResetEvent(PHCompositeNode *topNode) override; - - // void MyEvtNode(const std::string &name) {m_EvtNodeName = name;} - - private: - /* std::string m_EvtNodeName = "MBDRAWHIT"; */ - /* std::set bclk_seen; */ -}; - -#endif // FFARAWMODULES_MBDCHECK_H diff --git a/offline/framework/ffarawmodules/SEpdCheck.cc b/offline/framework/ffarawmodules/SEpdCheck.cc deleted file mode 100644 index 3b60829ae8..0000000000 --- a/offline/framework/ffarawmodules/SEpdCheck.cc +++ /dev/null @@ -1,59 +0,0 @@ -#include "SEpdCheck.h" - -#include -#include -#include // for SubsysReco - -#include -#include - -#include -#include -#include // for PHNode -#include // for PHNodeIterator -#include - -#include - -#include // for operator<<, endl, basic_ost... -#include // for pair -#include // for vector - -//____________________________________________________________________________.. -SEpdCheck::SEpdCheck(const std::string &name) - : SubsysReco(name) -{ -} - -//____________________________________________________________________________.. -int SEpdCheck::Init(PHCompositeNode * /*topNode*/) -{ - return Fun4AllReturnCodes::EVENT_OK; -} - -//____________________________________________________________________________.. -int SEpdCheck::process_event(PHCompositeNode *topNode) -{ - CaloPacketContainer *sepdcont = findNode::getClass(topNode, "SEPDPackets"); - if (!sepdcont) - { - std::cout << "could not find SEpdPacket node" << std::endl; - } - else - { - for (unsigned int i = 0; i < sepdcont->get_npackets(); i++) - { - if (ddump_enabled()) - { - ddumppacket(sepdcont->getPacket(i)); - } - } - std::cout << "SEPD Evt no: " << sepdcont->getEvtSequence() << std::endl; - for (unsigned int i = 0; i < sepdcont->get_npackets(); i++) - { - std::cout << "Packet " << sepdcont->getPacket(i)->getIdentifier() - << " Evt no: " << sepdcont->getPacket(i)->getEvtSequence() << std::endl; - } - } - return Fun4AllReturnCodes::EVENT_OK; -} diff --git a/offline/framework/ffarawmodules/SEpdCheck.h b/offline/framework/ffarawmodules/SEpdCheck.h deleted file mode 100644 index f3dffba945..0000000000 --- a/offline/framework/ffarawmodules/SEpdCheck.h +++ /dev/null @@ -1,32 +0,0 @@ -// Tell emacs that this is a C++ source -// -*- C++ -*-. -#ifndef FFARAWMODULES_SEPDCHECK_H -#define FFARAWMODULES_SEPDCHECK_H - -#include "DumpPacket.h" - -#include - -#include -#include - -class Fun4AllInputManager; -class PHCompositeNode; - -class SEpdCheck : public SubsysReco, public DumpPacket -{ - public: - SEpdCheck(const std::string &name = "SEpdCheck"); - - ~SEpdCheck() override {} - - int Init(PHCompositeNode *topNode) override; - - int process_event(PHCompositeNode *topNode) override; - - private: - /* std::string m_EvtNodeName = "SEPDRAWHIT"; */ - /* std::set bclk_seen; */ -}; - -#endif // FFARAWMODULES_SEPDCHECK_H diff --git a/offline/framework/ffarawmodules/ZdcCheck.cc b/offline/framework/ffarawmodules/ZdcCheck.cc deleted file mode 100644 index 432bc5f7da..0000000000 --- a/offline/framework/ffarawmodules/ZdcCheck.cc +++ /dev/null @@ -1,60 +0,0 @@ -#include "ZdcCheck.h" - -#include -#include -#include // for SubsysReco - -#include -#include - -#include -#include -#include // for PHNode -#include // for PHNodeIterator -#include - -#include - -#include // for operator<<, endl, basic_ost... -#include // for pair -#include // for vector - -//____________________________________________________________________________.. -ZdcCheck::ZdcCheck(const std::string &name) - : SubsysReco(name) -{ -} - -//____________________________________________________________________________.. -int ZdcCheck::Init(PHCompositeNode * /*topNode*/) -{ - return Fun4AllReturnCodes::EVENT_OK; -} - -//____________________________________________________________________________.. -int ZdcCheck::process_event(PHCompositeNode *topNode) -{ - CaloPacketContainer *zdccont = findNode::getClass(topNode, "ZDCPackets"); - if (!zdccont) - { - std::cout << "could not find ZdcPacket node" << std::endl; - } - else - { - for (unsigned int i = 0; i < zdccont->get_npackets(); i++) - { - if (ddump_enabled()) - { - ddumppacket(zdccont->getPacket(i)); - } - } - std::cout << "ZDC Evt no: " << zdccont->getEvtSequence() << std::endl; - for (unsigned int i = 0; i < zdccont->get_npackets(); i++) - { - std::cout << "Packet " << zdccont->getPacket(i)->getIdentifier() - << " Evt no: " << zdccont->getPacket(i)->getEvtSequence() << std::endl; - zdccont->identify(); - } - } - return Fun4AllReturnCodes::EVENT_OK; -} diff --git a/offline/framework/ffarawmodules/ZdcCheck.h b/offline/framework/ffarawmodules/ZdcCheck.h deleted file mode 100644 index b6457a9130..0000000000 --- a/offline/framework/ffarawmodules/ZdcCheck.h +++ /dev/null @@ -1,32 +0,0 @@ -// Tell emacs that this is a C++ source -// -*- C++ -*-. -#ifndef FFARAWMODULES_ZDCCHECK_H -#define FFARAWMODULES_ZDCCHECK_H - -#include "DumpPacket.h" - -#include - -#include -#include - -class Fun4AllInputManager; -class PHCompositeNode; - -class ZdcCheck : public SubsysReco, public DumpPacket -{ - public: - ZdcCheck(const std::string &name = "ZdcCheck"); - - ~ZdcCheck() override {} - - int Init(PHCompositeNode *topNode) override; - - int process_event(PHCompositeNode *topNode) override; - - private: - /* std::string m_EvtNodeName = "ZDCRAWHIT"; */ - /* std::set bclk_seen; */ -}; - -#endif // FFARAWMODULES_ZDCCHECK_H