1 #ifndef __JRUNCONTROLTOOLKIT__ 
    2 #define __JRUNCONTROLTOOLKIT__ 
   72                                     const std::string& process) 
 
   81     if (
j != string::npos) {
 
   82       buffer.replace(
j, 1, process);
 
   98                                  const std::string& name)
 
  124     return buffer.substr(0, 
j);
 
  213       string buffer(file_name);
 
  215       for (string::iterator i = buffer.begin(); i != buffer.end(); ++i) {
 
  221       istringstream is(buffer);
 
  227         if (pos == string::npos) {
 
  228           pos = 
result.path.rfind(
"/");                 
 
  231         if (pos != string::npos) {
 
  235         if (!(is >> 
result.run)) {
 
  245         if (!
result.extension.empty() && 
result.extension[0] == 
'.') {
 
  246           result.extension.erase(0, 1);
 
  271         if (*
path.rbegin() != 
'/') {
 
  277          << 
"_" << setw(8) << setfill(
'0') << 
unique_id 
  278          << 
"_" << setw(8) << setfill(
'0') << 
run 
  319                            const std::string& name)
 
  330     if (pos != string::npos) {
 
  331       os << name.substr(pos + 1, 4);
 
  334     return JTag(os.str());
 
  361                 const std::string& key = 
"") :
 
  381       return JTag(os.str());
 
  451       out << static_cast<const JHostname&>(
object);
 
  472     static const string target = 
"Operational.";
 
  474     string buffer = name;
 
  476     const string::size_type pos = buffer.find(
target);
 
  478     if (pos != string::npos) 
 
  479       return buffer.erase(pos, 
target.size());
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
 
Hostname and IP address functions.
 
Auxiliary class for itemization of process list.
 
JTag getUniqueTag() const
Get unique tag.
 
bool equals(const JTag &tag) const
Test whether given tag equals.
 
JDAQProcess()
Default constructor.
 
bool equals(const JHostname &hostname) const
Test whether given host name equals.
 
friend std::istream & operator>>(std::istream &in, JDAQProcess &object)
Read process from input stream.
 
bool equals(int port) const
Test whether given port equals.
 
friend std::ostream & operator<<(std::ostream &out, const JDAQProcess &object)
Write process to output stream.
 
std::string index
index in process list
 
JDAQProcess(const JHostname &hostname, const std::string &key="")
Constructor.
 
Auxiliary classes and methods for operating system calls.
 
unsigned short getSubaddress(const int ip)
Get host identifier within network.
 
std::string getIPaddress(const int ip)
Get IP address (decimal-dot notation).
 
int getIPnumber(const std::string &host_name)
Get IP number.
 
KM3NeT DAQ data structures and auxiliaries.
 
std::string getFullName(const std::string &hostname, const std::string &name)
Get full name of run control client.
 
static const std::string RUN_CONTROL_CLIENT
 
static const std::string TOKEN_DELIMETER
 
JTag getUniqueTag(const std::string &hostname, const std::string &name)
Get unique tag of run control client.
 
static const char WILDCARD
 
std::string getStateName(const std::string &name)
Get name of state.
 
static const char EVENTNAME_DELIMETER
 
std::string getProcessName(const std::string &name, const std::string &process)
Get process name of run control client.
 
char getEventnameDelimeter()
Get the event name delimeter.
 
char getWildCard()
Get the wild card.
 
char getTokenDelimeter()
Get the token delimeter for command messages.
 
static const std::string CLIENTNAME_DELIMETER
 
Auxiliary data structure for hostname and port number.
 
Simple data structure for DAQ run.
 
int unique_id
unique identifier
 
JDAQRun(const char *file_name)
Constructor.
 
static JDAQRun valueOf(const std::string &file_name)
Extract DAQ run parameters.
 
std::string path
directory path
 
static const char * getPrefix()
Get file name prefix.
 
std::string extension
file name extension
 
JDAQRun()
Default constructor .
 
JDAQRun(const std::string &path, const int unique_id, const int run, const std::string &extension="root")
Constructor .
 
std::string toString() const
Convert DAQ run to string.
 
JDAQRun(const std::string &path, const int run, const std::string &extension="root")
Constructor .
 
static std::string getFilename(const std::string &path, const int unique_id, const int run)
Get file name of run.