File indexing completed on 2025-08-06 08:17:56
0001 #include "DumpRawClusterContainer.h"
0002
0003 #include <phool/PHIODataNode.h>
0004
0005 #include <calobase/RawCluster.h>
0006 #include <calobase/RawClusterContainer.h>
0007
0008 #include <map>
0009 #include <ostream>
0010 #include <string>
0011 #include <utility>
0012
0013 using MyNode_t = PHIODataNode<RawClusterContainer>;
0014
0015 DumpRawClusterContainer::DumpRawClusterContainer(const std::string &NodeName)
0016 : DumpObject(NodeName)
0017 {
0018 return;
0019 }
0020
0021 int DumpRawClusterContainer::process_Node(PHNode *myNode)
0022 {
0023 RawClusterContainer *rawclustercontainer = nullptr;
0024 MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
0025 if (thisNode)
0026 {
0027 rawclustercontainer = thisNode->getData();
0028 }
0029 if (rawclustercontainer)
0030 {
0031 RawClusterContainer::ConstIterator hiter;
0032 RawClusterContainer::ConstRange begin_end = rawclustercontainer->getClusters();
0033 *fout << "size: " << rawclustercontainer->size() << std::endl;
0034 for (hiter = begin_end.first; hiter != begin_end.second; ++hiter)
0035 {
0036 *fout << "NTowers: " << hiter->second->getNTowers() << std::endl;
0037 *fout << "z: " << hiter->second->get_z() << std::endl;
0038 *fout << "phi: " << hiter->second->get_phi() << std::endl;
0039 *fout << "energy: " << hiter->second->get_energy() << std::endl;
0040 }
0041 }
0042 return 0;
0043 }