Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StreamingCheck.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file StreamingCheck.cc
1 #include "StreamingCheck.h"
2 
5 #include <fun4all/SubsysReco.h> // for SubsysReco
6 
16 
17 #include <phool/PHCompositeNode.h>
18 #include <phool/PHDataNode.h>
19 #include <phool/PHNode.h> // for PHNode
20 #include <phool/PHNodeIterator.h> // for PHNodeIterator
21 #include <phool/getClass.h>
22 
23 #include <TSystem.h>
24 
25 #include <iostream> // for operator<<, endl, basic_ost...
26 #include <set>
27 #include <utility> // for pair
28 #include <vector> // for vector
29 
30 //____________________________________________________________________________..
32 : SubsysReco(name)
33 {
34 }
35 
36 //____________________________________________________________________________..
38 {
40 }
41 
42 //____________________________________________________________________________..
44 {
45  Gl1RawHit *gl1rawhit = findNode::getClass<Gl1RawHit>(topNode,"GL1RAWHIT");
46  if (!gl1rawhit)
47  {
48  std::cout << "could not find node GL1RAWHIT" << std::endl;
49  exit(1);
50  }
51  uint64_t refBCO = gl1rawhit->get_bco();
52  uint64_t refBCO_40Bits = refBCO & 0xFFFFFFFFFF;
53  TpcRawHitContainer *tpccont = findNode::getClass<TpcRawHitContainer>(topNode,"TPCRAWHIT");
54  if (tpccont)
55  {
56  if (Verbosity() > 0)
57  {
58  tpccont->identify();
59  }
60  for (unsigned int i=0; i<tpccont->get_nhits(); i++)
61  {
62  TpcRawHit *inh = tpccont->get_hit(i);
63  if (inh->get_gtm_bco() < refBCO_40Bits)
64  {
65  std::cout << "bco mismatch (too small), gl1: 0x" << std::hex << refBCO_40Bits
66  << ", tpc: 0x" << inh->get_gtm_bco() << std::endl;
67  }
68  if (inh->get_gtm_bco() > refBCO_40Bits + tpc_bcorange)
69  {
70  std::cout << "bco mismatch (too large), gl1: 0x" << std::hex << refBCO_40Bits
71  << ", tpc: 0x" << inh->get_gtm_bco() << std::endl;
72  }
73  }
74  }
75  InttRawHitContainer *inttcont = findNode::getClass<InttRawHitContainer>(topNode,"INTTRAWHIT");
76  if (inttcont)
77  {
78  if (Verbosity() > 0)
79  {
80  inttcont->identify();
81  }
82  for (unsigned int i=0; i<inttcont->get_nhits(); i++)
83  {
84  InttRawHit *inh = inttcont->get_hit(i);
85  if (inh->get_bco() != refBCO_40Bits)
86  {
87  std::cout << "bco mismatch (too small), gl1: 0x" << std::hex << refBCO_40Bits
88  << ", intt: 0x" << inh->get_bco() << std::endl;
89  }
90  }
91  }
93 }