Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
InttCheck.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file InttCheck.cc
1 #include "InttCheck.h"
2 
5 #include <fun4all/SubsysReco.h> // for SubsysReco
6 
9 
10 #include <phool/PHCompositeNode.h>
11 #include <phool/PHDataNode.h>
12 #include <phool/PHNode.h> // for PHNode
13 #include <phool/PHNodeIterator.h> // for PHNodeIterator
14 #include <phool/getClass.h>
15 
16 #include <Event/packet.h>
17 
18 #include <TSystem.h>
19 
20 #include <iostream> // for operator<<, endl, basic_ost...
21 #include <utility> // for pair
22 #include <vector> // for vector
23 
24 //____________________________________________________________________________..
26 : SubsysReco(name)
27 {
28 }
29 
30 //____________________________________________________________________________..
32 {
34 }
35 
36 //____________________________________________________________________________..
38 {
39  InttRawHitContainer *inttcont = findNode::getClass<InttRawHitContainer>(topNode,m_EvtNodeName);
40  if (!inttcont)
41  {
42  std::cout << "could not find node " << m_EvtNodeName << std::endl;
43  }
44  else
45  {
46 // inttcont->identify();
47  uint64_t refbco = std::numeric_limits<uint64_t>::max();
48  bool ifirst = true;
49  for (unsigned int i=0; i<inttcont->get_nhits(); i++)
50  {
51  InttRawHit *inh = inttcont->get_hit(i);
52  if (ifirst)
53  {
54  refbco = inh->get_bco();
55  if (Verbosity() > 0)
56  {
57  std::cout << "current bco: 0x" << std::hex << refbco
58  << std::dec << std::endl;
59  }
60  if (bclk_seen.find(refbco) != bclk_seen.end())
61  {
62  std::cout << "bco 0x" << std::hex << refbco << std::dec
63  << " seen before" << std::endl;
64  }
65  bclk_seen.insert(refbco);
66  ifirst = false;
67  }
68  else
69  {
70  if (refbco != inh->get_bco())
71  {
72  std::cout << "scream, refbco: 0x" << std::hex << refbco
73  << " current bco: 0x" << inh->get_bco()
74  << std::dec << std::endl;
75  }
76  }
77  }
78 
79  }
81 }