29 #include <QCoreApplication> 52 int lar_wrong_syntax(
int argc,
char *argv[], QString &host, QString &exp,
bool &daemon)
60 if ((argc < 1) || (argc > 6))
67 if (strstr(argv[1],
"-D")) {
75 if (strstr(argv[1],
"-h")) {
78 }
else if (strstr(argv[1],
"-e")) {
86 if (strstr(argv[3],
"-D")) {
88 if (strstr(argv[1],
"-h")) {
91 }
else if (strstr(argv[1],
"-e")) {
102 if (strstr(argv[1],
"-h")) {
104 if (strstr(argv[3],
"-e")) {
110 }
else if (strstr(argv[1],
"-e")) {
112 if (strstr(argv[3],
"-h")) {
123 if (strstr(argv[5],
"-D")) {
125 if (strstr(argv[1],
"-h")) {
127 if (strstr(argv[3],
"-e")) {
133 }
else if (strstr(argv[1],
"-e")) {
135 if (strstr(argv[3],
"-h")) {
162 cout << endl <<
"usage: lemAutoRun [-h Hostname] [-e Experiment] [-D start as daemon]";
163 cout << endl << endl;
173 int main(
int argc,
char *argv[])
176 QCoreApplication app(argc, argv,
false);
196 printf(
"Becoming a daemon...\n");
205 QObject::connect(autoRun, SIGNAL(ErrorMsg(
int,
int,
int,
int,QString)),
206 errorHandler, SLOT(HandleErrors(
int,
int,
int,
int,QString)));
208 QObject::connect(errorHandler, SIGNAL(Terminate()),
209 autoRun, SLOT(DisconnectAndQuit()));
235 QObject::connect(autoRunParser, SIGNAL(ParseError(
int,
int,
int,
int,QString)),
236 autoRun, SLOT(HandleParseError(
int,
int,
int,
int,QString)));
239 QObject::connect(autoRunParser, SIGNAL(ParseError(
int,
int,
int,
int,QString)),
240 errorHandler, SLOT(HandleErrors(
int,
int,
int,
int,QString)));
250 autoRunParser->
Parse();
261 cm_msg(MERROR,
"lemAutoRun",
"lemAutoRun is NOT idle?! Something is wrong, please check.");
269 delete autoRunParser;
270 if (autoRunCmdVector)
271 delete autoRunCmdVector;
QString * GetXMLAutoRunFln()
QString GetUserAutoRunSeqFln()
PLemAutoRun::GetUserAutoRunSeqFln.
int main(int argc, char *argv[])
void FeedLiveDataAutoRun()
PLemAutoRun::FeedLiveDataAutoRun.
void SetAutoRunSeq(PAutoRunCmdVector *arcv)
QVector< AutoRunCmd > PAutoRunCmdVector
INT ss_daemon_init(BOOL keep_stdout)
int lar_wrong_syntax(int argc, char *argv[], QString &host, QString &exp, bool &daemon)
void SetOdbTagVec(POdbTagVector *otv)
QVector< OdbTag > POdbTagVector
QString * GetXMLSchemaFln()