Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:16:07

0001 #include "MbdCheck.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 MbdCheck::MbdCheck(const std::string &name)
0024   : SubsysReco(name)
0025 {
0026 }
0027 
0028 //____________________________________________________________________________..
0029 int MbdCheck::Init(PHCompositeNode * /*topNode*/)
0030 {
0031   return Fun4AllReturnCodes::EVENT_OK;
0032 }
0033 
0034 //____________________________________________________________________________..
0035 int MbdCheck::process_event(PHCompositeNode *topNode)
0036 {
0037   CaloPacketContainer *mbdcont = findNode::getClass<CaloPacketContainer>(topNode, "MBDPackets");
0038   if (!mbdcont)
0039   {
0040     std::cout << "could not find MbdPacket node" << std::endl;
0041   }
0042   else
0043   {
0044     for (unsigned int i = 0; i < mbdcont->get_npackets(); i++)
0045     {
0046       if (ddump_enabled())
0047       {
0048         ddumppacket(mbdcont->getPacket(i));
0049       }
0050       mbdcont->getPacket(i)->identify();
0051     }
0052   }
0053   return Fun4AllReturnCodes::EVENT_OK;
0054 }