Public Member Functions | Private Attributes | List of all members
dbutils::daqappmgr::ConfiguredHosts Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-02/DatabaseUtils/cxx/include/DAQAppMgr/ConfiguredHosts.h"

Public Member Functions

 ConfiguredHosts (const std::string &detectorName, int partitionNumber=0, const bool &useDBData=false)
 
bool hasValidData () const
 
boost::shared_ptr< HostgetHostByName (const std::string &hostName) const
 
void _addHost (boost::shared_ptr< Host > host)
 

Private Attributes

bool _hasValidData
 
std::vector< boost::shared_ptr< Host > > _hostList
 

Detailed Description

Container class for the full set of hosts that are used in the DAQ system.

Author
Kurt Biery
Version
Revision
1.1.18.1
Date
2019/09/27 00:07:03

Definition at line 19 of file ConfiguredHosts.h.

Constructor & Destructor Documentation

dbutils::daqappmgr::ConfiguredHosts::ConfiguredHosts ( const std::string detectorName,
int  partitionNumber = 0,
const bool &  useDBData = false 
)

Creates a new instance based on the specified detector name (NDOS, NearDet, FarDet) and partition number

Definition at line 16 of file ConfiguredHosts.cpp.

References _hasValidData, plot_validation_datamc::fname, getHostByName(), and string.

Member Function Documentation

void dbutils::daqappmgr::ConfiguredHosts::_addHost ( boost::shared_ptr< Host host)

Adds the specified type to the list

Definition at line 46 of file ConfiguredHosts.cpp.

References _hasValidData, and _hostList.

Referenced by getHostByName(), and hasValidData().

47 {
48  if (host.get() == 0) {return;}
49 
50  _hasValidData = true;
51 
52  _hostList.push_back(host);
53 }
std::vector< boost::shared_ptr< Host > > _hostList
boost::shared_ptr< Host > dbutils::daqappmgr::ConfiguredHosts::getHostByName ( const std::string hostName) const

Fetches the host with the specified name.

Definition at line 27 of file ConfiguredHosts.cpp.

References _addHost(), _hasValidData, _hostList, compare_h5_caf::idx, and makeTrainCVSamples::int.

Referenced by ConfiguredHosts(), and hasValidData().

28 {
29  boost::shared_ptr<Host> hostPtr;
30  if (! _hasValidData) {return hostPtr;}
31 
32  for (int idx = 0; idx < (int) _hostList.size(); ++idx) {
33  if (_hostList[idx]->getHostName() == hostName) {
34  hostPtr = _hostList[idx];
35  break;
36  }
37  }
38 
39  return hostPtr;
40 }
std::vector< boost::shared_ptr< Host > > _hostList
bool dbutils::daqappmgr::ConfiguredHosts::hasValidData ( ) const
inline

Member Data Documentation

bool dbutils::daqappmgr::ConfiguredHosts::_hasValidData
private

Definition at line 48 of file ConfiguredHosts.h.

Referenced by _addHost(), ConfiguredHosts(), getHostByName(), and hasValidData().

std::vector<boost::shared_ptr<Host> > dbutils::daqappmgr::ConfiguredHosts::_hostList
private

Definition at line 50 of file ConfiguredHosts.h.

Referenced by _addHost(), and getHostByName().


The documentation for this class was generated from the following files: