Midas #define
[The midas.h & midas.c]


Defines

#define STATE_STOPPED   1
#define STATE_PAUSED   2
#define STATE_RUNNING   3
#define FORMAT_MIDAS   1
#define FORMAT_YBOS   2
#define FORMAT_ASCII   3
#define FORMAT_FIXED   4
#define FORMAT_DUMP   5
#define FORMAT_HBOOK   6
#define FORMAT_ROOT   7
#define GET_ALL   (1<<0)
#define GET_SOME   (1<<1)
#define GET_FARM   (1<<2)
#define TID_BYTE   1
#define TID_SBYTE   2
#define TID_CHAR   3
#define TID_WORD   4
#define TID_SHORT   5
#define TID_DWORD   6
#define TID_INT   7
#define TID_BOOL   8
#define TID_FLOAT   9
#define TID_DOUBLE   10
#define TID_BITFIELD   11
#define TID_STRING   12
#define TID_ARRAY   13
#define TID_STRUCT   14
#define TID_KEY   15
#define TID_LINK   16
#define TID_LAST   17
#define SYNC   0
#define MODE_READ   (1<<0)
#define RPC_OTIMEOUT   1
#define WF_WATCH_ME   (1<<0)
#define TR_START   (1<<0)
#define TR_STOP   (1<<1)
#define TR_PAUSE   (1<<2)
#define TR_RESUME   (1<<3)
#define EQ_PERIODIC   (1<<0)
#define EQ_POLLED   (1<<1)
#define EQ_INTERRUPT   (1<<2)
#define EQ_SLOW   (1<<3)
#define EQ_MANUAL_TRIG   (1<<4)
#define EQ_FRAGMENTED   (1<<5)
#define RO_RUNNING   (1<<0)
#define RO_STOPPED   (1<<1)
#define RO_PAUSED   (1<<2)
#define RO_BOR   (1<<3)
#define RO_EOR   (1<<4)
#define RO_PAUSE   (1<<5)
#define RO_RESUME   (1<<6)
#define RO_TRANSITIONS   (RO_BOR|RO_EOR|RO_PAUSE|RO_RESUME)
#define RO_ALWAYS   (0xFF)
#define RO_ODB   (1<<8)
#define MT_ERROR   (1<<0)
#define MT_INFO   (1<<1)
#define MT_DEBUG   (1<<2)
#define MT_USER   (1<<3)
#define MT_LOG   (1<<4)
#define MT_TALK   (1<<5)
#define MT_CALL   (1<<6)
#define MT_ALL   0xFF
#define MERROR   MT_ERROR, __FILE__, __LINE__
#define MINFO   MT_INFO, __FILE__, __LINE__
#define MDEBUG   MT_DEBUG, __FILE__, __LINE__
#define MUSER   MT_USER, __FILE__, __LINE__
#define MLOG   MT_LOG, __FILE__, __LINE__
#define MTALK   MT_TALK, __FILE__, __LINE__
#define MCALL   MT_CALL, __FILE__, __LINE__


Define Documentation

#define ASYNC   1
 

Definition at line 645 of file midas.h.

Referenced by bm_receive_event(), cm_transition(), handFlush(), main(), rpc_send_event(), scheduler(), and source_scan().

#define EQ_FRAGMENTED   (1<<5)
 

Fragmented Event

Definition at line 701 of file midas.h.

Referenced by send_event().

#define EQ_INTERRUPT   (1<<2)
 

Interrupt Event

Definition at line 698 of file midas.h.

Referenced by scheduler().

#define EQ_MANUAL_TRIG   (1<<4)
 

Manual triggered Event

Definition at line 700 of file midas.h.

#define EQ_PERIODIC   (1<<0)
 

Periodic Event

Definition at line 696 of file midas.h.

Referenced by scheduler().

#define EQ_POLLED   (1<<1)
 

Polling Event

Definition at line 697 of file midas.h.

Referenced by scheduler().

#define EQ_SLOW   (1<<3)
 

Slow Control Event

Definition at line 699 of file midas.h.

Referenced by main(), scheduler(), and send_event().

#define EVENTID_ALL   -1
 

Definition at line 814 of file midas.h.

Referenced by bm_match_event(), and cm_msg_register().

#define FORMAT_ASCII   3
 

ASCII format

Definition at line 609 of file midas.h.

