// G4Hub.cpp: implementation of the CG4Hub class. // ////////////////////////////////////////////////////////////////////// #include "G4Hub.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// CG4Hub::CG4Hub() { memset(m_col,0,sizeof(float)*3); // black for (int i=0;i<3;i++) m_senActive[i]=false; } CG4Hub::~CG4Hub() { } void CG4Hub::SetPnoData(float *pno,int sens) { // float scale=2.0f; // float scale=0.01; float scale=1.0f; memcpy(m_pno[sens],pno,sizeof(float)*6); for (int i=0;i<3;i++) m_pno[sens][i]*=scale; m_senActive[sens]=true; } int CG4Hub::GetId() { return m_id; } uint32_t CG4Hub::GetDigIOData() { return digio; } void CG4Hub::SetDigIOData(uint32_t data) { digio = data; } bool CG4Hub::IsSenActive(int i) { return m_senActive[i]; } void CG4Hub::SetId(int id) { m_id=id; } //#include float (*CG4Hub::GetPnoData())[6] { return m_pno; }