Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #include "DumpMbdGeom.h"
0002 
0003 #include <mbd/MbdGeom.h>
0004 
0005 #include <phool/PHIODataNode.h>
0006 
0007 #include <ostream>
0008 #include <string>
0009 
0010 using MyNode_t = PHIODataNode<MbdGeom>;
0011 
0012 DumpMbdGeom::DumpMbdGeom(const std::string &NodeName)
0013   : DumpObject(NodeName)
0014 {
0015   return;
0016 }
0017 
0018 int DumpMbdGeom::process_Node(PHNode *myNode)
0019 {
0020   MbdGeom *mbdgeom = nullptr;
0021   MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);  // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
0022   if (thisNode)
0023   {
0024     mbdgeom = thisNode->getData();
0025   }
0026   if (mbdgeom)
0027   {
0028     for (int i = 0; i < 128; i++)
0029     {
0030       *fout << "get_x(" << i << "): " << mbdgeom->get_x(i) << std::endl;
0031       *fout << "get_y(" << i << "): " << mbdgeom->get_y(i) << std::endl;
0032       *fout << "get_z(" << i << "): " << mbdgeom->get_z(i) << std::endl;
0033       *fout << "get_r(" << i << "): " << mbdgeom->get_r(i) << std::endl;
0034       *fout << "get_phi(" << i << "): " << mbdgeom->get_phi(i) << std::endl;
0035       *fout << "get_arm(" << i << "): " << mbdgeom->get_arm(i) << std::endl;
0036       *fout << "get_arm_feech(" << i << "): " << mbdgeom->get_arm_feech(i) << std::endl;
0037       *fout << "get_pmt(" << i << "): " << mbdgeom->get_pmt(i) << std::endl;
0038       *fout << "get_type(" << i << "): " << mbdgeom->get_type(i) << std::endl;
0039     }
0040   }
0041   return 0;
0042 }