#define FORMAT_DUMP   5
 

Dump (detailed ASCII) format

Definition at line 611 of file midas.h.

#define FORMAT_FIXED   4
 

Fixed length binary records

Definition at line 610 of file midas.h.

Referenced by update_odb().

#define FORMAT_HBOOK   6
 

CERN hbook (rz) format

Definition at line 612 of file midas.h.

#define FORMAT_MIDAS   1
 

MIDAS banks

Definition at line 607 of file midas.h.

Referenced by main(), source_scan(), and update_odb().

#define FORMAT_ROOT   7
 

CERN ROOT format

Definition at line 613 of file midas.h.

#define FORMAT_YBOS   2
 

YBOS banks

Definition at line 608 of file midas.h.

Referenced by main(), source_scan(), and update_odb().

#define GET_ALL   (1<<0)
 

get all events (consume)

Definition at line 617 of file midas.h.

Referenced by bm_flush_cache(), bm_remove_event_request(), bm_send_event(), and source_booking().

#define GET_FARM   (1<<2)
 

distribute events over several clients (farming)

Definition at line 619 of file midas.h.

#define GET_SOME   (1<<1)
 

get as much as possible (sampling)

Definition at line 618 of file midas.h.

Referenced by cm_msg_register().

#define MCALL   MT_CALL, __FILE__, __LINE__
 

info message for telephone call

Definition at line 834 of file midas.h.

#define MDEBUG   MT_DEBUG, __FILE__, __LINE__
 

Definition at line 830 of file midas.h.

Referenced by bm_flush_cache(), bm_push_event(), bm_receive_event(), and bm_send_event().

#define MERROR   MT_ERROR, __FILE__, __LINE__
 

Definition at line 828 of file midas.h.

Referenced by al_trigger_alarm(), bm_close_buffer(), bm_flush_cache(), bm_open_buffer(), bm_push_event(), bm_receive_event(), bm_remove_event_request(), bm_request_event(), bm_send_event(), bm_set_cache_size(), bm_skip_event(), cm_check_client(), cm_check_deferred_transition(), cm_cleanup(), cm_connect_experiment1(), cm_get_watchdog_info(), cm_list_experiments(), cm_register_deferred_transition(), cm_set_client_info(), cm_shutdown(), cm_transition(), db_check_record(), db_close_database(), db_copy(), db_create_key(), db_create_link(), db_create_record(), db_delete_key1(), db_enum_key(), db_find_key(), db_get_data(), db_get_data_index(), db_get_key(), db_get_key_info(), db_get_key_time(), db_get_record(), db_get_value(), db_load(), db_lock_database(), db_open_database(), db_open_record(), db_paste(), db_protect_database(), db_save(), db_save_struct(), db_set_data(), db_set_data_index(), db_set_record(), db_set_value(), db_unlock_database(), dm_buffer_create(), el_submit(), handFlush(), interrupt_routine(), main(), rpc_flush_event(), rpc_register_functions(), rpc_send_event(), rpc_set_option(), scheduler(), send_event(), source_booking(), source_scan(), source_unbooking(), tr_prestart(), and update_odb().

#define MINFO   MT_INFO, __FILE__, __LINE__
 

Definition at line 829 of file midas.h.

Referenced by bk_list(), cm_check_client(), cm_cleanup(), cm_connect_experiment1(), cm_disconnect_experiment(), cm_set_client_info(), cm_shutdown(), cm_transition(), main(), and ybk_list().

#define MLOG   MT_LOG, __FILE__, __LINE__
 

info message which is only logged

Definition at line 832 of file midas.h.

#define MODE_ALLOC   (1<<7)
 

Definition at line 653 of file midas.h.

Referenced by db_close_all_records(), db_close_record(), and db_open_record().

#define MODE_DELETE   (1<<2)
 

Definition at line 651 of file midas.h.

Referenced by cm_delete_client_info(), cm_set_client_info(), cm_transition(), db_create_key(), db_delete_key1(), and db_open_database().

#define MODE_EXCLUSIVE   (1<<3)
 

Definition at line 652 of file midas.h.

Referenced by cm_cleanup(), db_create_key(), db_open_record(), db_set_data(), db_set_data_index(), and db_set_value().

#define MODE_READ   (1<<0)
 

Access modes

Definition at line 649 of file midas.h.

