Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TpcTpotEventInfov1.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TpcTpotEventInfov1.cc
1 
7 #include "TpcTpotEventInfov1.h"
8 
9 #include <cmath>
10 #include <utility> // for swap
11 #include <cassert>
12 
14 {
15  std::fill_n(&m_bco[0][0][0],100,UINT64_MAX);
16  std::fill_n(&m_lvl1_count[0][0][0],100,UINT32_MAX);
17  std::fill_n(&m_endat_count[0][0][0],100,UINT32_MAX);
18  std::fill_n(&m_last_bco[0][0][0],100,UINT64_MAX);
19  std::fill_n(&m_modebits[0][0][0],100,UINT8_MAX);
20 }
21 
22 void TpcTpotEventInfov1::identify(std::ostream& os) const
23 {
24  os << "---TpcTpotEventInfov1--------------------" << std::endl;
25 
26  for (int i = 0; i < 25; i++)
27  {
28  os << "Sector " << i << ": (PCIe 0 lvl1, PCIe 0 EnDat, PCIe 1 lvl1, PCIe 1 EnDat)" << std::endl;
29  os << "BCO - " << m_bco[i][0][0] << ", " << m_bco[i][0][1] << ", " << m_bco[i][1][0] << ", " << m_bco[i][1][1] << std::endl;
30  os << "Level 1 Count - " << m_lvl1_count[i][0][0] << ", " << m_lvl1_count[i][0][1] << ", " << m_lvl1_count[i][1][0] << ", " << m_lvl1_count[i][1][1] << std::endl;
31  os << "EnDat Count - " << m_endat_count[i][0][0] << ", " << m_endat_count[i][0][1] << ", " << m_endat_count[i][1][0] << ", " << m_endat_count[i][1][1] << std::endl;
32  os << "Last BCO - " << m_last_bco[i][0][0] << ", " << m_last_bco[i][0][1] << ", " << m_last_bco[i][1][0] << ", " << m_last_bco[i][1][1] << std::endl;
33  os << "Modebits - " << m_modebits[i][0][0] << ", " << m_modebits[i][0][1] << ", " << m_modebits[i][1][0] << ", " << m_modebits[i][1][1] << std::endl;
34  }
35 
36  os << std::endl;
37  os << "-----------------------------------------------" << std::endl;
38 
39  return;
40 }
41 
43 {
44  return 1;
45 }
46 
48 {
49  // do nothing if copying onto oneself
50  if( this == &source ) return;
51 
52  // parent class method
54 
55  for (int i = 0; i < 25; i++)
56  {
57  for (int j = 0; j < 2; j++)
58  {
59  for (int k = 0; k < 2; k++)
60  {
61  setBCO(source.getBCO(static_cast<SectorID>(i), static_cast<PCIeEndPointID>(j), static_cast<TaggerID>(k)),static_cast<SectorID>(i), static_cast<PCIeEndPointID>(j), static_cast<TaggerID>(k));
62  setLevel1Count(source.getLevel1Count(static_cast<SectorID>(i), static_cast<PCIeEndPointID>(j), static_cast<TaggerID>(k)),static_cast<SectorID>(i), static_cast<PCIeEndPointID>(j), static_cast<TaggerID>(k));
63  setEnDatCount(source.getEnDatCount(static_cast<SectorID>(i), static_cast<PCIeEndPointID>(j), static_cast<TaggerID>(k)), static_cast<SectorID>(i), static_cast<PCIeEndPointID>(j), static_cast<TaggerID>(k));
64  setLastBCO(source.getLastBCO(static_cast<SectorID>(i), static_cast<PCIeEndPointID>(j), static_cast<TaggerID>(k)),static_cast<SectorID>(i), static_cast<PCIeEndPointID>(j), static_cast<TaggerID>(k));
65  setModebits(source.getModebits(static_cast<SectorID>(i), static_cast<PCIeEndPointID>(j), static_cast<TaggerID>(k)),static_cast<SectorID>(i), static_cast<PCIeEndPointID>(j), static_cast<TaggerID>(k));
66  }
67  }
68  }
69 }
70 
72 {
73  assert( sector>=kTPCSector0 );
74  assert( sector<=kTPOT );
75  assert( PCIe>=kEndPoint0 );
76  assert( PCIe<=kEndPoint1 );
77  assert( tagger>=kLVL1Tagger );
78  assert( tagger<=kEnDatTagger );
79 }