#include <TCPReceiver.h>
Public Member Functions | |
int | Connect () |
int | Disconnect () |
void | GenerateFakeData (HCAL_HLX::LUMI_SECTION &localSection) |
void | GenerateRandomData (HCAL_HLX::LUMI_SECTION &localSection) |
bool | IsConnected () |
int | ReceiveLumiSection (HCAL_HLX::LUMI_SECTION &localSection) |
void | SetIP (std::string IP) |
int | SetMode (unsigned char) |
int | SetPort (unsigned short int) |
TCPReceiver () | |
TCPReceiver (unsigned short int, std::string, unsigned char) | |
bool | VerifyFakeData (HCAL_HLX::LUMI_SECTION &localSection) |
~TCPReceiver () | |
Private Attributes | |
unsigned char | acquireMode |
bool | Connected |
struct sockaddr_in | servAddr |
std::string | servIP |
unsigned short | servPort |
int | tcpSocket |
Definition at line 36 of file TCPReceiver.h.
HCAL_HLX::TCPReceiver::TCPReceiver | ( | ) |
Definition at line 34 of file TCPReceiver.cc.
References acquireMode, Connected, gather_cfg::cout, servIP, and servPort.
HCAL_HLX::TCPReceiver::TCPReceiver | ( | unsigned short int | port, |
std::string | IP, | ||
unsigned char | mode = 0 |
||
) |
Definition at line 49 of file TCPReceiver.cc.
References acquireMode, Connected, gather_cfg::cout, listHistos::IP, universalConfigTemplate::mode, query::port, servIP, and servPort.
HCAL_HLX::TCPReceiver::~TCPReceiver | ( | ) |
int HCAL_HLX::TCPReceiver::Connect | ( | ) |
Definition at line 232 of file TCPReceiver.cc.
References acquireMode, convertSQLitetoXML_cfg::connect, Connected, gather_cfg::cout, servAddr, servIP, servPort, and tcpSocket.
Referenced by HLXMonitor::analyze(), and HLXMonitor::connectHLXTCP().
int HCAL_HLX::TCPReceiver::Disconnect | ( | ) |
Definition at line 288 of file TCPReceiver.cc.
References acquireMode, Connected, gather_cfg::cout, and tcpSocket.
Referenced by HLXMonitor::analyze(), HLXMonitor::~HLXMonitor(), and ~TCPReceiver().
void HCAL_HLX::TCPReceiver::GenerateFakeData | ( | HCAL_HLX::LUMI_SECTION & | localSection | ) |
Definition at line 316 of file TCPReceiver.cc.
References HCAL_HLX::LUMI_SECTION_HEADER::bCMSLive, HCAL_HLX::LUMI_SECTION_SUB_HEADER::bIsComplete, gather_cfg::cout, HCAL_HLX::ET_SUM_SECTION::data, HCAL_HLX::OCCUPANCY_SECTION::data, HCAL_HLX::LHC_SECTION::data, HCAL_HLX::LUMI_DETAIL::ETBXNormalization, HCAL_HLX::LUMI_DETAIL::ETLumi, HCAL_HLX::LUMI_DETAIL::ETLumiErr, HCAL_HLX::LUMI_DETAIL::ETLumiQlty, HCAL_HLX::LUMI_SUMMARY::ETNormalization, HCAL_HLX::LUMI_SECTION::etSum, HCAL_HLX::ET_SUM_SECTION::hdr, HCAL_HLX::OCCUPANCY_SECTION::hdr, HCAL_HLX::LHC_SECTION::hdr, HCAL_HLX::LUMI_SECTION::hdr, i, HCAL_HLX::LUMI_SUMMARY::InstantETLumi, HCAL_HLX::LUMI_SUMMARY::InstantETLumiErr, HCAL_HLX::LUMI_SUMMARY::InstantETLumiQlty, HCAL_HLX::LUMI_SUMMARY::InstantLumi, HCAL_HLX::LUMI_SUMMARY::InstantLumiErr, HCAL_HLX::LUMI_SUMMARY::InstantLumiQlty, HCAL_HLX::LUMI_SUMMARY::InstantOccLumi, HCAL_HLX::LUMI_SUMMARY::InstantOccLumiErr, HCAL_HLX::LUMI_SUMMARY::InstantOccLumiQlty, j, relval_2017::k, HCAL_HLX::LUMI_SECTION::lhc, HCAL_HLX::LUMI_DETAIL::LHCLumi, HCAL_HLX::LUMI_SUMMARY::LHCNormalization, HCAL_HLX::LUMI_SECTION::lumiDetail, HCAL_HLX::LUMI_SUMMARY::lumiNoise, HCAL_HLX::LUMI_SECTION::lumiSummary, NULL, HCAL_HLX::LUMI_SECTION_HEADER::numBunches, HCAL_HLX::LUMI_SECTION_HEADER::numHLXs, HCAL_HLX::LUMI_SECTION_SUB_HEADER::numNibbles, HCAL_HLX::LUMI_SECTION_HEADER::numOrbits, HCAL_HLX::LUMI_DETAIL::OccBXNormalization, HCAL_HLX::LUMI_DETAIL::OccLumi, HCAL_HLX::LUMI_DETAIL::OccLumiErr, HCAL_HLX::LUMI_DETAIL::OccLumiQlty, HCAL_HLX::LUMI_SUMMARY::OccNormalization, HCAL_HLX::LUMI_SECTION::occupancy, HCAL_HLX::LUMI_SECTION_HEADER::runNumber, HCAL_HLX::LUMI_SECTION_HEADER::sectionNumber, HCAL_HLX::LUMI_SECTION_HEADER::startOrbit, HCAL_HLX::LUMI_SECTION_HEADER::timestamp, and HCAL_HLX::LUMI_SECTION_HEADER::timestamp_micros.
Referenced by ReceiveLumiSection(), and VerifyFakeData().
void HCAL_HLX::TCPReceiver::GenerateRandomData | ( | HCAL_HLX::LUMI_SECTION & | localSection | ) |
Definition at line 395 of file TCPReceiver.cc.
References HCAL_HLX::LUMI_SECTION_HEADER::bCMSLive, HCAL_HLX::LUMI_SECTION_SUB_HEADER::bIsComplete, gather_cfg::cout, HCAL_HLX::ET_SUM_SECTION::data, HCAL_HLX::OCCUPANCY_SECTION::data, HCAL_HLX::LHC_SECTION::data, HCAL_HLX::LUMI_DETAIL::ETBXNormalization, HCAL_HLX::LUMI_DETAIL::ETLumi, HCAL_HLX::LUMI_DETAIL::ETLumiErr, HCAL_HLX::LUMI_DETAIL::ETLumiQlty, HCAL_HLX::LUMI_SUMMARY::ETNormalization, HCAL_HLX::LUMI_SECTION::etSum, HCAL_HLX::ET_SUM_SECTION::hdr, HCAL_HLX::OCCUPANCY_SECTION::hdr, HCAL_HLX::LHC_SECTION::hdr, HCAL_HLX::LUMI_SECTION::hdr, i, HCAL_HLX::LUMI_SUMMARY::InstantETLumi, HCAL_HLX::LUMI_SUMMARY::InstantETLumiErr, HCAL_HLX::LUMI_SUMMARY::InstantETLumiQlty, HCAL_HLX::LUMI_SUMMARY::InstantLumi, HCAL_HLX::LUMI_SUMMARY::InstantLumiErr, HCAL_HLX::LUMI_SUMMARY::InstantLumiQlty, HCAL_HLX::LUMI_SUMMARY::InstantOccLumi, HCAL_HLX::LUMI_SUMMARY::InstantOccLumiErr, HCAL_HLX::LUMI_SUMMARY::InstantOccLumiQlty, j, relval_2017::k, HCAL_HLX::LUMI_SECTION::lhc, HCAL_HLX::LUMI_DETAIL::LHCLumi, HCAL_HLX::LUMI_SUMMARY::LHCNormalization, HCAL_HLX::LUMI_SECTION::lumiDetail, HCAL_HLX::LUMI_SUMMARY::lumiNoise, HCAL_HLX::LUMI_SECTION::lumiSummary, NULL, HCAL_HLX::LUMI_SECTION_HEADER::numBunches, HCAL_HLX::LUMI_SECTION_HEADER::numHLXs, HCAL_HLX::LUMI_SECTION_SUB_HEADER::numNibbles, HCAL_HLX::LUMI_SECTION_HEADER::numOrbits, HCAL_HLX::LUMI_DETAIL::OccBXNormalization, HCAL_HLX::LUMI_DETAIL::OccLumi, HCAL_HLX::LUMI_DETAIL::OccLumiErr, HCAL_HLX::LUMI_DETAIL::OccLumiQlty, HCAL_HLX::LUMI_SUMMARY::OccNormalization, HCAL_HLX::LUMI_SECTION::occupancy, rand(), HCAL_HLX::LUMI_SECTION_HEADER::runNumber, HCAL_HLX::LUMI_SECTION_HEADER::sectionNumber, and HCAL_HLX::LUMI_SECTION_HEADER::startOrbit.
Referenced by ReceiveLumiSection().
bool HCAL_HLX::TCPReceiver::IsConnected | ( | ) |
Definition at line 175 of file TCPReceiver.cc.
References Connected, and gather_cfg::cout.
Referenced by HLXMonitor::analyze(), and HLXMonitor::connectHLXTCP().
int HCAL_HLX::TCPReceiver::ReceiveLumiSection | ( | HCAL_HLX::LUMI_SECTION & | localSection | ) |
Definition at line 88 of file TCPReceiver.cc.
References acquireMode, Connected, gather_cfg::cout, GenerateFakeData(), GenerateRandomData(), TrackingRecHitProducer_cfi::select, HCAL_HLX::SetupFDSets(), and tcpSocket.
Referenced by HLXMonitor::analyze().
void HCAL_HLX::TCPReceiver::SetIP | ( | std::string | IP | ) |
Definition at line 222 of file TCPReceiver.cc.
References gather_cfg::cout, listHistos::IP, and servIP.
Referenced by HLXMonitor::analyze(), and HLXMonitor::connectHLXTCP().
int HCAL_HLX::TCPReceiver::SetMode | ( | unsigned char | mode | ) |
Definition at line 202 of file TCPReceiver.cc.
References acquireMode, gather_cfg::cout, and universalConfigTemplate::mode.
Referenced by HLXMonitor::connectHLXTCP().
int HCAL_HLX::TCPReceiver::SetPort | ( | unsigned short int | port | ) |
Definition at line 182 of file TCPReceiver.cc.
References gather_cfg::cout, query::port, and servPort.
Referenced by HLXMonitor::connectHLXTCP().
bool HCAL_HLX::TCPReceiver::VerifyFakeData | ( | HCAL_HLX::LUMI_SECTION & | localSection | ) |
Definition at line 469 of file TCPReceiver.cc.
References GenerateFakeData(), and dttmaxenums::L.
|
private |
Definition at line 55 of file TCPReceiver.h.
Referenced by Connect(), Disconnect(), ReceiveLumiSection(), SetMode(), and TCPReceiver().
|
private |
Definition at line 56 of file TCPReceiver.h.
Referenced by Connect(), Disconnect(), IsConnected(), ReceiveLumiSection(), and TCPReceiver().
|
private |
Definition at line 61 of file TCPReceiver.h.
Referenced by Connect().
|
private |
Definition at line 59 of file TCPReceiver.h.
Referenced by Connect(), SetIP(), and TCPReceiver().
|
private |
Definition at line 58 of file TCPReceiver.h.
Referenced by Connect(), SetPort(), and TCPReceiver().
|
private |
Definition at line 60 of file TCPReceiver.h.
Referenced by Connect(), Disconnect(), and ReceiveLumiSection().