Referenced by cm_delete_client_info(), cm_register_deferred_transition(), cm_register_transition(), cm_set_client_info(), cm_set_watchdog_params(), cm_transition(), db_create_key(), db_find_key(), db_get_data(), db_get_data_index(), db_get_value(), db_open_database(), and db_open_record().

#define MODE_WRITE   (1<<1)
 

Definition at line 650 of file midas.h.

Referenced by cm_cleanup(), cm_delete_client_info(), cm_register_deferred_transition(), cm_register_transition(), cm_set_client_info(), cm_set_watchdog_params(), cm_transition(), db_close_all_records(), db_close_record(), db_create_key(), db_open_database(), db_open_record(), db_send_changed_records(), db_set_data(), db_set_data_index(), db_set_value(), and db_update_record().

#define MT_ALL   0xFF
 

Definition at line 826 of file midas.h.

Referenced by cm_connect_experiment1(), and main().

#define MT_CALL   (1<<6)
 

Definition at line 825 of file midas.h.

#define MT_DEBUG   (1<<2)
 

Definition at line 821 of file midas.h.

Referenced by cm_msg_log(), and cm_msg_log1().

#define MT_ERROR   (1<<0)
 

Definition at line 819 of file midas.h.

Referenced by cm_msg(), and cm_msg1().

#define MT_INFO   (1<<1)
 

Definition at line 820 of file midas.h.

#define MT_LOG   (1<<4)
 

Definition at line 823 of file midas.h.

Referenced by cm_msg(), and cm_msg1().

#define MT_TALK   (1<<5)
 

Definition at line 824 of file midas.h.

#define MT_USER   (1<<3)
 

Definition at line 822 of file midas.h.

Referenced by cm_msg(), and cm_msg1().

#define MTALK   MT_TALK, __FILE__, __LINE__
 

info message for speech system

Definition at line 833 of file midas.h.

Referenced by main(), and scheduler().

#define MUSER   MT_USER, __FILE__, __LINE__
 

produced by interactive user

Definition at line 831 of file midas.h.

#define RO_ALWAYS   (0xFF)
 

Always (independent of the run status)

Definition at line 714 of file midas.h.

#define RO_BOR   (1<<3)
 

At the Begin of run

Definition at line 708 of file midas.h.

Referenced by send_all_periodic_events().

#define RO_EOR   (1<<4)
 

At the End of run

Definition at line 709 of file midas.h.

Referenced by send_all_periodic_events().

#define RO_ODB   (1<<8)
 

Submit data to ODB only

Definition at line 716 of file midas.h.

Referenced by interrupt_routine(), scheduler(), and send_event().

#define RO_PAUSE   (1<<5)
 

Before pausing the run

Definition at line 710 of file midas.h.

Referenced by send_all_periodic_events().

#define RO_PAUSED   (1<<2)
 

???

Definition at line 707 of file midas.h.

Referenced by scheduler().

#define RO_RESUME   (1<<6)
 

Before resuming the run

Definition at line 711 of file midas.h.

Referenced by send_all_periodic_events().

#define RO_RUNNING   (1<<0)
 

While running

Definition at line 705 of file midas.h.

Referenced by scheduler().

#define RO_STOPPED   (1<<1)
 

Before stopping the run

Definition at line 706 of file midas.h.

Referenced by scheduler().

#define RO_TRANSITIONS   (RO_BOR|RO_EOR|RO_PAUSE|RO_RESUME)
 

At all transitions

Definition at line 713 of file midas.h.

#define RPC_CLIENT_HANDLE   9
 

Definition at line 665 of file midas.h.

Referenced by cm_get_experiment_database(), and cm_set_client_info().

#define RPC_CONVERT_FLAGS   7
 

Definition at line 663 of file midas.h.

Referenced by bm_receive_event(), db_get_record(), db_set_record(), and db_update_record().

#define RPC_FTCP   1
 

Definition at line 671 of file midas.h.

Referenced by cm_transition(), db_send_changed_records(), and scheduler().

#define RPC_NODELAY   12
 

Definition at line 668 of file midas.h.

Referenced by rpc_set_option().

#define RPC_OCONVERT_FLAG   3
 

Definition at line 659 of file midas.h.

#define RPC_ODB_HANDLE   8
 

Definition at line 664 of file midas.h.

Referenced by cm_get_experiment_database(), and cm_set_client_info().

