File indexing completed on 2025-08-06 08:17:55
0001 #include "DumpParticleFlowElementContainer.h"
0002
0003 #include <phool/PHIODataNode.h>
0004
0005 #include <particleflowreco/ParticleFlowElement.h>
0006 #include <particleflowreco/ParticleFlowElementContainer.h>
0007
0008 #include <map>
0009 #include <ostream>
0010 #include <string>
0011 #include <utility>
0012
0013 using MyNode_t = PHIODataNode<ParticleFlowElementContainer>;
0014
0015 DumpParticleFlowElementContainer::DumpParticleFlowElementContainer(const std::string &NodeName)
0016 : DumpObject(NodeName)
0017 {
0018 return;
0019 }
0020
0021 int DumpParticleFlowElementContainer::process_Node(PHNode *myNode)
0022 {
0023 ParticleFlowElementContainer *particleflowelementcontainer = nullptr;
0024 MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
0025 if (thisNode)
0026 {
0027 particleflowelementcontainer = thisNode->getData();
0028 }
0029 if (particleflowelementcontainer)
0030 {
0031 ParticleFlowElementContainer::ConstIterator hiter;
0032 ParticleFlowElementContainer::ConstRange begin_end = particleflowelementcontainer->getParticleFlowElements();
0033 *fout << "size: " << particleflowelementcontainer->size() << std::endl;
0034 for (hiter = begin_end.first; hiter != begin_end.second; ++hiter)
0035 {
0036 ParticleFlowElement *pfe = hiter->second;
0037 *fout << "get_id(): " << pfe->get_id() << std::endl;
0038 *fout << "get_type(): " << pfe->get_type() << std::endl;
0039 *fout << "get_px(): " << pfe->get_px() << std::endl;
0040 *fout << "get_py(): " << pfe->get_py() << std::endl;
0041 *fout << "get_pz(): " << pfe->get_pz() << std::endl;
0042 *fout << "get_e(): " << pfe->get_e() << std::endl;
0043 *fout << "get_p(): " << pfe->get_p() << std::endl;
0044 *fout << "get_pt(): " << pfe->get_pt() << std::endl;
0045 *fout << "get_et(): " << pfe->get_et() << std::endl;
0046 *fout << "get_eta(): " << pfe->get_eta() << std::endl;
0047 *fout << "get_phi(): " << pfe->get_phi() << std::endl;
0048 *fout << "get_mass(): " << pfe->get_mass() << std::endl;
0049 }
0050 }
0051 return 0;
0052 }