Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-10-15 08:25:51

0001 #include "DumpLaserEventInfo.h"
0002 
0003 #include <phool/PHIODataNode.h>
0004 
0005 #include <tpc/LaserEventInfo.h>
0006 
0007 #include <ostream>
0008 #include <string>
0009 
0010 using MyNode_t = PHIODataNode<LaserEventInfo>;
0011 
0012 DumpLaserEventInfo::DumpLaserEventInfo(const std::string &NodeName)
0013   : DumpObject(NodeName)
0014 {
0015 }
0016 
0017 int DumpLaserEventInfo::process_Node(PHNode *myNode)
0018 {
0019   LaserEventInfo *info{nullptr};
0020   MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);  // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
0021   if (thisNode)
0022   {
0023     info = thisNode->getData();
0024   }
0025   if (info)
0026   {
0027     *fout << "isLaserEvent: " << info->isLaserEvent() << std::endl;
0028     *fout << "isGl1LaserEvent: " << info->isGl1LaserEvent() << std::endl;
0029     *fout << "isGl1LaserPileupEvent: " << info->isGl1LaserPileupEvent() << std::endl;
0030     for (const bool side : {false, true})
0031     {
0032       *fout << "getPeakSample(" << side << "): " << info->getPeakSample(side) << std::endl;
0033       *fout << "getPeakWidth(" << side << "): " << info->getPeakWidth(side) << std::endl;
0034     }
0035   }
0036   return 0;
0037 }