Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
packet_cdevir.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file packet_cdevir.cc
1 #include <packet_cdevir.h>
2 
4  : Packet_w4 (data)
5 {
6  ps = 0;
7 }
8 
9 int *Packet_cdevir::decode ( int *nwout)
10 {
11  int *k;
12  k = (int *) findPacketDataStart(packet);
13  if (k == 0)
14  {
15  ps = 0;
16  *nwout = 0;
17  return 0;
18  }
19  int i;
20 
21 
22  ps = ( struct cdevIrData *) k;
23 
24  for (i=0; i<12; i++)fix_endianess(&ps->m_tripletTrimCurrents[i]);
25  for (i=0; i<360; i++)fix_endianess(&ps->m_polarPerBunchYellowX[i]);
26  fix_endianess ( ps->m_irState, 256);
27 
28  *nwout = 0;
29  return 0;
30 }
31 
32 double Packet_cdevir::dValue(const int channel,const char *what)
33 {
34 
35  return 0;
36 }
37 
38 
39 
41 {
42  int i;
43  this->identify(os);
44 
45  decode (&i);
46 
47 
48  os << "m_irState " << ps->m_irState << std::endl;
49 
50  for (i = 0; i< 12; i++)
51  os << "tripletTrimCurrents " << std::setw(3) << i << std::setw(12) << ps->m_tripletTrimCurrents[i] << std::endl;
52 
53  os << "m_irVacuum " << ps->m_irVacuum << std::endl;
54  os << "m_estBeamSizeYellowVert " << ps->m_estBeamSizeYellowVert << std::endl;
55  os << "m_estBeamSizeYellowHorz " << ps->m_estBeamSizeYellowHorz << std::endl;
56  os << "m_estBeamSizeBlueVert " << ps->m_estBeamSizeBlueVert << std::endl;
57  os << "m_estBeamSizeBlueHorz " << ps->m_estBeamSizeBlueHorz << std::endl;
58  os << "m_estimatedLuminosity " << ps->m_estimatedLuminosity << std::endl;
59  os << "m_betaStarYellowHorz " << ps->m_betaStarYellowHorz << std::endl;
60  os << "m_betaStarBlueHorz " << ps->m_betaStarBlueHorz << std::endl;
61  os << "m_betaStarYellowVert " << ps->m_betaStarYellowVert << std::endl;
62  os << "m_betaStarBlueVert " << ps->m_betaStarBlueVert << std::endl;
63 
64 
65  os << "m_avgOrbitDXBpmYellowHorzOdd " << ps->m_avgOrbitDXBpmYellowHorzOdd << std::endl;
66  os << "m_avgOrbitDXBpmYellowHorzEven " << ps->m_avgOrbitDXBpmYellowHorzEven << std::endl;
67  os << "m_avgOrbitDXBpmYellowVertOdd " << ps->m_avgOrbitDXBpmYellowVertOdd << std::endl;
68  os << "m_avgOrbitDXBpmYellowVertEven " << ps->m_avgOrbitDXBpmYellowVertEven << std::endl;
69  os << "m_avgOrbitDXBpmBlueHorzOdd " << ps->m_avgOrbitDXBpmBlueHorzOdd << std::endl;
70  os << "m_avgOrbitDXBpmBlueHorzEven " << ps->m_avgOrbitDXBpmBlueHorzEven << std::endl;
71  os << "m_avgOrbitDXBpmBlueVertOdd " << ps->m_avgOrbitDXBpmBlueVertOdd << std::endl;
72  os << "m_avgOrbitDXBpmBlueVertEven " << ps->m_avgOrbitDXBpmBlueVertEven << std::endl;
73  os << "m_vertexStartTime " << ps->m_vertexStartTime << std::endl;
74  os << "m_vertexEndTime " << ps->m_vertexEndTime << std::endl;
75  os << "m_datavalidMask " << ps->m_datavalidMask << std::endl;
76 
77  for (i = 0; i< 100; i++)
78  {
79 
80  os << std::setw(3) << i << " | "
81  << std::setw(12) << ps->m_experimentVertexX[i]
82  << std::setw(12) << ps->m_experimentVertexY[i]
83  << std::setw(12) << ps->m_experimentVertexZ[i]
84  << std::endl;
85 
86  }
87 
88  for (i = 0; i< 360; i++)
89  {
90 
91  os << std::setw(3) << i << " | "
92  << std::setw(12) << ps->m_polarPerBunchYellowX[i]
93  << std::setw(12) << ps->m_polarPerBunchYellowY[i]
94  << std::setw(12) << ps->m_polarPerBunchYellowZ[i]
95  << std::setw(12) << ps->m_polarPerBunchBlueX[i]
96  << std::setw(12) << ps->m_polarPerBunchBlueY[i]
97  << std::setw(12) << ps->m_polarPerBunchBlueZ[i]
98  << std::endl;
99  }
100 
101 
102 }