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 EQ_EB   (1<<6)
#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 295 of file midas.h.

Referenced by bm_receive_event(), handFlush(), scan_fragment(), scheduler(), and source_scan().

#define EQ_EB   (1<<6)
 

Event run through the event builder

Definition at line 344 of file midas.h.

#define EQ_FRAGMENTED   (1<<5)
 

Fragmented Event

Definition at line 343 of file midas.h.

#define EQ_INTERRUPT   (1<<2)
 

Interrupt Event

Definition at line 340 of file midas.h.

#define EQ_MANUAL_TRIG   (1<<4)
 

Manual triggered Event

Definition at line 342 of file midas.h.

#define EQ_PERIODIC   (1<<0)
 

Periodic Event

Definition at line 338 of file midas.h.

#define EQ_POLLED   (1<<1)
 

Polling Event

Definition at line 339 of file midas.h.

#define EQ_SLOW   (1<<3)
 

Slow Control Event

Definition at line 341 of file midas.h.

Referenced by scheduler().

#define EVENTID_ALL   -1
 

Definition at line 458 of file midas.h.

Referenced by bm_match_event(), and cm_msg_register().

#define FORMAT_ASCII   3
 

ASCII format

Definition at line 259 of file midas.h.

#define FORMAT_DUMP   5
 

Dump (detailed ASCII) format

Definition at line 261 of file midas.h.

#define FORMAT_FIXED   4
 

Fixed length binary records

Definition at line 260 of file midas.h.

#define FORMAT_HBOOK   6
 

CERN hbook (rz) format

Definition at line 262 of file midas.h.

#define FORMAT_MIDAS   1
 

MIDAS banks

Definition at line 257 of file midas.h.

Referenced by source_scan().

#define FORMAT_ROOT   7
 

CERN ROOT format

Definition at line 263 of file midas.h.

#define FORMAT_YBOS   2
 

YBOS banks

Definition at line 258 of file midas.h.

Referenced by source_scan().

#define GET_ALL   (1<<0)
 

get all events (consume)

Definition at line 267 of file midas.h.

Referenced by source_booking().

#define GET_FARM   (1<<2)
 

distribute events over several clients (farming)

Definition at line 269 of file midas.h.

#define GET_SOME   (1<<1)
 

get as much as possible (sampling)

Definition at line 268 of file midas.h.

Referenced by cm_msg_register().

#define MCALL   MT_CALL, __FILE__, __LINE__
 

info message for telephone call

Definition at line 478 of file midas.h.

#define MDEBUG   MT_DEBUG, __FILE__, __LINE__
 

Definition at line 474 of file midas.h.

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

#define MERROR   MT_ERROR, __FILE__, __LINE__
 

Definition at line 472 of file midas.h.

Referenced by al_trigger_alarm(), analyzer_init(), 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_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_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(), dm_buffer_create(), el_submit(), handFlush(), interrupt_routine(), load_fragment(), main(), register_equipment(), rpc_flush_event(), rpc_register_functions(), rpc_send_event(), rpc_set_option(), scan_fragment(), scheduler(), send_event(), source_booking(), source_scan(), source_unbooking(), tr_start(), tr_stop(), and update_odb().

#define MINFO   MT_INFO, __FILE__, __LINE__
 

Definition at line 473 of file midas.h.

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

#define MLOG   MT_LOG, __FILE__, __LINE__
 

info message which is only logged

Definition at line 476 of file midas.h.

#define MODE_ALLOC   (1<<7)
 

Definition at line 303 of file midas.h.

Referenced by db_open_record().

#define MODE_DELETE   (1<<2)
 

Definition at line 301 of file midas.h.

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

#define MODE_EXCLUSIVE   (1<<3)
 

Definition at line 302 of file midas.h.

Referenced by cm_cleanup(), and db_open_database().

#define MODE_READ   (1<<0)
 

Access modes

Definition at line 299 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_open_database(), db_open_record(), and register_equipment().

#define MODE_WRITE   (1<<1)
 

Definition at line 300 of file midas.h.

Referenced by cm_cleanup(), 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(), and register_equipment().

#define MT_ALL   0xFF
 

Definition at line 470 of file midas.h.

Referenced by cm_connect_experiment1(), and main().

#define MT_CALL   (1<<6)
 

Definition at line 469 of file midas.h.

#define MT_DEBUG   (1<<2)
 

Definition at line 465 of file midas.h.

#define MT_ERROR   (1<<0)
 

Definition at line 463 of file midas.h.

#define MT_INFO   (1<<1)
 

Definition at line 464 of file midas.h.

#define MT_LOG   (1<<4)
 

Definition at line 467 of file midas.h.

#define MT_TALK   (1<<5)
 

Definition at line 468 of file midas.h.

#define MT_USER   (1<<3)
 

Definition at line 466 of file midas.h.

#define MTALK   MT_TALK, __FILE__, __LINE__
 

info message for speech system

Definition at line 477 of file midas.h.

Referenced by scan_fragment(), and scheduler().

#define MUSER   MT_USER, __FILE__, __LINE__
 

produced by interactive user

Definition at line 475 of file midas.h.

#define RO_ALWAYS   (0xFF)
 

Always (independent of the run status)

Definition at line 358 of file midas.h.

#define RO_BOR   (1<<3)
 

At the Begin of run

Definition at line 352 of file midas.h.

#define RO_EOR   (1<<4)
 

At the End of run

Definition at line 353 of file midas.h.

