Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:56

0001 #include "DumpSvtxVertexMap.h"
0002 
0003 #include <phool/PHIODataNode.h>
0004 
0005 #include <globalvertex/SvtxVertex.h>
0006 #include <globalvertex/SvtxVertexMap.h>
0007 
0008 #include <map>
0009 #include <ostream>
0010 #include <string>
0011 #include <utility>
0012 
0013 using MyNode_t = PHIODataNode<SvtxVertexMap>;
0014 
0015 DumpSvtxVertexMap::DumpSvtxVertexMap(const std::string &NodeName)
0016   : DumpObject(NodeName)
0017 {
0018   return;
0019 }
0020 
0021 int DumpSvtxVertexMap::process_Node(PHNode *myNode)
0022 {
0023   SvtxVertexMap *svtxvertexmap = nullptr;
0024   MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);  // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
0025   if (thisNode)
0026   {
0027     svtxvertexmap = thisNode->getData();
0028   }
0029   if (svtxvertexmap)
0030   {
0031     SvtxVertexMap::ConstIter hiter;
0032     *fout << "size: " << svtxvertexmap->size() << std::endl;
0033     for (hiter = svtxvertexmap->begin(); hiter != svtxvertexmap->end(); hiter++)
0034     {
0035       *fout << "id: 0x" << std::hex << hiter->second->get_id() << std::dec << std::endl;
0036       *fout << "t0: " << hiter->second->get_t0() << std::endl;
0037       *fout << "x: " << hiter->second->get_x() << std::endl;
0038       *fout << "y: " << hiter->second->get_y() << std::endl;
0039       *fout << "z: " << hiter->second->get_z() << std::endl;
0040       *fout << "chisq: " << hiter->second->get_chisq() << std::endl;
0041       *fout << "ndof: " << hiter->second->get_ndof() << std::endl;
0042     }
0043   }
0044   return 0;
0045 }