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_MULTITHREAD   (1<<3)
#define EQ_SLOW   (1<<4)
#define EQ_MANUAL_TRIG   (1<<5)
#define EQ_FRAGMENTED   (1<<6)
#define EQ_EB   (1<<7)
#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 298 of file midas.h.

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

#define EQ_EB   (1<<7)

Event run through the event builder

Definition at line 348 of file midas.h.

Referenced by load_fragment().

#define EQ_FRAGMENTED   (1<<6)

Fragmented Event

Definition at line 347 of file midas.h.

Referenced by check_polled_events(), and send_event().

#define EQ_INTERRUPT   (1<<2)

Interrupt Event

Definition at line 343 of file midas.h.

Referenced by tr_stop().

#define EQ_MANUAL_TRIG   (1<<5)

Manual triggered Event

Definition at line 346 of file midas.h.

#define EQ_MULTITHREAD   (1<<3)

Multithread Event readout

Definition at line 344 of file midas.h.

Referenced by tr_stop().

#define EQ_PERIODIC   (1<<0)

Equipment types Periodic Event

Definition at line 341 of file midas.h.

#define EQ_POLLED   (1<<1)

Polling Event

Definition at line 342 of file midas.h.

#define EQ_SLOW   (1<<4)

Slow Control Event

Definition at line 345 of file midas.h.

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

#define EVENTID_ALL   -1

Definition at line 462 of file midas.h.

Referenced by bm_match_event(), and cm_msg_register().

#define FORMAT_ASCII   3

ASCII format

Definition at line 262 of file midas.h.

#define FORMAT_DUMP   5

Dump (detailed ASCII) format

Definition at line 264 of file midas.h.

#define FORMAT_FIXED   4

Fixed length binary records

Definition at line 263 of file midas.h.

Referenced by register_equipment(), and update_odb().

#define FORMAT_HBOOK   6

CERN hbook (rz) format

Definition at line 265 of file midas.h.

#define FORMAT_MIDAS   1

Data format MIDAS banks

Definition at line 260 of file midas.h.

Referenced by load_fragment(), register_equipment(), source_scan(), and update_odb().

#define FORMAT_ROOT   7

CERN ROOT format

Definition at line 266 of file midas.h.

#define FORMAT_YBOS   2

YBOS banks

Definition at line 261 of file midas.h.

Referenced by load_fragment(), register_equipment(), source_scan(), and update_odb().

#define GET_ALL   (1<<0)

Event Sampling type get all events (consume)

Definition at line 270 of file midas.h.

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

#define GET_FARM   (1<<2)

distribute events over several clients (farming)

Definition at line 272 of file midas.h.

#define GET_SOME   (1<<1)

get as much as possible (sampling)

Definition at line 271 of file midas.h.

Referenced by cm_msg_register().

#define MCALL   MT_CALL, __FILE__, __LINE__

info message for telephone call

Definition at line 490 of file midas.h.

#define MDEBUG   MT_DEBUG, __FILE__, __LINE__

Definition at line 486 of file midas.h.

Referenced by bm_flush_cache(), bm_receive_event(), bm_send_event(), bm_update_read_pointer(), bm_wait_for_free_space(), bm_wakeup_producers(), and cm_transition().

#define MERROR   MT_ERROR, __FILE__, __LINE__

Definition at line 484 of file midas.h.

Referenced by al_check(), al_reset_alarm(), al_trigger_alarm(), analyzer_init(), bm_close_buffer(), bm_copy_from_cache(), 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(), bm_validate_client_index(), check_polled_events(), cm_check_client(), cm_check_deferred_transition(), cm_connect_experiment1(), cm_deregister_transition(), cm_get_watchdog_info(), cm_list_experiments(), cm_register_deferred_transition(), cm_register_transition(), cm_set_client_info(), cm_set_transition_sequence(), cm_shutdown(), cm_transition(), db_check_record(), db_close_database(), db_copy(), db_copy_xml(), 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_link(), db_get_link_data(), db_get_record(), db_get_value(), db_load(), db_lock_database(), db_open_database(), db_open_record(), db_paste(), db_paste_node(), db_protect_database(), db_save(), db_save_struct(), db_save_xml(), db_save_xml_key(), db_set_data(), db_set_data_index(), db_set_record(), db_set_value(), db_unlock_database(), el_submit(), load_fragment(), main(), readout_thread(), receive_trigger_event(), register_equipment(), rpc_register_functions(), rpc_set_option(), scan_fragment(), send_event(), source_booking(), source_scan(), source_unbooking(), tr_start(), and update_odb().

