File indexing completed on 2025-08-06 08:17:56
0001 #include "DumpPHG4TpcCylinderGeomContainer.h"
0002
0003 #include <phool/PHIODataNode.h>
0004
0005 #include <g4detectors/PHG4TpcCylinderGeom.h>
0006 #include <g4detectors/PHG4TpcCylinderGeomContainer.h>
0007
0008 #include <map>
0009 #include <ostream>
0010 #include <string>
0011 #include <utility>
0012
0013 using MyNode_t = PHIODataNode<PHG4TpcCylinderGeomContainer>;
0014
0015 DumpPHG4TpcCylinderGeomContainer::DumpPHG4TpcCylinderGeomContainer(const std::string &NodeName)
0016 : DumpObject(NodeName)
0017 {
0018 return;
0019 }
0020
0021 int DumpPHG4TpcCylinderGeomContainer::process_Node(PHNode *myNode)
0022 {
0023 PHG4TpcCylinderGeomContainer *phg4geomcontainer = nullptr;
0024 MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
0025 if (thisNode)
0026 {
0027 phg4geomcontainer = thisNode->getData();
0028 }
0029 if (phg4geomcontainer)
0030 {
0031 PHG4TpcCylinderGeomContainer::ConstIterator hiter;
0032 PHG4TpcCylinderGeomContainer::ConstRange geom_begin_end = phg4geomcontainer->get_begin_end();
0033 *fout << "num layers: " << phg4geomcontainer->get_NLayers() << std::endl;
0034 for (hiter = geom_begin_end.first; hiter != geom_begin_end.second; hiter++)
0035 {
0036 *fout << *(hiter->second) << std::endl;
0037 }
0038 }
0039 return 0;
0040 }