This note documents the event header fields in the BrEvent and BrEventHeader classes. 1) the BrRawDataInput class is used to read raw data into BrEvent objects. The event identification data (run number, trigger, etc...) is stored into a BrEventHeader object inside BrEvent. 2) the BrEvent objects have these methods: - GetRunNumber() returns the run number - GetEventNumber() returns the event number Note: the run number and event number uniquely identify the event. - GetDate() returns (aparently) an undefined, uninitialized value - GetTime() returns the event time, defined as the unix time when the event was received by the event builder. - GetTriggerMask() returns the event trigger. This is an integer number (not a mask or bitmap), defined in oncs/libBrOnline/BrRawEvent.h as follows: 1 - begin run 2 - end run 3 - pause run 4 - resume run 5 - init run 6 - tape header (not used for disk files) 101 - sync trigger ("trigger 8", latch 0x8080) 102 - normal trigger - GetEventType() returns the "event type" from the raw event header, currently always 0. - GetEventHeader()->TriggerWord(x) returns the 1st and 2nd words of raw data record 3 (trigger latch): - GetEventHeader()->TriggerWord(1) returns the 16-bit trigger latch, that identifies one of the 8 triggers defined in the trigger setup panel of the DAQ gui: 0x0101 - "trigger 1" 0x0202 - "trigger 2" 0x0404 - "trigger 3" 0x0808 - "trigger 4" 0x1010 - "trigger 5" 0x2020 - "trigger 6" 0x4040 - "trigger 7" 0x8080 - "trigger 8" It is possible to have an event that satisfies more than one trigger at the same time. In this case, the values of the trigger latch for the satisfied triggers are "or"ed together, for example: trigger latch 0x1212 means that trigger 5 and trigger 2 are both satisfied. This is the recommended code sequence to select various triggers: int latch = event->GetEventHeader()->TriggerWord(1); if (latch & 0x0101) { printf("this is trigger 1!\n"); } - GetEventHeader()->TriggerWord(2) currently always returns 0 Corrections are welcome. -- Konstantin Olchanski Physics Department, Brookhaven National Laboratory, Long Island, New York olchansk@bnl.gov
This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 23:26:44 EDT