#define MINFO   MT_INFO, __FILE__, __LINE__

Definition at line 485 of file midas.h.

Referenced by bk_list(), bm_validate_client_pointers(), close_buffers(), cm_check_client(), cm_cleanup(), cm_connect_experiment1(), cm_disconnect_experiment(), cm_set_client_info(), cm_shutdown(), cm_transition(), load_fragment(), tr_start(), and ybk_list().

#define MLOG   MT_LOG, __FILE__, __LINE__

info message which is only logged

Definition at line 488 of file midas.h.

#define MODE_ALLOC   (1<<7)

Definition at line 306 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 304 of file midas.h.

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

#define MODE_EXCLUSIVE   (1<<3)

Definition at line 305 of file midas.h.

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

#define MODE_READ   (1<<0)

Access modes

Definition at line 302 of file midas.h.

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

#define MODE_WRITE   (1<<1)

Definition at line 303 of file midas.h.

Referenced by cm_delete_client_info(), cm_deregister_transition(), cm_register_deferred_transition(), cm_register_transition(), cm_set_client_info(), cm_set_transition_sequence(), cm_set_watchdog_params(), cm_transition(), db_create_key(), db_open_database(), db_set_data(), db_set_data_index(), db_set_value(), and register_equipment().

#define MT_ALL   0xFF

Definition at line 474 of file midas.h.

Referenced by cm_connect_experiment1(), and main().

#define MT_CALL   (1<<6)

Definition at line 473 of file midas.h.

#define MT_CALL_STR   "CALL"

Definition at line 482 of file midas.h.

#define MT_DEBUG   (1<<2)

Definition at line 469 of file midas.h.

Referenced by cm_msg(), cm_msg_log(), and cm_msg_log1().

#define MT_DEBUG_STR   "DEBUG"

Definition at line 478 of file midas.h.

Referenced by cm_msg().

#define MT_ERROR   (1<<0)

System message types -

Definition at line 467 of file midas.h.

Referenced by cm_msg(), and cm_msg1().

#define MT_ERROR_STR   "ERROR"

Definition at line 476 of file midas.h.

Referenced by cm_msg().

#define MT_INFO   (1<<1)

Definition at line 468 of file midas.h.

Referenced by cm_msg().

#define MT_INFO_STR   "INFO"

Definition at line 477 of file midas.h.

Referenced by cm_msg().

#define MT_LOG   (1<<4)

Definition at line 471 of file midas.h.

Referenced by cm_msg(), and cm_msg1().

#define MT_LOG_STR   "LOG"

Definition at line 480 of file midas.h.

Referenced by cm_msg().

#define MT_TALK   (1<<5)

Definition at line 472 of file midas.h.

Referenced by cm_msg().

#define MT_TALK_STR   "TALK"

Definition at line 481 of file midas.h.

Referenced by cm_msg().

#define MT_USER   (1<<3)

Definition at line 470 of file midas.h.

Referenced by cm_msg(), and cm_msg1().

#define MT_USER_STR   "USER"

Definition at line 479 of file midas.h.

Referenced by cm_msg().

#define MTALK   MT_TALK, __FILE__, __LINE__

info message for speech system

Definition at line 489 of file midas.h.

Referenced by al_check(), and scan_fragment().

#define MUSER   MT_USER, __FILE__, __LINE__

produced by interactive user

Definition at line 487 of file midas.h.

#define RO_ALWAYS   (0xFF)

Always (independent of the run status)

Definition at line 362 of file midas.h.

#define RO_BOR   (1<<3)

At the Begin of run

Definition at line 356 of file midas.h.

Referenced by send_all_periodic_events().

#define RO_EOR   (1<<4)

At the End of run

Definition at line 357 of file midas.h.

Referenced by send_all_periodic_events().

#define RO_ODB   (1<<8)

Submit data to ODB only

Definition at line 364 of file midas.h.

Referenced by send_event().

#define RO_PAUSE   (1<<5)

Before pausing the run

Definition at line 358 of file midas.h.

