Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DumpTrkrHitSetContainer.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DumpTrkrHitSetContainer.cc
2 
3 #include <phool/PHIODataNode.h>
4 
5 #include <trackbase/TrkrHit.h>
6 #include <trackbase/TrkrHitSet.h>
8 
9 #include <map>
10 #include <ostream>
11 #include <string>
12 #include <utility>
13 
15 
17  : DumpObject(NodeName)
18 {
19  return;
20 }
21 
23 {
24  TrkrHitSetContainer *trkrhitsetcontainer = nullptr;
25  MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
26  if (thisNode)
27  {
28  trkrhitsetcontainer = thisNode->getData();
29  }
30  if (trkrhitsetcontainer)
31  {
33  TrkrHitSetContainer::ConstRange begin_end = trkrhitsetcontainer->getHitSets();
34  *fout << "size: " << trkrhitsetcontainer->size() << std::endl;
35  for (hiter = begin_end.first; hiter != begin_end.second; ++hiter)
36  {
37  TrkrHitSet *trkrhitset = hiter->second;
39  TrkrHitSet::ConstRange trset_begin_end = trkrhitset->getHits();
40  for (tsetiter = trset_begin_end.first; tsetiter != trset_begin_end.second; ++tsetiter)
41  {
42  TrkrHit *hit = tsetiter->second;
43  *fout << "id: " << tsetiter->first << std::endl;
44  *fout << "adc: " << hit->getAdc() << std::endl;
45  *fout << "energy: " << hit->getEnergy() << std::endl;
46  }
47  }
48  }
49  return 0;
50 }