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

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

Public Member Functions

 ApplicationType (const std::string &typeName, const std::vector< std::string > &exeNameList, const std::string &startCommand, const std::string &rshCommandForStart, const std::string &stopCommand, const std::string &rshCommandForStop, const bool &supportsStatusRequest, const bool &hasAppNameInProcessString)
 
std::string getTypeName () const
 
std::vector< std::stringgetExeNameList () const
 
std::string getStartCommand () const
 
std::string getRshCommandForStart () const
 
std::string getStopCommand () const
 
std::string getRshCommandForStop () const
 
bool supportsStatusRequest () const
 
bool hasAppNameInProcessString () const
 
void setStartCommand (const std::string &cmd)
 
void setRshCommandForStart (const std::string &cmd)
 
void setStopCommand (const std::string &cmd)
 
void setRshCommandForStop (const std::string &cmd)
 
bool operator== (const ApplicationType &other) const
 
bool operator!= (const ApplicationType &other) const
 
bool operator< (const ApplicationType &other) const
 

Static Public Attributes

static const std::string BNEVB_APPTYPE
 
static const std::string DL_APPTYPE
 
static const std::string DCMAPP_APPTYPE
 
static const std::string GT_APPTYPE
 

Private Attributes

std::string _typeName
 
std::vector< std::string_exeNameList
 
std::string _startCommand
 
std::string _rshCommandForStart
 
std::string _stopCommand
 
std::string _rshCommandForStop
 
bool _supportsStatusRequest
 
bool _hasAppNameInProcessString
 

Detailed Description

Simple container class for the information that describes a type of DAQ application.

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

Definition at line 18 of file ApplicationType.h.

Constructor & Destructor Documentation

dbutils::daqappmgr::ApplicationType::ApplicationType ( const std::string typeName,
const std::vector< std::string > &  exeNameList,
const std::string startCommand,
const std::string rshCommandForStart,
const std::string stopCommand,
const std::string rshCommandForStop,
const bool &  supportsStatusRequest,
const bool &  hasAppNameInProcessString 
)

Creates an instance from the specified values.

Definition at line 15 of file ApplicationType.cpp.

References operator==().

22  :
23  _typeName(typeName), _exeNameList(exeNameList),
24  _startCommand(startCommand),
25  _rshCommandForStart(rshCommandForStart),
26  _stopCommand(stopCommand),
27  _rshCommandForStop(rshCommandForStop),
30 {
31 }
std::vector< std::string > _exeNameList

Member Function Documentation

std::vector<std::string> dbutils::daqappmgr::ApplicationType::getExeNameList ( ) const
inline

Definition at line 45 of file ApplicationType.h.

References _exeNameList.

45 {return _exeNameList;}
std::vector< std::string > _exeNameList
std::string dbutils::daqappmgr::ApplicationType::getRshCommandForStart ( ) const
inline

Definition at line 47 of file ApplicationType.h.

References _rshCommandForStart.

std::string dbutils::daqappmgr::ApplicationType::getRshCommandForStop ( ) const
inline

Definition at line 49 of file ApplicationType.h.

References _rshCommandForStop.

std::string dbutils::daqappmgr::ApplicationType::getStartCommand ( ) const
inline

Definition at line 46 of file ApplicationType.h.

References _startCommand.

std::string dbutils::daqappmgr::ApplicationType::getStopCommand ( ) const
inline

Definition at line 48 of file ApplicationType.h.

References _stopCommand.

std::string dbutils::daqappmgr::ApplicationType::getTypeName ( ) const
inline

Definition at line 44 of file ApplicationType.h.

References _typeName.

bool dbutils::daqappmgr::ApplicationType::hasAppNameInProcessString ( ) const
inline
bool dbutils::daqappmgr::ApplicationType::operator!= ( const ApplicationType other) const

Tests if the specified set is not equal to this one.

Definition at line 65 of file ApplicationType.cpp.

References operator<(), and fhicl::other.

Referenced by operator==(), and setRshCommandForStop().

66 {
67  return !(*this==other);
68 }
bool dbutils::daqappmgr::ApplicationType::operator< ( const ApplicationType other) const

Tests if the specified instance is less than this one.

Definition at line 74 of file ApplicationType.cpp.

References _exeNameList, _hasAppNameInProcessString, _rshCommandForStart, _rshCommandForStop, _startCommand, _stopCommand, _supportsStatusRequest, _typeName, compare_h5_caf::idx, and makeTrainCVSamples::int.

Referenced by operator!=(), and setRshCommandForStop().

75 {
76  if (this->_typeName > other._typeName) {return false;}
77  if (this->_typeName < other._typeName) {return true;}
78  // else _typeName is equal
79 
80  if (this->_exeNameList.size() > other._exeNameList.size()) {return false;}
81  if (this->_exeNameList.size() < other._exeNameList.size()) {return true;}
82  for (int idx = 0; idx < (int) this->_exeNameList.size(); ++idx) {
83  if (this->_exeNameList[idx] > other._exeNameList[idx]) {return false;}
84  if (this->_exeNameList[idx] < other._exeNameList[idx]) {return true;}
85  }
86  // else _exeNameList contents are equal
87 
88  if (this->_startCommand > other._startCommand) {return false;}
89  if (this->_startCommand < other._startCommand) {return true;}
90  // else _startCommand is equal
91 
92  if (this->_rshCommandForStart > other._rshCommandForStart) {return false;}
93  if (this->_rshCommandForStart < other._rshCommandForStart) {return true;}
94  // else _rshCommandForStart is equal
95 
96  if (this->_stopCommand > other._stopCommand) {return false;}
97  if (this->_stopCommand < other._stopCommand) {return true;}
98  // else _stopCommand is equal
99 
100  if (this->_rshCommandForStop > other._rshCommandForStop) {return false;}
101  if (this->_rshCommandForStop < other._rshCommandForStop) {return true;}
102  // else _rshCommandForStop is equal
103 
104  if (! this->_supportsStatusRequest &&
105  other._supportsStatusRequest) {return true;}
106  if (this->_supportsStatusRequest &&
107  ! other._supportsStatusRequest) {return false;}
108  // else _supportsStatusRequest is equal
109 
110  if (! this->_hasAppNameInProcessString &&
111  other._hasAppNameInProcessString) {return true;}
112  else {return false;}
113 }
std::vector< std::string > _exeNameList
bool dbutils::daqappmgr::ApplicationType::operator== ( const ApplicationType other) const

