List of clients.  
 More...
#include <JClientList.hh>
 | 
|   | JClientList () | 
|   | Default constructor.  
  | 
|   | 
| std::pair< iterator, bool >  | insert (const JClient &client) | 
|   | Insert client.  
  | 
|   | 
| iterator  | find (const JClient &client) | 
|   | Find client.  
  | 
|   | 
| iterator  | find (const std::string &buffer) | 
|   | Find client by its full name.  
  | 
|   | 
| void  | start () | 
|   | Start processes.  
  | 
|   | 
| void  | stop (const int signal=-9) | 
|   | Stop processes.  
  | 
|   | 
| unsigned int  | count (const JClient::JMode mode) const | 
|   | Get number of clients with given mode.  
  | 
|   | 
| unsigned int  | count () const | 
|   | Get number of active clients with born count exceeding died count.  
  | 
|   | 
| unsigned int  | count (const CHSM::state &state) const | 
|   | Get number of active clients in given state.  
  | 
|   | 
List of clients. 
Definition at line 22 of file JClientList.hh.
 
◆ JClientList()
  
  
      
        
          | KM3NETDAQ::JClientList::JClientList  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Default constructor. 
Definition at line 66 of file JClientList.hh.
   66                  :
   69    {}
const JComparator comparator
 
 
 
 
◆ insert()
Insert client. 
- Parameters
 - 
  
  
 
- Returns
 - iterator to client and true if inserted; else false 
 
Definition at line 78 of file JClientList.hh.
   79    {
   80      iterator i = std::lower_bound(this->begin(), this->end(), client, comparator);
   81 
   82      if (i == this->end() || 
comparator(client, *i)) {
 
   83 
   85 
   86        return std::make_pair(i, true);
   87 
   88      } else {
   89 
   90        return std::make_pair(i, false);
   91      }
   92    }
 
 
 
◆ find() [1/2]
Find client. 
- Parameters
 - 
  
  
 
- Returns
 - iterator to client 
 
Definition at line 101 of file JClientList.hh.
  102    {
  103      iterator i = std::lower_bound(this->begin(), this->end(), client, comparator);
  104 
  105      if (i != this->end() && !
comparator(*i, client))
 
  106        return i;
  107      else
  108        return this->end();
  109    }
 
 
 
◆ find() [2/2]
  
  
      
        
          | iterator KM3NETDAQ::JClientList::find  | 
          ( | 
          const std::string & |           buffer | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Find client by its full name. 
- Parameters
 - 
  
    | buffer | full name of client (possibly followed by more text)  | 
  
   
- Returns
 - position of client (or end) 
 
Definition at line 118 of file JClientList.hh.
  119    {
  121 
  122      iterator i = std::lower_bound(this->begin(), this->end(), full_name, comparator);
  123 
  124      if (i != this->end() && !
comparator(*i, full_name))
 
  125        return i;
  126      else
  127        return this->end();
  128    }
std::string getFullName(const std::string &hostname, const std::string &name)
Get full name of run control client.
 
 
 
 
◆ start()
  
  
      
        
          | void KM3NETDAQ::JClientList::start  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Start processes. 
Definition at line 134 of file JClientList.hh.
  135    {
  136      for (iterator i = this->begin(); i != this->end(); ++i) {
  137        if (i->getMode() == JClient::ACTIVE) {
  138          i->start();
  139        }
  140      }
  141    }
 
 
 
◆ stop()
  
  
      
        
          | void KM3NETDAQ::JClientList::stop  | 
          ( | 
          const int |           signal = -9 | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Stop processes. 
- Parameters
 - 
  
  
 
Definition at line 149 of file JClientList.hh.
  150    {
  151      for (iterator i = this->begin(); i != this->end(); ++i) {
  152        if (i->getBorn() > i->getDied()) {
  153          i->stop(signal);
  154        }
  155      }
  156    }
 
 
 
◆ count() [1/3]
  
  
      
        
          | unsigned int KM3NETDAQ::JClientList::count  | 
          ( | 
          const JClient::JMode |           mode | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get number of clients with given mode. 
- Parameters
 - 
  
  
 
- Returns
 - number of clients 
 
Definition at line 165 of file JClientList.hh.
  166    {
  168 
  169      for (const_iterator i = this->begin(); i != this->end(); ++i) {
  170        if (i->getMode() == mode) {
  172        }
  173      }
  174 
  176    }
 
 
 
◆ count() [2/3]
  
  
      
        
          | unsigned int KM3NETDAQ::JClientList::count  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get number of active clients with born count exceeding died count. 
- Returns
 - number of clients 
 
Definition at line 184 of file JClientList.hh.
  185    {
  187 
  188      for (const_iterator i = this->begin(); i != this->end(); ++i) {
  189        if (i->getMode() == JClient::ACTIVE && i->getBorn() > i->getDied()) {
  191        }
  192      }
  193 
  195    }
 
 
 
◆ count() [3/3]
  
  
      
        
          | unsigned int KM3NETDAQ::JClientList::count  | 
          ( | 
          const CHSM::state & |           state | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get number of active clients in given state. 
- Parameters
 - 
  
  
 
- Returns
 - number of clients 
 
Definition at line 204 of file JClientList.hh.
  205    {
  207 
  208      for (const_iterator i = this->begin(); i != this->end(); ++i) {
  209        if (i->getMode() == JClient::ACTIVE && i->getStatename() == 
getStateName(state.name())) {
 
  211        }
  212      }
  213 
  215    }
std::string getStateName(const std::string &name)
Get name of state.
 
 
 
 
◆ comparator
The documentation for this class was generated from the following file: