00001 #ifndef _DAQ_H_
00002 #define _DAQ_H_
00003
00004 #include <iostream>
00005 #include <sstream>
00006 #include <fstream>
00007 #include <cstring>
00008 #include "../db/DBConnection.h"
00009 #include "Job.h"
00010
00011 using namespace std;
00012
00016 class Daq{
00017
00018 private :
00019
00020 int id;
00021 int status;
00022 string configName;
00023 string host;
00024 string xml;
00025 string comment;
00026 string name;
00027 string creationDate;
00028 vector<Job*> jobList;
00029
00030 public :
00031
00032 Daq(string n);
00033 ~Daq();
00034
00035 void setConfigName(string s);
00040 void setStatus(int s);
00045 void setHost(string h);
00050 void setXML(string fileName) throw (ILCException::Exception);
00051 void setComment(string c);
00052
00053 string getName();
00054 string getTime();
00055 string getConfigName();
00056 int getStatus();
00057 string getHost();
00062 string getXML();
00063 string getComment();
00064
00068 static Daq* getDaq(string n) throw (ILCException::Exception);
00069
00070 static string getNameFromId(int i) throw (ILCException::Exception);
00071
00075 void uploadToDatabase() throw (ILCException::Exception);
00076
00081 void addJob(Job* j);
00082
00087 vector<Job*> getJobs();
00088
00092 static string getStatusDefinition(int val) throw (ILCException::Exception);
00093
00097 static vector<string> getListOfDaqNames() throw (ILCException::Exception);
00098
00099 };
00100 #endif