Back to home page

sPhenix code displayed by LXR

 
 

    


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

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