ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DumpBbcVertexMap.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DumpBbcVertexMap.cc
1 #include "DumpBbcVertexMap.h"
2 
3 #include <g4bbc/BbcVertex.h>
4 #include <g4bbc/BbcVertexMap.h>
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 
17 DumpBbcVertexMap::DumpBbcVertexMap(const string &NodeName)
18  : DumpObject(NodeName)
19 {
20  return;
21 }
22 
24 {
25  BbcVertexMap *bbcvertexmap = nullptr;
26  MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
27  if (thisNode)
28  {
29  bbcvertexmap = thisNode->getData();
30  }
31  if (bbcvertexmap)
32  {
33  BbcVertexMap::ConstIter biter_beg = bbcvertexmap->begin();
34  BbcVertexMap::ConstIter biter_end = bbcvertexmap->end();
35  *fout << "size: " << bbcvertexmap->size() << endl;
36  for (BbcVertexMap::ConstIter biter = biter_beg; biter != biter_end; ++biter)
37  {
38  *fout << "id: " << biter->second->get_id() << endl;
39  *fout << "t: " << biter->second->get_t() << endl;
40  *fout << "t_err: " << biter->second->get_t_err() << endl;
41  *fout << "z: " << biter->second->get_z() << endl;
42  *fout << "z_err: " << biter->second->get_z_err() << endl;
43  }
44  }
45  return 0;
46 }