ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DumpParticleFlowElementContainer.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DumpParticleFlowElementContainer.cc
2 
3 #include <phool/PHIODataNode.h>
4 
5 #include <particleflowreco/ParticleFlowElement.h>
6 #include <particleflowreco/ParticleFlowElementContainer.h>
7 
8 #include <map>
9 #include <ostream>
10 #include <string>
11 #include <utility>
12 
13 using namespace std;
14 
16 
18  : DumpObject(NodeName)
19 {
20  return;
21 }
22 
24 {
25  ParticleFlowElementContainer *particleflowelementcontainer = nullptr;
26  MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
27  if (thisNode)
28  {
29  particleflowelementcontainer = thisNode->getData();
30  }
31  if (particleflowelementcontainer)
32  {
34  ParticleFlowElementContainer::ConstRange begin_end = particleflowelementcontainer->getParticleFlowElements();
35  *fout << "size: " << particleflowelementcontainer->size() << endl;
36  for (hiter = begin_end.first; hiter != begin_end.second; ++hiter)
37  {
38  ParticleFlowElement *pfe = hiter->second;
39  *fout << "get_id(): " << pfe->get_id() << endl;
40  *fout << "get_type(): " << pfe->get_type() << endl;
41  *fout << "get_px(): " << pfe->get_px() << endl;
42  *fout << "get_py(): " << pfe->get_py() << endl;
43  *fout << "get_pz(): " << pfe->get_pz() << endl;
44  *fout << "get_e(): " << pfe->get_e() << endl;
45  *fout << "get_p(): " << pfe->get_p() << endl;
46  *fout << "get_pt(): " << pfe->get_pt() << endl;
47  *fout << "get_et(): " << pfe->get_et() << endl;
48  *fout << "get_eta(): " << pfe->get_eta() << endl;
49  *fout << "get_phi(): " << pfe->get_phi() << endl;
50  *fout << "get_mass(): " << pfe->get_mass() << endl;
51  }
52  }
53  return 0;
54 }