ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DumpGlobalVertexMap.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DumpGlobalVertexMap.cc
1 #include "DumpGlobalVertexMap.h"
2 
5 
6 #include <phool/PHIODataNode.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  GlobalVertexMap *globalvertexmap = nullptr;
26  MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
27  if (thisNode)
28  {
29  globalvertexmap = thisNode->getData();
30  }
31  if (globalvertexmap)
32  {
33  GlobalVertexMap::ConstIter viter_beg = globalvertexmap->begin();
34  GlobalVertexMap::ConstIter viter_end = globalvertexmap->end();
35  *fout << "size: " << globalvertexmap->size() << endl;
36  for (GlobalVertexMap::ConstIter viter = viter_beg; viter != viter_end; ++viter)
37  {
38  *fout << "id: " << viter->second->get_id() << endl;
39  *fout << "t: " << viter->second->get_t() << endl;
40  *fout << "t_err: " << viter->second->get_t_err() << endl;
41  *fout << "x: " << viter->second->get_x() << endl;
42  *fout << "y: " << viter->second->get_y() << endl;
43  *fout << "z: " << viter->second->get_z() << endl;
44  *fout << "chisq: " << viter->second->get_chisq() << endl;
45  *fout << "ndor: " << viter->second->get_ndof() << endl;
46  for (int i = 0; i < 3; i++)
47  {
48  for (int j = 0; j < 3; j++)
49  {
50  *fout << "err[" << i << "][" << j << "]: " << viter->second->get_error(i, j) << endl;
51  }
52  }
53  GlobalVertex::ConstVtxIter vtxbegin = viter->second->begin_vtxids();
54  GlobalVertex::ConstVtxIter vtxend = viter->second->end_vtxids();
55  for (GlobalVertex::ConstVtxIter vtxiter = vtxbegin; vtxiter != vtxend; ++vtxiter)
56  {
57  *fout << "type " << vtxiter->first << " id: " << vtxiter->second << endl;
58  }
59  }
60  }
61  return 0;
62 }