#define RPC_OHW_TYPE   4
 

Definition at line 660 of file midas.h.

Referenced by cm_connect_experiment1().

#define RPC_OSERVER_NAME   6
 

Definition at line 662 of file midas.h.

#define RPC_OSERVER_TYPE   5
 

Definition at line 661 of file midas.h.

Referenced by bm_check_buffers(), bm_close_buffer(), bm_empty_buffers(), bm_open_buffer(), bm_receive_event(), cm_disconnect_experiment(), cm_set_watchdog_params(), db_close_database(), db_get_record(), db_open_database(), and db_set_record().

#define RPC_OTIMEOUT   1
 

RPC options

Definition at line 657 of file midas.h.

Referenced by cm_transition(), main(), and rpc_set_option().

#define RPC_OTRANSPORT   2
 

Definition at line 658 of file midas.h.

Referenced by cm_transition(), db_send_changed_records(), rpc_set_option(), scheduler(), and update_odb().

#define RPC_SEND_SOCK   10
 

Definition at line 666 of file midas.h.

#define RPC_TCP   0
 

Definition at line 670 of file midas.h.

Referenced by cm_transition(), db_send_changed_records(), scheduler(), and update_odb().

#define RPC_WATCHDOG_TIMEOUT   11
 

Definition at line 667 of file midas.h.

Referenced by cm_set_watchdog_params().

#define STATE_PAUSED   2
 

MIDAS run paused

Definition at line 602 of file midas.h.

Referenced by cm_transition(), and scheduler().

#define STATE_RUNNING   3
 

MIDAS run running

Definition at line 603 of file midas.h.

Referenced by cm_transition(), display(), main(), scheduler(), and tr_prestart().

#define STATE_STOPPED   1
 

MIDAS run stopped

Definition at line 601 of file midas.h.

Referenced by cm_transition(), display(), handFlush(), main(), and scheduler().

#define SYNC   0
 

Synchronous / Asynchronous flags

Definition at line 644 of file midas.h.

Referenced by cm_check_deferred_transition(), cm_msg(), cm_msg1(), interrupt_routine(), main(), scheduler(), send_event(), and source_scan().

#define TID_ARRAY   13
 

array with unknown contents

Definition at line 636 of file midas.h.

#define TID_BITFIELD   11
 

32 Bits Bitfield 0 111... (32)

Definition at line 634 of file midas.h.

Referenced by db_sprintf().

#define TID_BOOL   8
 

four bytes bool 0 1

Definition at line 631 of file midas.h.

Referenced by al_trigger_alarm(), bk_swap(), db_sprintf(), and scheduler().

#define TID_BYTE   1
 

unsigned byte 0 255

Definition at line 624 of file midas.h.

Referenced by db_sprintf().

#define TID_CHAR   3
 

single character 0 255

Definition at line 626 of file midas.h.

Referenced by db_sprintf().

#define TID_DOUBLE   10
 

8 Byte float format

Definition at line 633 of file midas.h.

Referenced by bk_swap(), and db_sprintf().

#define TID_DWORD   6
 

four bytes 0 2^32-1

Definition at line 629 of file midas.h.

Referenced by bk_swap(), bm_receive_event(), cm_register_deferred_transition(), cm_register_transition(), cm_set_client_info(), cm_transition(), db_sprintf(), and db_update_record().

#define TID_FLOAT   9
 

4 Byte float format

Definition at line 632 of file midas.h.

Referenced by bk_swap(), and db_sprintf().

#define TID_INT   7
 

signed dword -2^31 2^31-1

Definition at line 630 of file midas.h.

Referenced by al_trigger_alarm(), bk_swap(), cm_connect_client(), cm_connect_experiment1(), cm_delete_client_info(), cm_register_deferred_transition(), cm_set_client_info(), cm_set_watchdog_params(), cm_shutdown(), cm_transition(), db_sprintf(), el_submit(), main(), and scheduler().

#define TID_KEY   15
 

key in online database

Definition at line 638 of file midas.h.

Referenced by cm_transition(), db_check_record(), db_copy(), db_create_key(), db_create_record(), db_delete_key1(), db_enum_key(), db_find_key(), db_get_data(), db_get_data_index(), db_get_key_info(), db_get_record(), db_get_record_size(), db_open_database(), db_paste(), db_set_data(), db_set_data_index(), db_set_record(), db_set_value(), and main().

