File indexing completed on 2025-08-05 08:16:06
0001 #include "CemcCheck.h"
0002
0003 #include <fun4all/Fun4AllInputManager.h>
0004 #include <fun4all/Fun4AllReturnCodes.h>
0005 #include <fun4all/SubsysReco.h> // for SubsysReco
0006
0007 #include <ffarawobjects/CaloPacket.h>
0008 #include <ffarawobjects/CaloPacketContainer.h>
0009
0010 #include <phool/PHCompositeNode.h>
0011 #include <phool/PHDataNode.h>
0012 #include <phool/PHNode.h> // for PHNode
0013 #include <phool/PHNodeIterator.h> // for PHNodeIterator
0014 #include <phool/getClass.h>
0015
0016 #include <TSystem.h>
0017
0018 #include <iostream> // for operator<<, endl, basic_ost...
0019 #include <utility> // for pair
0020 #include <vector> // for vector
0021
0022
0023 CemcCheck::CemcCheck(const std::string &name)
0024 : SubsysReco(name)
0025 {
0026 }
0027
0028
0029 int CemcCheck::Init(PHCompositeNode * )
0030 {
0031 return Fun4AllReturnCodes::EVENT_OK;
0032 }
0033
0034
0035 int CemcCheck::process_event(PHCompositeNode *topNode)
0036 {
0037 CaloPacketContainer *cemccont = findNode::getClass<CaloPacketContainer>(topNode, "CEMCPackets");
0038 if (!cemccont)
0039 {
0040 std::cout << "could not find CemcPacket node" << std::endl;
0041 }
0042 else
0043 {
0044 for (unsigned int i = 0; i < cemccont->get_npackets(); i++)
0045 {
0046 if (ddump_enabled())
0047 {
0048 ddumppacket(cemccont->getPacket(i));
0049 }
0050 }
0051 }
0052 return Fun4AllReturnCodes::EVENT_OK;
0053 }