File indexing completed on 2025-08-06 08:17:55
0001 #include "DumpCentralityInfo.h"
0002
0003 #include "DumpObject.h"
0004
0005 #include <centrality/CentralityInfo.h>
0006
0007 #include <phool/PHIODataNode.h>
0008
0009 #include <ostream>
0010 #include <string>
0011
0012 using MyNode_t = PHIODataNode<CentralityInfo>;
0013
0014 DumpCentralityInfo::DumpCentralityInfo(const std::string &NodeName)
0015 : DumpObject(NodeName)
0016 {
0017 return;
0018 }
0019
0020 int DumpCentralityInfo::process_Node(PHNode *myNode)
0021 {
0022 CentralityInfo *centralityinfo = nullptr;
0023 MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
0024 if (thisNode)
0025 {
0026 centralityinfo = thisNode->getData();
0027 }
0028 if (centralityinfo)
0029 {
0030 *fout << "CentralityInfo->isValid(): " << centralityinfo->isValid() << std::endl;
0031 if (centralityinfo->isValid())
0032 {
0033 for (int i = 0; i < 100; i++)
0034 {
0035 if (centralityinfo->has_quantity(static_cast<CentralityInfo::PROP>(i)))
0036 {
0037 *fout << "get_quantity(" << i << "): " << centralityinfo->get_quantity(static_cast<CentralityInfo::PROP>(i)) << std::endl;
0038 }
0039 if (centralityinfo->has_centile(static_cast<CentralityInfo::PROP>(i)))
0040 {
0041 *fout << "get_centile(" << i << "): " << centralityinfo->get_centile(static_cast<CentralityInfo::PROP>(i)) << std::endl;
0042 }
0043 }
0044 }
0045 }
0046 return 0;
0047 }