#define TID_LAST   17
 

end of TID list indicator

Definition at line 640 of file midas.h.

Referenced by db_check_record(), db_create_key(), and db_paste().

#define TID_LINK   16
 

link in online database

Definition at line 639 of file midas.h.

Referenced by db_check_record(), db_copy(), db_create_key(), db_create_link(), db_delete_key1(), db_enum_key(), db_find_key(), db_get_value(), db_paste(), db_set_data_index(), db_set_value(), db_sprintf(), and update_odb().

#define TID_SBYTE   2
 

signed byte -128 127

Definition at line 625 of file midas.h.

Referenced by db_sprintf().

#define TID_SHORT   5
 

signed word -32768 32767

Definition at line 628 of file midas.h.

Referenced by bk_swap(), bm_receive_event(), and db_sprintf().

#define TID_STRING   12
 

zero terminated string

Definition at line 635 of file midas.h.

Referenced by al_trigger_alarm(), cm_check_client(), cm_connect_client(), cm_connect_experiment1(), cm_exist(), cm_get_client_info(), cm_msg_log(), cm_msg_log1(), cm_msg_retrieve(), cm_set_client_info(), cm_shutdown(), cm_transition(), db_check_record(), db_copy(), db_create_key(), db_get_value(), db_paste(), db_set_data_index(), db_set_value(), db_sprintf(), el_submit(), logger_root(), main(), tr_prestart(), and update_odb().

#define TID_STRUCT   14
 

structure with fixed length

Definition at line 637 of file midas.h.

Referenced by bk_close(), and update_odb().

#define TID_WORD   4
 

two bytes 0 65535

Definition at line 627 of file midas.h.

Referenced by bk_swap(), and db_sprintf().

#define TR_DEFERRED   (1<<12)
 

Definition at line 692 of file midas.h.

Referenced by cm_check_deferred_transition(), and cm_transition().

#define TR_PAUSE   (1<<2)
 

Pause transition

Definition at line 682 of file midas.h.

Referenced by cm_transition(), and send_all_periodic_events().

#define TR_POSTPAUSE   (1<<9)
 

Definition at line 689 of file midas.h.

Referenced by cm_transition().

#define TR_POSTRESUME   (1<<11)
 

Definition at line 691 of file midas.h.

Referenced by cm_transition().

#define TR_POSTSTART   (1<<5)
 

Definition at line 685 of file midas.h.

Referenced by cm_transition().

#define TR_POSTSTOP   (1<<7)
 

Definition at line 687 of file midas.h.

Referenced by cm_transition().

#define TR_PREPAUSE   (1<<8)
 

Definition at line 688 of file midas.h.

Referenced by cm_transition(), and main().

#define TR_PRERESUME   (1<<10)
 

Definition at line 690 of file midas.h.

Referenced by cm_transition().

#define TR_PRESTART   (1<<4)
 

Definition at line 684 of file midas.h.

Referenced by cm_transition(), and main().

#define TR_PRESTOP   (1<<6)
 

Definition at line 686 of file midas.h.

Referenced by cm_transition(), and main().

#define TR_RESUME   (1<<3)
 

Resume transition

Definition at line 683 of file midas.h.

Referenced by cm_transition(), main(), and send_all_periodic_events().

#define TR_START   (1<<0)
 

Start transition

Definition at line 680 of file midas.h.

Referenced by cm_transition(), main(), scheduler(), and send_all_periodic_events().

#define TR_STOP   (1<<1)
 

Stop transition

Definition at line 681 of file midas.h.

Referenced by cm_transition(), main(), scheduler(), and send_all_periodic_events().

#define TRIGGER_ALL   -1
 

Definition at line 815 of file midas.h.

Referenced by bm_match_event(), and cm_msg_register().

#define WF_CALL_WD   (1<<1)
 

Definition at line 676 of file midas.h.

#define WF_WATCH_ME   (1<<0)
 

Watchdog flags

Definition at line 675 of file midas.h.


Midas DOC Version 1.9.3 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Suzannah Daviel - Doxygen - Peter Green - Greg Hackman - Gertjan Hofman - Paul Knowles - Rudi Meier - Glenn Moloney - Dave Morris - Konstantin Olchanski - Renee Poutissou - Andreas Suter - Piotr Adam Zolnierczuk