5322{
5326
5327#ifdef HAVE_PVM
5329
5334 }
5336#endif
5337
5338#ifdef HAVE_ROOT
5341
5343
5344
5345 clp.root_port = 9090;
5346#endif
5347
5348
5350 sizeof(
clp.exp_name));
5351
5352#ifdef HAVE_HBOOK
5353
5355#endif
5356
5357
5360 return 1;
5361
5362
5364 printf(
"Becoming a daemon...\n");
5367 }
5368
5369
5370 if (
clp.pvm_buf_size == 0)
5371 clp.pvm_buf_size = 512 * 1024;
5372 else
5373 clp.pvm_buf_size *= 1024;
5376 return 1;
5377 }
5378
5379
5380 clp.online = (
clp.input_file_name[0][0] == 0);
5381
5382#ifdef HAVE_HBOOK
5383
5386#endif
5387
5388#ifdef HAVE_PVM
5391 return 1;
5392#endif
5393
5394
5396 if (
clp.host_name[0])
5397 printf(
"Connect to experiment %s on host %s...",
clp.exp_name,
clp.host_name);
5398 else
5399 printf(
"Connect to experiment %s...",
clp.exp_name);
5400 }
5401
5405
5407 printf(
"\nError: Experiment \"%s\" not defined.\n",
clp.exp_name);
5408 if (
getenv(
"MIDAS_DIR")) {
5410 ("Note that \"MIDAS_DIR\" is defined, which results in a single experiment\n");
5412 ("called \"Default\". If you want to use the \"exptab\" file, undefine \"MIDAS_DIR\".\n");
5413 }
5414 return 1;
5417 printf(
"\nError: %s\n", s.c_str());
5418 return 1;
5419 }
5420
5423
5424
5426
5429
5431
5433
5437 printf(
"An analyzer named \"%s\" is already running in this experiment.\n",
5440 ("Please select another analyzer name in analyzer.c or stop other analyzer.\n");
5441 return 1;
5442 }
5443
5444
5449 printf(
"Failed to start local RPC server");
5450 return 1;
5451 }
5452 } else {
5456
5458
5461
5464 printf(
"Previous analyzer stopped\n");
5465 }
5466 }
5467 }
5468 }
5469
5470#ifdef HAVE_HBOOK
5471
5473#endif
5474
5475
5477
5478
5481
5482
5485
5486
5489 return 1;
5490 }
5491
5492
5499
5500#ifdef HAVE_ROOT
5501
5503 gROOT->GetRootFolder()->AddFolder(
"histos",
"MIDAS Analyzer Histograms");
5506
5507
5510
5513
5515
5516
5519
5520#endif
5521
5522#ifdef HAVE_HBOOK
5523
5526
5529
5531#endif
5532
5533#ifdef HAVE_HBOOK
5534
5538 } else {
5540 strcpy(
str,
"OFLN");
5542 printf(
"\nGLOBAL MEMORY NAME = %s\n",
"OFLN");
5543 } else
5545 }
5546#endif
5547
5548
5551 return 1;
5552 }
5553
5554
5557
5558
5560
5561
5564
5565
5566
5569 else
5571
5572
5575
5576
5578
5579
5582
5583#ifdef HAVE_PVM
5584
5586
5587
5589
5590
5593
5594#endif
5595
5596
5598
5599#ifdef HAVE_ROOT
5603#endif
5604
5605 return 0;
5606}
INT cm_register_transition(INT transition, INT(*func)(INT, char *), INT sequence_number)
INT cm_shutdown(const char *name, BOOL bUnique)
INT cm_register_function(INT id, INT(*func)(INT, void **))
INT cm_connect_experiment1(const char *host_name, const char *default_exp_name, const char *client_name, void(*func)(char *), INT odb_size, DWORD watchdog_timeout)
INT cm_cleanup(const char *client_name, BOOL ignore_timeout)
INT cm_disconnect_experiment(void)
INT cm_get_environment(char *host_name, int host_name_size, char *exp_name, int exp_name_size)
INT cm_set_watchdog_params(BOOL call_watchdog, DWORD timeout)
INT cm_exist(const char *name, BOOL bUnique)
INT ss_daemon_init(BOOL keep_stdout)
std::string cm_get_error(INT code)
INT db_get_record1(HNDLE hDB, HNDLE hKey, void *data, INT *buf_size, INT align, const char *rec_str)
INT db_set_record(HNDLE hDB, HNDLE hKey, void *data, INT buf_size, INT align)
#define RPC_ANA_CLEAR_HISTOS
void register_requests(void)
INT init_module_parameters(BOOL bclose)
INT tr_stop(INT rn, char *error)
INT tr_start(INT rn, char *error)
INT tr_pause(INT rn, char *error)
INT tr_resume(INT rn, char *error)
INT getparam(int argc, char **argv)
#define DEFAULT_WATCHDOG_TIMEOUT
#define ANA_OUTPUT_INFO_STR
#define DEFAULT_RPC_TIMEOUT
TObjArray * gHistoFolderStack
char global_memory_name[8]