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

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

Public Member Functions

 ConfiguredApplicationTypes (const std::string &detectorName, int partitionNumber=0, const bool &useDBData=false)
 
bool hasValidData () const
 
boost::shared_ptr< ApplicationTypegetTypeByName (const std::string &typeName) const
 
void _addApplicationType (boost::shared_ptr< ApplicationType > appType)
 

Private Attributes

bool _hasValidData
 
std::vector< boost::shared_ptr< ApplicationType > > _typeList
 

Detailed Description

Container class for the full set of application types that are run in the DAQ system.

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

Definition at line 20 of file ConfiguredApplicationTypes.h.

Constructor & Destructor Documentation

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

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

Definition at line 16 of file ConfiguredApplicationTypes.cpp.

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

Member Function Documentation

void dbutils::daqappmgr::ConfiguredApplicationTypes::_addApplicationType ( boost::shared_ptr< ApplicationType appType)

Adds the specified type to the list

Definition at line 47 of file ConfiguredApplicationTypes.cpp.

References _hasValidData, and _typeList.

Referenced by getTypeByName(), and hasValidData().

48 {
49  if (appType.get() == 0) {return;}
50 
51  _hasValidData = true;
52 
53  _typeList.push_back(appType);
54 }
std::vector< boost::shared_ptr< ApplicationType > > _typeList
boost::shared_ptr< ApplicationType > dbutils::daqappmgr::ConfiguredApplicationTypes::getTypeByName ( const std::string typeName) const

Fetches the application type instance with the specified name.

Definition at line 28 of file ConfiguredApplicationTypes.cpp.

References _addApplicationType(), _hasValidData, _typeList, compare_h5_caf::idx, and makeTrainCVSamples::int.

Referenced by ConfiguredApplicationTypes(), and hasValidData().

29 {
30  boost::shared_ptr<ApplicationType> typePtr;
31  if (! _hasValidData) {return typePtr;}
32 
33  for (int idx = 0; idx < (int) _typeList.size(); ++idx) {
34  if (_typeList[idx]->getTypeName() == typeName) {
35  typePtr = _typeList[idx];
36  break;
37  }
38  }
39 
40  return typePtr;
41 }
std::vector< boost::shared_ptr< ApplicationType > > _typeList
bool dbutils::daqappmgr::ConfiguredApplicationTypes::hasValidData ( ) const
inline

Member Data Documentation

bool dbutils::daqappmgr::ConfiguredApplicationTypes::_hasValidData
private
std::vector<boost::shared_ptr<ApplicationType> > dbutils::daqappmgr::ConfiguredApplicationTypes::_typeList
private

Definition at line 52 of file ConfiguredApplicationTypes.h.

Referenced by _addApplicationType(), and getTypeByName().


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