Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #include "DumpTrkrClusterContainer.h"
0002 
0003 #include <phool/PHIODataNode.h>
0004 
0005 #include <trackbase/TrkrCluster.h>
0006 #include <trackbase/TrkrClusterContainer.h>
0007 
0008 #include <map>
0009 #include <ostream>
0010 #include <string>
0011 #include <utility>
0012 
0013 using MyNode_t = PHIODataNode<TrkrClusterContainer>;
0014 
0015 DumpTrkrClusterContainer::DumpTrkrClusterContainer(const std::string &NodeName)
0016   : DumpObject(NodeName)
0017 {
0018   return;
0019 }
0020 
0021 int DumpTrkrClusterContainer::process_Node(PHNode *myNode)
0022 {
0023   TrkrClusterContainer *trkrclustercontainer = nullptr;
0024   MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);  // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
0025   if (thisNode)
0026   {
0027     trkrclustercontainer = thisNode->getData();
0028   }
0029   if (trkrclustercontainer)
0030   {
0031     TrkrClusterContainer::ConstIterator hiter;
0032     *fout << "size: " << trkrclustercontainer->size() << std::endl;
0033     trkrclustercontainer->identify(*fout);
0034     TrkrClusterContainer::HitSetKeyList keylist = trkrclustercontainer->getHitSetKeys();
0035     for (unsigned int &iter : keylist)
0036     {
0037       TrkrClusterContainer::ConstRange begin_end = trkrclustercontainer->getClusters(iter);
0038       for (hiter = begin_end.first; hiter != begin_end.second; ++hiter)
0039       {
0040         TrkrCluster *trkrcluster = hiter->second;
0041         *fout << "getAdc: " << trkrcluster->getAdc() << std::endl;
0042         *fout << "getRPhiError: " << trkrcluster->getRPhiError() << std::endl;
0043         *fout << "getZError: " << trkrcluster->getZError() << std::endl;
0044       }
0045     }
0046   }
0047   return 0;
0048 }