File indexing completed on 2025-08-06 08:17:55
0001 #include "DumpPHFieldConfig.h"
0002
0003 #include "DumpObject.h"
0004
0005 #include <phfield/PHFieldConfig.h>
0006
0007 #include <phool/PHIODataNode.h>
0008
0009 #include <ostream>
0010 #include <string>
0011
0012 using MyNode_t = PHIODataNode<PHFieldConfig>;
0013
0014 DumpPHFieldConfig::DumpPHFieldConfig(const std::string &NodeName)
0015 : DumpObject(NodeName)
0016 {
0017 return;
0018 }
0019
0020 int DumpPHFieldConfig::process_Node(PHNode *myNode)
0021 {
0022 PHFieldConfig *phfieldconfig = nullptr;
0023 MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
0024 if (thisNode)
0025 {
0026 phfieldconfig = thisNode->getData();
0027 }
0028 if (phfieldconfig)
0029 {
0030 *fout << "PHFieldConfig->isValid(): " << phfieldconfig->isValid() << std::endl;
0031 if (phfieldconfig->isValid())
0032 {
0033 *fout << "get_field_config(): " << phfieldconfig->get_field_config() << std::endl;
0034 *fout << "get_filename(): " << phfieldconfig->get_filename() << std::endl;
0035 *fout << "get_magfield_rescale(): " << phfieldconfig->get_magfield_rescale() << std::endl;
0036 *fout << "get_field_mag_x(): " << phfieldconfig->get_field_mag_x() << std::endl;
0037 *fout << "get_field_mag_y(): " << phfieldconfig->get_field_mag_y() << std::endl;
0038 *fout << "get_field_mag_z(): " << phfieldconfig->get_field_mag_z() << std::endl;
0039 }
0040 }
0041 return 0;
0042 }