Referenced by send_all_periodic_events().

#define RO_PAUSED   (1<<2)

???

Definition at line 355 of file midas.h.

#define RO_RESUME   (1<<6)

Before resuming the run

Definition at line 359 of file midas.h.

Referenced by send_all_periodic_events().

#define RO_RUNNING   (1<<0)

Read - On flags While running

Definition at line 353 of file midas.h.

#define RO_STOPPED   (1<<1)

Before stopping the run

Definition at line 354 of file midas.h.

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

At all transitions

Definition at line 361 of file midas.h.

#define RPC_CLIENT_HANDLE   9

Definition at line 318 of file midas.h.

Referenced by cm_get_experiment_database(), and cm_set_client_info().

#define RPC_CONVERT_FLAGS   7

Definition at line 316 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 324 of file midas.h.

Referenced by cm_transition(), and db_send_changed_records().

#define RPC_NODELAY   12

Definition at line 321 of file midas.h.

Referenced by rpc_set_option().

#define RPC_OCONVERT_FLAG   3

Definition at line 312 of file midas.h.

#define RPC_ODB_HANDLE   8

Definition at line 317 of file midas.h.

Referenced by cm_get_experiment_database(), and cm_set_client_info().

#define RPC_OHW_TYPE   4

Definition at line 313 of file midas.h.

Referenced by cm_connect_experiment1().

#define RPC_OSERVER_NAME   6

Definition at line 315 of file midas.h.

#define RPC_OSERVER_TYPE   5

Definition at line 314 of file midas.h.

Referenced by bm_check_buffers(), bm_close_buffer(), 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 310 of file midas.h.

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

#define RPC_OTRANSPORT   2

Definition at line 311 of file midas.h.

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

#define RPC_SEND_SOCK   10

Definition at line 319 of file midas.h.

#define RPC_TCP   0

Definition at line 323 of file midas.h.

Referenced by cm_transition(), and db_send_changed_records().

#define RPC_WATCHDOG_TIMEOUT   11

Definition at line 320 of file midas.h.

Referenced by cm_set_watchdog_params().

#define STATE_PAUSED   2

MIDAS run paused

Definition at line 255 of file midas.h.

Referenced by cm_transition(), scan_fragment(), and tr_pause().

#define STATE_RUNNING   3

MIDAS run running

Definition at line 256 of file midas.h.

Referenced by cm_transition(), display(), main(), scan_fragment(), tr_resume(), and tr_start().

#define STATE_STOPPED   1

System states MIDAS run stopped

Definition at line 254 of file midas.h.

Referenced by close_buffers(), cm_transition(), display(), main(), register_equipment(), scan_fragment(), and tr_stop().

#define SYNC   0

Synchronous / Asynchronous flags

Definition at line 297 of file midas.h.

Referenced by close_buffers(), cm_check_deferred_transition(), cm_msg(), cm_msg1(), receive_trigger_event(), and send_event().

#define TID_ARRAY   13

array with unknown contents

Definition at line 289 of file midas.h.

#define TID_BITFIELD   11

32 Bits Bitfield 0 111... (32)

Definition at line 287 of file midas.h.

Referenced by db_sprintf().

#define TID_BOOL   8

four bytes bool 0 1

Definition at line 284 of file midas.h.

Referenced by al_check(), al_trigger_alarm(), ana_end_of_run(), bk_swap(), db_sprintf(), and tr_start().

#define TID_BYTE   1

Data types Definition min max unsigned byte 0 255

Definition at line 277 of file midas.h.

Referenced by db_sprintf().

#define TID_CHAR   3

single character 0 255

Definition at line 279 of file midas.h.

Referenced by db_sprintf().

#define TID_DOUBLE   10

8 Byte float format

Definition at line 286 of file midas.h.

Referenced by ana_end_of_run(), bk_swap(), db_sprintf(), register_equipment(), and scaler_accum().

#define TID_DWORD   6

four bytes 0 2^32-1

Definition at line 282 of file midas.h.

Referenced by bk_swap(), bm_convert_event_header(), bm_open_buffer(), cm_transition(), db_sprintf(), db_update_record(), eb_user(), and read_scaler_event().

#define TID_FLOAT   9

4 Byte float format

Definition at line 285 of file midas.h.

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

