ECCE @ EIC 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 
14 using namespace std;
15 
17 
19  : DumpObject(NodeName)
20 {
21  return;
22 }
23 
25 {
26  TrkrHitSetContainer *trkrhitsetcontainer = nullptr;
27  MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
28  if (thisNode)
29  {
30  trkrhitsetcontainer = thisNode->getData();
31  }
32  if (trkrhitsetcontainer)
33  {
35  TrkrHitSetContainer::ConstRange begin_end = trkrhitsetcontainer->getHitSets();
36  *fout << "size: " << trkrhitsetcontainer->size() << endl;
37  for (hiter = begin_end.first; hiter != begin_end.second; ++hiter)
38  {
39  TrkrHitSet *trkrhitset = hiter->second;
41  TrkrHitSet::ConstRange trset_begin_end = trkrhitset->getHits();
42  for (tsetiter = trset_begin_end.first; tsetiter != trset_begin_end.second; ++tsetiter)
43  {
44  TrkrHit *hit = tsetiter->second;
45  *fout << "id: " << tsetiter->first << endl;
46  *fout << "adc: " << hit->getAdc() << endl;
47  *fout << "energy: " << hit->getEnergy() << endl;
48  }
49  }
50  }
51  return 0;
52 }