Go to the documentation of this file.    1 #ifndef __JRUNCONTROLTOOLKIT__ 
    2 #define __JRUNCONTROLTOOLKIT__ 
  125       if (sep != string::npos) {
 
  127         istringstream(buffer.substr(sep + 1)) >> 
object.
event_number;
 
  129         object.event_name   = 
trim(buffer.substr(0, sep));
 
  133         object.event_name   = 
trim(buffer);
 
  134         object.event_number = -1;
 
  169       out << 
object.event_name;
 
  195                                     const std::string& process) 
 
  204     if (
j != string::npos) {
 
  205       buffer.replace(
j, 1, process);
 
  221                                  const std::string& name)
 
  247     return buffer.substr(0, 
j);
 
  273             const std::string& extension = 
"root")
 
  276       this->unique_id = -1;
 
  278       this->extension = extension;
 
  293             const std::string& extension = 
"root")
 
  296       this->unique_id = unique_id;
 
  298       this->extension = extension;
 
  309       *
this = valueOf(file_name);
 
  336       string buffer(file_name);
 
  338       for (string::iterator i = buffer.begin(); i != buffer.end(); ++i) {
 
  344       istringstream is(buffer);
 
  348         size_t pos = 
result.path.find(getPrefix());     
 
  350         if (pos == string::npos) {
 
  351           pos = 
result.path.rfind(
"/");                 
 
  354         if (pos != string::npos) {
 
  358         if (!(is >> 
result.run)) {
 
  368         if (!
result.extension.empty() && 
result.extension[0] == 
'.') {
 
  369           result.extension.erase(0, 1);
 
  375       throw JIOException(
"JDAQRun::valueOf() error parsing " + buffer);
 
  394         if (*path.rbegin() != 
'/') {
 
  400          << 
"_" << setw(8) << setfill(
'0') << unique_id
 
  401          << 
"_" << setw(8) << setfill(
'0') << run
 
  416     static inline std::string 
getFilename(
const std::string& path, 
const int unique_id, 
const int run)
 
  442                            const std::string& name)
 
  453     if (pos != string::npos) {
 
  454       os << name.substr(pos + 1, 4);
 
  457     return JTag(os.str());
 
  484                 const std::string& key = 
"") :
 
  504       return JTag(os.str());
 
  557       in >> static_cast<JHostname&>(
object);
 
  574       out << static_cast<const JHostname&>(
object);
 
  595     static const string target = 
"Operational.";
 
  597     string buffer = name;
 
  599     const string::size_type pos = buffer.find(
target);
 
  601     if (pos != string::npos) 
 
  602       return buffer.erase(pos, 
target.size());
 
 
static const std::string TOKEN_DELIMETER
 
static const char * getPrefix()
Get file name prefix.
 
const std::string & getName() const
Get event name.
 
static const char WILD_CARD
 
static const std::string CLIENTNAME_DELIMETER
 
unsigned short getSubaddress(const int ip)
Get host identifier within network.
 
JDAQRun()
Default constructor .
 
JTag getUniqueTag(const std::string &hostname, const std::string &name)
Get unique tag of run control client.
 
static JDAQRun valueOf(const std::string &file_name)
Extract DAQ run parameters.
 
std::string getIPaddress(const int ip)
Get IP address (decimal-dot notation).
 
Simple data structure for DAQ run.
 
Auxiliary data structure for hostname and port number.
 
static const std::string RUN_CONTROL_CLIENT
 
char getEventnameDelimeter()
Get the event name delimeter.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
JDAQRun(const std::string &path, const int run, const std::string &extension="root")
Constructor .
 
static JEvent_t toValue(const std::string &buffer)
Convert string to event.
 
friend std::istream & operator>>(std::istream &in, JDAQProcess &object)
Read process from input stream.
 
friend std::istream & operator>>(std::istream &in, JEvent_t &object)
Read event name and optional number from input stream.
 
JEvent_t()
Default constructor.
 
std::string getFullName(const std::string &hostname, const std::string &name)
Get full name of run control client.
 
JDAQRun(const char *file_name)
Constructor.
 
Auxiliary classes and methods for operating system calls.
 
int getNumber() const
Get event number.
 
JDAQProcess()
Default constructor.
 
bool equals(const JTag &tag) const
Test whether given tag equals.
 
static std::string getFilename(const std::string &path, const int unique_id, const int run)
Get file name of run.
 
static const char EVENTNAME_DELIMETER
 
JDAQRun(const std::string &path, const int unique_id, const int run, const std::string &extension="root")
Constructor .
 
std::string path
directory path
 
int unique_id
unique identifier
 
bool equals(int port) const
Test whether given port equals.
 
JDAQProcess(const JHostname &hostname, const std::string &key="")
Constructor.
 
friend std::ostream & operator<<(std::ostream &out, const JEvent_t &object)
Write event to output stream.
 
Auxiliary class for handling event name and optional number.
 
std::string getStateName(const std::string &name)
Get name of state.
 
KM3NeT DAQ data structures and auxiliaries.
 
friend std::ostream & operator<<(std::ostream &out, const JDAQProcess &object)
Write process to output stream.
 
JTag getUniqueTag() const
Get unique tag.
 
std::string toString() const
Convert DAQ run to string.
 
char getTokenDelimeter()
Get the token delimeter for command messages.
 
char getWildCard()
Get the wild card.
 
std::string extension
file name extension
 
int getIPnumber(const std::string &host_name)
Get IP number.
 
Auxiliary class for itemization of process list.
 
std::string trim(const std::string &buffer)
Trim string.
 
std::string index
index in process list
 
JEvent_t(const std::string &name, const int number)
Constructor.
 
std::string getProcessName(const std::string &name, const std::string &process)
Get process name of run control client.
 
bool equals(const JHostname &hostname) const
Test whether given host name equals.