Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #include "DumpRunHeader.h"
0002 
0003 #include "DumpObject.h"
0004 
0005 #include <ffaobjects/RunHeader.h>
0006 
0007 #include <phool/PHIODataNode.h>
0008 
0009 #include <ostream>
0010 #include <string>
0011 
0012 using MyNode_t = PHIODataNode<RunHeader>;
0013 
0014 DumpRunHeader::DumpRunHeader(const std::string &NodeName)
0015   : DumpObject(NodeName)
0016 {
0017   WriteRunEvent(0);  // do not write info for each event
0018   return;
0019 }
0020 
0021 int DumpRunHeader::process_Node(PHNode *myNode)
0022 {
0023   RunHeader *runheader = nullptr;
0024   MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);  // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
0025   if (thisNode)
0026   {
0027     runheader = thisNode->getData();
0028   }
0029   if (!node_written && runheader)
0030   {
0031     *fout << "RunHeader->isValid(): " << runheader->isValid() << std::endl;
0032     if (runheader->isValid())
0033     {
0034       *fout << "get_RunNumber(): " << runheader->get_RunNumber() << std::endl;
0035       node_written = 1;
0036     }
0037   }
0038   return 0;
0039 }