ARB
Macros | Functions | Variables
PT_main.cxx File Reference
#include "probe.h"
#include <PT_server_prototypes.h>
#include "pt_prototypes.h"
#include "PT_mem.h"
#include <BI_basepos.hxx>
#include <arbdbt.h>
#include <arb_file.h>
#include <arb_defs.h>
#include <arb_sleep.h>
#include <servercntrl.h>
#include <server.h>
#include <client.h>
#include <struct_man.h>
#include <ut_valgrinded.h>
#include <ptclean.h>
#include <unistd.h>
#include <sys/stat.h>
#include <time.h>
Include dependency graph for PT_main.cxx:

Go to the source code of this file.

Macros

#define MAX_TRY   10
 
#define TIME_OUT   1000*60*60*24
 
#define MAX_INAME_LEN   30
 
#define MAX_ONAME_LEN   30
 
#define MAX_GNAME_LEN   1024
 

Functions

void PT_init_psg ()
 
void PT_exit_psg ()
 
static void PT_exit ()
 
static ARB_ERROR pt_init_main_struct (PT_main *, const char *filename)
 
int server_shutdown (PT_main *, aisc_string passwd)
 
int broadcast (PT_main *main, int)
 
const charfind_sep (const char *str, char sep)
 
bool copy_to_buf (const char *start, const char *behindEnd, int MAXLEN, char *destBuf)
 
static __ATTR__USERESULT ARB_ERROR parse_names_into_gene_struct (const char *map_str, gene_struct_list &listOfGenes)
 
static GB_ERROR PT_init_map ()
 
static __ATTR__USERESULT ARB_ERROR start_pt_server (const char *socket_name, const char *arbdb_name, const char *pt_name, const char *exename)
 
static int get_DB_state (GBDATA *gb_main, ARB_ERROR &error)
 
static GB_ERROR set_DB_state (GBDATA *gb_main, int dbstate)
 
static __ATTR__USERESULT ARB_ERROR run_command (const char *exename, const char *command, const arb_params *params)
 
int ARB_main (int argc, char *argv[])
 

Variables

struct probe_struct_global psg
 
int gene_flag = 0
 
PT_main * aisc_main
 
static time_t startTime
 
static gene_struct_list all_gene_structs
 
gene_struct_index_arb gene_struct_arb2internal
 
gene_struct_index_internal gene_struct_internal2arb
 
Memory MEM
 
static bool psg_initialized = false
 

Macro Definition Documentation

#define MAX_TRY   10

Definition at line 33 of file PT_main.cxx.

#define TIME_OUT   1000*60*60*24

Definition at line 34 of file PT_main.cxx.

Referenced by start_pt_server().

#define MAX_INAME_LEN   30
#define MAX_ONAME_LEN   30
#define MAX_GNAME_LEN   1024

Function Documentation

void PT_init_psg ( void  )

Definition at line 131 of file PT_main.cxx.

References psg, psg_initialized, pt_assert, and probe_struct_global::setup().

Referenced by ARB_main().

void PT_exit_psg ( void  )

Definition at line 137 of file PT_main.cxx.

References probe_struct_global::cleanup(), Memory::clear(), psg, psg_initialized, and pt_assert.

Referenced by PT_exit().

static void PT_exit ( )
static

Definition at line 146 of file PT_main.cxx.

References aisc_main, psg_initialized, and PT_exit_psg().

Referenced by ARB_main(), and server_shutdown().

static ARB_ERROR pt_init_main_struct ( PT_main *  ,
const char filename 
)
static
int server_shutdown ( PT_main *  ,
aisc_string  passwd 
)
int broadcast ( PT_main *  main,
int   
)

Definition at line 190 of file PT_main.cxx.

References aisc_broadcast(), probe_struct_global::com_so, and psg.

const char* find_sep ( const char str,
char  sep 
)
inline

Definition at line 198 of file PT_main.cxx.

Referenced by parse_names_into_gene_struct().

bool copy_to_buf ( const char start,
const char behindEnd,
int  MAXLEN,
char destBuf 
)
inline

Definition at line 212 of file PT_main.cxx.

References start.

Referenced by parse_names_into_gene_struct().

static __ATTR__USERESULT ARB_ERROR parse_names_into_gene_struct ( const char map_str,
gene_struct_list listOfGenes 
)
static
static GB_ERROR PT_init_map ( )
static
static __ATTR__USERESULT ARB_ERROR start_pt_server ( const char socket_name,
const char arbdb_name,
const char pt_name,
const char exename 
)
static
static int get_DB_state ( GBDATA gb_main,
ARB_ERROR error 
)
static
static GB_ERROR set_DB_state ( GBDATA gb_main,
int  dbstate 
)
static
static __ATTR__USERESULT ARB_ERROR run_command ( const char exename,
const char command,
const arb_params params 
)
static
int ARB_main ( int  argc,
char argv[] 
)

Variable Documentation

struct probe_struct_global psg
int gene_flag = 0
PT_main* aisc_main

Definition at line 41 of file PT_main.cxx.

Referenced by ARB_main(), names_destroy_locs(), PT_exit(), run_command(), and start_pt_server().

time_t startTime
static

Definition at line 43 of file PT_main.cxx.

Referenced by ARB_main(), and start_pt_server().

gene_struct_list all_gene_structs
static

Definition at line 45 of file PT_main.cxx.

Referenced by PT_init_map().

gene_struct_index_arb gene_struct_arb2internal

Definition at line 46 of file PT_main.cxx.

Referenced by get_gene_struct_by_arb_species_gene_name(), and PT_init_map().

gene_struct_index_internal gene_struct_internal2arb

Definition at line 47 of file PT_main.cxx.

Referenced by get_gene_struct_by_internal_gene_name(), and PT_init_map().

Memory MEM
bool psg_initialized = false
static

Definition at line 130 of file PT_main.cxx.

Referenced by PT_exit(), PT_exit_psg(), and PT_init_psg().