#define TID_INT   7

signed dword -2^31 2^31-1

Definition at line 283 of file midas.h.

Referenced by al_check(), al_trigger_alarm(), bk_swap(), cm_connect_client(), cm_connect_experiment1(), cm_delete_client_info(), cm_register_deferred_transition(), cm_register_transition(), cm_set_client_info(), cm_set_transition_sequence(), cm_set_watchdog_params(), cm_shutdown(), cm_transition(), db_sprintf(), el_submit(), load_fragment(), main(), register_equipment(), and tr_start().

#define TID_KEY   15

key in online database

Definition at line 291 of file midas.h.

Referenced by al_check(), 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_link_data(), db_get_record(), db_get_record_size(), db_open_database(), db_paste(), db_paste_node(), db_save_xml_key(), db_set_data(), db_set_data_index(), db_set_record(), db_set_value(), load_fragment(), and register_equipment().

#define TID_LAST   17

end of TID list indicator

Definition at line 293 of file midas.h.

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

#define TID_LINK   16

link in online database

Definition at line 292 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_data(), db_get_key(), db_get_value(), db_paste(), db_paste_node(), db_save_xml_key(), db_set_data(), db_set_data_index(), db_set_value(), db_sprintf(), and update_odb().

#define TID_SBYTE   2

signed byte -128 127

Definition at line 278 of file midas.h.

Referenced by db_sprintf().

#define TID_SHORT   5

signed word -32768 32767

Definition at line 281 of file midas.h.

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

#define TID_STRING   12

zero terminated string

Definition at line 288 of file midas.h.

Referenced by al_trigger_alarm(), ana_end_of_run(), 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_paste_node(), db_save_xml_key(), db_set_data_index(), db_set_value(), db_sprintf(), el_submit(), hs_dump(), load_fragment(), logger_root(), tr_start(), and update_odb().

#define TID_STRUCT   14

structure with fixed length

Definition at line 290 of file midas.h.

Referenced by adc_summing(), bk_close(), register_equipment(), and update_odb().

#define TID_WORD   4

two bytes 0 65535

Definition at line 280 of file midas.h.

Referenced by bk_swap(), db_sprintf(), load_fragment(), read_trigger_event(), and register_equipment().

#define TR_DEFERRED   (1<<12)

Definition at line 337 of file midas.h.

Referenced by cm_check_deferred_transition(), and cm_transition().

#define TR_PAUSE   (1<<2)

Pause transition

Definition at line 335 of file midas.h.

Referenced by cm_deregister_transition(), cm_register_transition(), cm_set_transition_sequence(), cm_transition(), main(), send_all_periodic_events(), and tr_pause().

#define TR_RESUME   (1<<3)

Resume transition

Definition at line 336 of file midas.h.

Referenced by cm_deregister_transition(), cm_register_transition(), cm_set_transition_sequence(), cm_transition(), main(), send_all_periodic_events(), and tr_resume().

#define TR_START   (1<<0)

Transitions values Start transition

Definition at line 333 of file midas.h.

Referenced by cm_deregister_transition(), cm_register_transition(), cm_set_transition_sequence(), cm_transition(), main(), send_all_periodic_events(), and tr_start().

#define TR_STOP   (1<<1)

Stop transition

Definition at line 334 of file midas.h.

Referenced by cm_deregister_transition(), cm_register_transition(), cm_set_transition_sequence(), cm_transition(), main(), scan_fragment(), send_all_periodic_events(), and tr_stop().

#define TRIGGER_ALL   -1

Definition at line 463 of file midas.h.

Referenced by bm_match_event(), cm_msg_register(), and source_booking().

#define WF_CALL_WD   (1<<1)

Definition at line 329 of file midas.h.

#define WF_WATCH_ME   (1<<0)

Watchdog flags

Definition at line 328 of file midas.h.


Midas DOC Version 2.0.2 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Sergio Ballestrero - Suzannah Daviel - Doxygen - Peter Green - Qing Gu - Greg Hackman - Gertjan Hofman - Paul Knowles - Exaos Lee - Rudi Meier - Glenn Moloney - Dave Morris - John M O'Donnell - Konstantin Olchanski - Renee Poutissou - Tamsen Schurman - Andreas Suter - Jan M.Wouters - Piotr Adam Zolnierczuk