Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #include "DumpRawTowerGeomContainer.h"
0002 
0003 #include <phool/PHIODataNode.h>
0004 
0005 #include <calobase/RawTowerGeom.h>
0006 #include <calobase/RawTowerGeomContainer.h>
0007 
0008 #include <map>
0009 #include <ostream>
0010 #include <string>
0011 #include <utility>
0012 
0013 using MyNode_t = PHIODataNode<RawTowerGeomContainer>;
0014 
0015 DumpRawTowerGeomContainer::DumpRawTowerGeomContainer(const std::string &NodeName)
0016   : DumpObject(NodeName)
0017 {
0018   return;
0019 }
0020 
0021 int DumpRawTowerGeomContainer::process_Node(PHNode *myNode)
0022 {
0023   RawTowerGeomContainer *rawtowergeom = nullptr;
0024   MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);  // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
0025   if (thisNode)
0026   {
0027     rawtowergeom = thisNode->getData();
0028   }
0029   if (rawtowergeom)
0030   {
0031     *fout << "Calorimeter ID: " << rawtowergeom->get_calorimeter_id() << std::endl;
0032     *fout << "size: " << rawtowergeom->size() << std::endl;
0033     rawtowergeom->identify(*fout);
0034     RawTowerGeomContainer::ConstRange all_towers = rawtowergeom->get_tower_geometries();
0035     for (RawTowerGeomContainer::ConstIterator it = all_towers.first;
0036          it != all_towers.second; ++it)
0037     {
0038       it->second->identify(*fout);
0039     }
0040   }
0041   return 0;
0042 }