1 #ifndef __JRUNCONTROLTOOLKIT__ 
    2 #define __JRUNCONTROLTOOLKIT__ 
  123       if (sep != string::npos) {
 
  125         istringstream(buffer.substr(sep + 1)) >> 
object.
event_number;
 
  127         object.event_name   = buffer.substr(0, sep);
 
  131         object.event_name   = buffer;
 
  132         object.event_number = -1;
 
  167       out << 
object.event_name;
 
  193                                     const std::string& process) 
 
  202     if (j != string::npos) {
 
  203       buffer.replace(j, 1, process);
 
  219                                  const std::string& name)
 
  221     using namespace JSYSTEM;
 
  245     return buffer.substr(0, j);
 
  271             const std::string& extension = 
"root")
 
  274       this->unique_id = -1;
 
  276       this->extension = extension;
 
  291             const std::string& extension = 
"root")
 
  294       this->unique_id = unique_id;
 
  296       this->extension = extension;
 
  307       *
this = valueOf(file_name);
 
  334       string buffer(file_name);
 
  336       for (string::iterator i = buffer.begin(); i != buffer.end(); ++i) {
 
  342       istringstream is(buffer);
 
  346         size_t pos = result.
path.find(getPrefix());     
 
  348         if (pos == string::npos) {
 
  349           pos = result.
path.rfind(
"/");                 
 
  352         if (pos != string::npos) {
 
  353           result.
path.erase(pos);
 
  356         if (!(is >> result.
run)) {
 
  373       throw JIOException(
"JDAQRun::valueOf() error parsing " + buffer);
 
  392         if (*path.rbegin() != 
'/') {
 
  398          << 
"_" << setw(8) << setfill(
'0') << unique_id
 
  399          << 
"_" << setw(8) << setfill(
'0') << run
 
  414     static inline std::string 
getFilename(
const std::string& path, 
const int unique_id, 
const int run)
 
  440                            const std::string& name)
 
  443     using namespace JSYSTEM;
 
  451     if (pos != string::npos) {
 
  452       os << name.substr(pos + 1, 4);
 
  455     return JTag(os.str());
 
  482                 const std::string& key = 
"") :
 
  496       using namespace JSYSTEM;
 
  502       return JTag(os.str());
 
  572       out << static_cast<const JHostname&>(object);
 
  593     static const string target = 
"Operational.";
 
  595     string buffer = name;
 
  597     const string::size_type pos = buffer.find(
target);
 
  599     if (pos != string::npos) 
 
  600       return buffer.erase(pos, 
target.size());
 
int getIPnumber(const std::string &host_name)
Get IP number. 
const std::string & getName() const 
Get event name. 
std::string getProcessName(const std::string &name, const std::string &process)
Get process name of run control client. 
friend std::istream & operator>>(std::istream &in, JDAQProcess &object)
Read process from input stream. 
static std::string getFilename(const std::string &path, const int unique_id, const int run)
Get file name of run. 
JTag getUniqueTag(const std::string &hostname, const std::string &name)
Get unique tag of run control client. 
static const char EVENTNAME_DELIMETER
std::string extension
file name extension 
int unique_id
unique identifier 
std::string getIPaddress(const int ip)
Get IP address (decimal-dot notation). 
static const std::string TOKEN_DELIMETER
unsigned short getSubaddress(const int ip)
Get host identifier within network. 
Auxiliary data structure for hostname and port number. 
Simple data structure for DAQ run. 
JDAQRun(const char *file_name)
Constructor. 
static JEvent_t toValue(const std::string &buffer)
Convert string to event. 
std::string index
index in process list 
std::string path
directory path 
std::string getStateName(const std::string &name)
Get name of state. 
static const std::string RUN_CONTROL_CLIENT
Auxiliary class for itemization of process list. 
friend std::ostream & operator<<(std::ostream &out, const JDAQProcess &object)
Write process to output stream. 
JDAQProcess()
Default constructor. 
static const std::string CLIENTNAME_DELIMETER
JDAQRun(const std::string &path, const int run, const std::string &extension="root")
Constructor . 
bool equals(int port) const 
Test whether given port equals. 
Auxiliary class for handling event name and optional number. 
friend std::istream & operator>>(std::istream &in, JEvent_t &object)
Read event name and optional number from input stream. 
JDAQProcess(const JHostname &hostname, const std::string &key="")
Constructor. 
char getTokenDelimeter()
Get the token delimeter for command messages. 
JTag getUniqueTag() const 
Get unique tag. 
char getEventnameDelimeter()
Get the event name delimeter. 
JEvent_t()
Default constructor. 
char getWildCard()
Get the wild card. 
bool equals(const JTag &tag) const 
Test whether given tag equals. 
int getNumber() const 
Get event number. 
static const char * getPrefix()
Get file name prefix. 
static const char WILD_CARD
static JDAQRun valueOf(const std::string &file_name)
Extract DAQ run parameters. 
std::string toString() const 
Convert DAQ run to string. 
friend std::ostream & operator<<(std::ostream &out, const JEvent_t &object)
Write event to output stream. 
JDAQRun(const std::string &path, const int unique_id, const int run, const std::string &extension="root")
Constructor . 
std::string getFullName(const std::string &hostname, const std::string &name)
Get full name of run control client. 
JDAQRun()
Default constructor . 
bool equals(const JHostname &hostname) const 
Test whether given host name equals. 
Hostname and IP address functions. 
JEvent_t(const std::string &name, const int number)
Constructor.