Macros: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 13: Line 13:


==CAMAC Macros==
==CAMAC Macros==
Midas provides Macros for CAMAC LAM manipulation  
Midas provides Macros for CAMAC LAM manipulation which may be used in the [[Frontend user code]] or analyzer code. These Macros are used to interact with the LAM register. Usually the CAMAC Crate Controller has the feature that it is able to register one bit per slot and present this register to the user. It may even have the option to mask off this register to allow to set a "general" LAM register containing either "1" (At least one LAM from the masked LAM is set) or "0" ( no LAM set from the masked LAM register). The  [[Frontend user code#Function poll_event|poll_event()]] routine uses this feature to return a variable which contains a bit-wise value of the current LAM register in the Crate Controller.
 
*  LAM_SOURCE
*  LAM_SOURCE
*  LAM_STATION
*  LAM_STATION
Line 27: Line 28:
See [[MIDAS Event Header Macros]].
See [[MIDAS Event Header Macros]].


[[Category:Appendices]]
[[Category:Appendices]] [[Category:Macros]]

Latest revision as of 15:23, 4 August 2015


Introduction

The following MACROS have been provided in the MIDAS package.

Byte Swap Macros

Thes macros are provided for big/little endian byte-swapping

  • WORD_SWAP
  • DWORD_SWAP
  • QWORD_SWAP

These macros are used by bk_swap();

CAMAC Macros

Midas provides Macros for CAMAC LAM manipulation which may be used in the Frontend user code or analyzer code. These Macros are used to interact with the LAM register. Usually the CAMAC Crate Controller has the feature that it is able to register one bit per slot and present this register to the user. It may even have the option to mask off this register to allow to set a "general" LAM register containing either "1" (At least one LAM from the masked LAM is set) or "0" ( no LAM set from the masked LAM register). The poll_event() routine uses this feature to return a variable which contains a bit-wise value of the current LAM register in the Crate Controller.

  • LAM_SOURCE
  • LAM_STATION
  • LAM_SOURCE_CRATE
  • LAM_SOURCE_STATION

Event Header Macros

  • TRIGGER_MASK
  • EVENT_ID
  • SERIAL_NUMBER
  • TIME_STAMP
  • DATA_SIZE

See MIDAS Event Header Macros.