#define RO_ODB   (1<<8)
 

Submit data to ODB only

Definition at line 360 of file midas.h.

Referenced by interrupt_routine(), and scheduler().

#define RO_PAUSE   (1<<5)
 

Before pausing the run

Definition at line 354 of file midas.h.

#define RO_PAUSED   (1<<2)
 

???

Definition at line 351 of file midas.h.

#define RO_RESUME   (1<<6)
 

Before resuming the run

Definition at line 355 of file midas.h.

#define RO_RUNNING   (1<<0)
 

While running

Definition at line 349 of file midas.h.

#define RO_STOPPED   (1<<1)
 

Before stopping the run

Definition at line 350 of file midas.h.

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

At all transitions

Definition at line 357 of file midas.h.

#define RPC_CLIENT_HANDLE   9
 

Definition at line 315 of file midas.h.

Referenced by cm_get_experiment_database(), and cm_set_client_info().

#define RPC_CONVERT_FLAGS   7
 

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

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

#define RPC_NODELAY   12
 

Definition at line 318 of file midas.h.

Referenced by rpc_set_option().

#define RPC_OCONVERT_FLAG   3
 

Definition at line 309 of file midas.h.

#define RPC_ODB_HANDLE   8
 

Definition at line 314 of file midas.h.

Referenced by cm_get_experiment_database(), and cm_set_client_info().

#define RPC_OHW_TYPE   4
 

Definition at line 310 of file midas.h.

Referenced by cm_connect_experiment1().

#define RPC_OSERVER_NAME   6
 

Definition at line 312 of file midas.h.

#define RPC_OSERVER_TYPE   5
 

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

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

#define RPC_OTRANSPORT   2
 

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

#define RPC_TCP   0
 

Definition at line 320 of file midas.h.

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

#define RPC_WATCHDOG_TIMEOUT   11
 

Definition at line 317 of file midas.h.

Referenced by cm_set_watchdog_params().

#define STATE_PAUSED   2
 

MIDAS run paused

Definition at line 252 of file midas.h.

Referenced by scan_fragment(), and scheduler().

#define STATE_RUNNING   3
 

MIDAS run running

Definition at line 253 of file midas.h.

Referenced by display(), scan_fragment(), and scheduler().

#define STATE_STOPPED   1
 

MIDAS run stopped

Definition at line 251 of file midas.h.

Referenced by display(), scan_fragment(), and scheduler().

#define SYNC   0
 

Synchronous / Asynchronous flags

Definition at line 294 of file midas.h.

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

#define TID_ARRAY   13
 

array with unknown contents

Definition at line 286 of file midas.h.

#define TID_BITFIELD   11
 

32 Bits Bitfield 0 111... (32)

Definition at line 284 of file midas.h.

Referenced by db_sprintf().

#define TID_BOOL   8
 

four bytes bool 0 1

Definition at line 281 of file midas.h.

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

#define TID_BYTE   1
 

unsigned byte 0 255

Definition at line 274 of file midas.h.

Referenced by db_sprintf().

#define TID_CHAR   3
 

single character 0 255

Definition at line 276 of file midas.h.

Referenced by db_sprintf().

#define TID_DOUBLE   10
 

8 Byte float format

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

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

#define TID_FLOAT   9
 

4 Byte float format

Definition at line 282 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 280 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_register_transition(), cm_set_client_info(), cm_set_transition_sequence(), cm_set_watchdog_params(), cm_shutdown(), cm_transition(), db_sprintf(), el_submit(), load_fragment(), register_equipment(), scheduler(), and tr_start().

#define TID_KEY   15
 

key in online database

Definition at line 288 of file midas.h.

Referenced by db_create_record(), db_delete_key1(), db_paste_node(), and register_equipment().

#define TID_LAST   17
 

end of TID list indicator

Definition at line 290 of file midas.h.

#define TID_LINK   16
 

link in online database

Definition at line 289 of file midas.h.

Referenced by db_create_key(), db_create_link(), db_delete_key1(), db_set_value(), and db_sprintf().

#define TID_SBYTE   2
 

signed byte -128 127

Definition at line 275 of file midas.h.

Referenced by db_sprintf().

#define TID_SHORT   5
 

signed word -32768 32767

Definition at line 278 of file midas.h.

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

#define TID_STRING   12
 

zero terminated string

Definition at line 285 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(), load_fragment(), logger_root(), tr_start(), and update_odb().

#define TID_STRUCT   14
 

structure with fixed length

Definition at line 287 of file midas.h.

Referenced by adc_summing(), and bk_close().

#define TID_WORD   4
 

two bytes 0 65535

Definition at line 277 of file midas.h.

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

#define TR_DEFERRED   (1<<12)
 

Definition at line 334 of file midas.h.

Referenced by cm_check_deferred_transition().

#define TR_PAUSE   (1<<2)
 

Pause transition

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

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

#define TR_START   (1<<0)
 

Start transition

Definition at line 330 of file midas.h.

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

#define TR_STOP   (1<<1)
 

Stop transition

Definition at line 331 of file midas.h.

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

#define TRIGGER_ALL   -1
 

Definition at line 459 of file midas.h.

Referenced by bm_match_event(), and cm_msg_register().

#define WF_CALL_WD   (1<<1)
 

Definition at line 326 of file midas.h.

#define WF_WATCH_ME   (1<<0)
 

Watchdog flags

Definition at line 325 of file midas.h.


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