Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #include "DumpSvtxPHG4ParticleMap.h"
0002 
0003 #include <phool/PHIODataNode.h>
0004 
0005 #include <trackbase_historic/SvtxPHG4ParticleMap.h>
0006 
0007 #include <map>
0008 #include <ostream>
0009 #include <set>
0010 #include <string>
0011 #include <utility>
0012 
0013 using MyNode_t = PHIODataNode<SvtxPHG4ParticleMap>;
0014 
0015 DumpSvtxPHG4ParticleMap::DumpSvtxPHG4ParticleMap(const std::string &NodeName)
0016   : DumpObject(NodeName)
0017 {
0018   return;
0019 }
0020 
0021 int DumpSvtxPHG4ParticleMap::process_Node(PHNode *myNode)
0022 {
0023   SvtxPHG4ParticleMap *svtxphg4particlemap = nullptr;
0024   MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);  // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
0025   if (thisNode)
0026   {
0027     svtxphg4particlemap = thisNode->getData();
0028   }
0029   if (svtxphg4particlemap)
0030   {
0031     *fout << "size " << svtxphg4particlemap->size() << std::endl;
0032     for (auto const &iter : *svtxphg4particlemap)
0033     {
0034       *fout << "Cluster: " << std::hex << iter.first << std::dec << std::endl;
0035 
0036       for (auto const &iter2 : iter.second)
0037       {
0038         *fout << "weight: " << iter2.first << std::endl;
0039         for (int iter3 : iter2.second)
0040         {
0041           *fout << "track id " << iter3 << std::endl;
0042         }
0043       }
0044     }
0045   }
0046   return 0;
0047 }