ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DumpRunHeader.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DumpRunHeader.cc
1 #include "DumpRunHeader.h"
2 
3 #include "DumpObject.h"
4 
5 #include <ffaobjects/RunHeader.h>
6 
7 #include <phool/PHIODataNode.h>
8 
9 #include <ostream>
10 #include <string>
11 
13 
14 DumpRunHeader::DumpRunHeader(const std::string &NodeName)
15  : DumpObject(NodeName)
16 {
17  WriteRunEvent(0); // do not write info for each event
18  return;
19 }
20 
22 {
23  RunHeader *runheader = 0;
24  MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
25  if (thisNode)
26  {
27  runheader = thisNode->getData();
28  }
29  if (!node_written && runheader)
30  {
31  *fout << "RunHeader->isValid(): " << runheader->isValid() << std::endl;
32  if (runheader->isValid())
33  {
34  *fout << "get_RunNumber(): " << runheader->get_RunNumber() << std::endl;
35  node_written = 1;
36  }
37  }
38  return 0;
39 }