Tests if the specified instance is equal to this one.

Definition at line 37 of file ApplicationType.cpp.

References _exeNameList, _hasAppNameInProcessString, _rshCommandForStart, _rshCommandForStop, _startCommand, _stopCommand, _supportsStatusRequest, _typeName, compare_h5_caf::idx, makeTrainCVSamples::int, and operator!=().

Referenced by ApplicationType(), and setRshCommandForStop().

38 {
39  if (other._supportsStatusRequest &&
40  ! this->_supportsStatusRequest) {return false;}
41  if (! other._supportsStatusRequest &&
42  this->_supportsStatusRequest) {return false;}
43 
44  if (other._hasAppNameInProcessString &&
45  ! this->_hasAppNameInProcessString) {return false;}
46  if (! other._hasAppNameInProcessString &&
47  this->_hasAppNameInProcessString) {return false;}
48 
49  if (other._exeNameList.size() != this->_exeNameList.size()) {return false;}
50  for (int idx = 0; idx < (int) this->_exeNameList.size(); ++idx) {
51  if (other._exeNameList[idx] != this->_exeNameList[idx]) {return false;}
52  }
53 
54  return (other._typeName == this->_typeName &&
55  other._startCommand == this->_startCommand &&
56  other._rshCommandForStart == this->_rshCommandForStart &&
57  other._stopCommand == this->_stopCommand &&
58  other._rshCommandForStop == this->_rshCommandForStop);
59 }
std::vector< std::string > _exeNameList
void dbutils::daqappmgr::ApplicationType::setRshCommandForStart ( const std::string cmd)
inline

Definition at line 57 of file ApplicationType.h.

References _rshCommandForStart, and run_hadd::cmd.

57  {
59  }
string cmd
Definition: run_hadd.py:52
void dbutils::daqappmgr::ApplicationType::setRshCommandForStop ( const std::string cmd)
inline

Definition at line 63 of file ApplicationType.h.

References _rshCommandForStop, run_hadd::cmd, operator!=(), operator<(), operator==(), and fhicl::other.

63  {
65  }
string cmd
Definition: run_hadd.py:52
void dbutils::daqappmgr::ApplicationType::setStartCommand ( const std::string cmd)
inline

Definition at line 54 of file ApplicationType.h.

References _startCommand, and run_hadd::cmd.

54  {
56  }
string cmd
Definition: run_hadd.py:52
void dbutils::daqappmgr::ApplicationType::setStopCommand ( const std::string cmd)
inline

Definition at line 60 of file ApplicationType.h.

References _stopCommand, and run_hadd::cmd.

60  {
61  _stopCommand = cmd;
62  }
string cmd
Definition: run_hadd.py:52
bool dbutils::daqappmgr::ApplicationType::supportsStatusRequest ( ) const
inline

Definition at line 50 of file ApplicationType.h.

References _supportsStatusRequest.

Member Data Documentation

std::vector<std::string> dbutils::daqappmgr::ApplicationType::_exeNameList
private

Definition at line 78 of file ApplicationType.h.

Referenced by getExeNameList(), operator<(), and operator==().

bool dbutils::daqappmgr::ApplicationType::_hasAppNameInProcessString
private

Definition at line 84 of file ApplicationType.h.

Referenced by hasAppNameInProcessString(), operator<(), and operator==().

std::string dbutils::daqappmgr::ApplicationType::_rshCommandForStart
private
std::string dbutils::daqappmgr::ApplicationType::_rshCommandForStop
private
std::string dbutils::daqappmgr::ApplicationType::_startCommand
private

Definition at line 79 of file ApplicationType.h.

Referenced by getStartCommand(), operator<(), operator==(), and setStartCommand().

std::string dbutils::daqappmgr::ApplicationType::_stopCommand
private

Definition at line 81 of file ApplicationType.h.

Referenced by getStopCommand(), operator<(), operator==(), and setStopCommand().

bool dbutils::daqappmgr::ApplicationType::_supportsStatusRequest
private

Definition at line 83 of file ApplicationType.h.

Referenced by operator<(), operator==(), and supportsStatusRequest().

std::string dbutils::daqappmgr::ApplicationType::_typeName
private

Definition at line 77 of file ApplicationType.h.

Referenced by getTypeName(), operator<(), and operator==().

const std::string dbutils::daqappmgr::ApplicationType::BNEVB_APPTYPE
static
const std::string dbutils::daqappmgr::ApplicationType::DCMAPP_APPTYPE
static
const std::string dbutils::daqappmgr::ApplicationType::DL_APPTYPE
static
const std::string dbutils::daqappmgr::ApplicationType::GT_APPTYPE
static

Definition at line 25 of file ApplicationType.h.


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