#include <TMidasEvent.h>
Collaboration diagram for TMidasEvent:
For reading each event from a MIDAS .mid data file sequentially.
Definition at line 12 of file TMidasEvent.h.
Public Types | |
enum | EEventId { kEV_BOR = 0x8000, kEV_EOR = 0x8001, kEV_MESS = 0x8002 } |
Public Member Functions | |
TMidasEvent () | |
TMidasEvent (const TMidasEvent &) | |
~TMidasEvent () | |
TMidasEvent & | operator= (const TMidasEvent &) |
void | Clear (const Char_t *="") |
void | Print (const Char_t *="") const |
Int_t | FindBank (const Char_t *, ULong_t *, ULong_t *, void **) const |
Int_t | LocateBank (const Char_t *, void *) const |
Int_t | SwapBytes (Bool_t) |
Char_t * | GetData () const |
const Char_t * | GetBankList (UShort_t &) const |
Short_t | GetEventId () const |
Short_t | GetTriggerMask () const |
ULong_t | GetSerialNumber () const |
ULong_t | GetTimeStamp () const |
ULong_t | GetDataSize () const |
EventHeader_t * | GetEventHeader () |
void | AllocateData () |
void | Set (Char_t *) |
void | SetData (Char_t *) |
void | SetEventId (Short_t) |
void | SetTriggerMask (Short_t) |
void | SetSerialNumber (ULong_t) |
void | SetTimeStamp (ULong_t) |
void | SetDataSize (ULong_t) |
Bool_t | IsGoodSize () const |
Bool_t | IsTriggerMask (Short_t) const |
void | SwapBytesEventHeader () |
Private Member Functions | |
Int_t | IterateBank (void *, Bank_t **, void *) const |
Int_t | IterateBank32 (void *, Bank32_t **, void *) const |
Private Attributes | |
const Int_t | fBankListMax |
const Int_t | fStringBankListMax |
Char_t * | fData |
Bool_t | fAllocated |
EventHeader_t | fEventHeader |
|
Enumeration of MIDAS-specific events. Definition at line 45 of file TMidasEvent.h. |
|
Default constructor. Definition at line 25 of file TMidasEvent.cxx. References EventHeader_t::fDataSize, fEventHeader, EventHeader_t::fEventId, EventHeader_t::fSerialNumber, EventHeader_t::fTimeStamp, and EventHeader_t::fTriggerMask. |
|
Copy constructor. This is needed as some of the DragonRoot classes deal with pointers.
Definition at line 38 of file TMidasEvent.cxx. References fAllocated, fData, EventHeader_t::fDataSize, fEventHeader, EventHeader_t::fEventId, EventHeader_t::fSerialNumber, EventHeader_t::fTimeStamp, and EventHeader_t::fTriggerMask. |
|
Default destructor. Definition at line 62 of file TMidasEvent.cxx. References Clear(). |
Here is the call graph for this function:
|
Assignment operator overload. This is needed as some of the DragonRoot classes deal with pointers.
Definition at line 69 of file TMidasEvent.cxx. References Clear(), fAllocated, fData, EventHeader_t::fDataSize, fEventHeader, EventHeader_t::fEventId, EventHeader_t::fSerialNumber, EventHeader_t::fTimeStamp, and EventHeader_t::fTriggerMask. |
Here is the call graph for this function:
|
Method to clear all the data held in the TMidasEvent. This should be called after each TMidasEvent has been sorted to avoid a catastrophic memory leak.
Definition at line 96 of file TMidasEvent.cxx. References fData, EventHeader_t::fDataSize, fEventHeader, EventHeader_t::fEventId, EventHeader_t::fSerialNumber, EventHeader_t::fTimeStamp, and EventHeader_t::fTriggerMask. |
|
Print data held in this class.
Definition at line 334 of file TMidasEvent.cxx. References EventHeader_t::fDataSize, fEventHeader, EventHeader_t::fEventId, FindBank(), EventHeader_t::fSerialNumber, EventHeader_t::fTimeStamp, EventHeader_t::fTriggerMask, and GetBankList(). |
Here is the call graph for this function:
|
Finds a bank of given name inside an event.
Definition at line 176 of file TMidasEvent.cxx. References DWORD, Bank_t::fDataSize, BankHeader_t::fDataSize, Bank32_t::fDataSize, Bank_t::fName, Bank32_t::fName, Bank_t::fType, and Bank32_t::fType. |
|
Locates a bank of given name inside an event.
Definition at line 129 of file TMidasEvent.cxx. References DWORD, Bank_t::fDataSize, Bank32_t::fDataSize, Bank_t::fName, Bank32_t::fName, Bank_t::fType, and Bank32_t::fType. |
|
Swaps bytes from little endian to big endian or vice versa for a whole event. An event contains a flag which is set by bk_init() to identify the endian format of an event. If force is FALSE, this flag is evaluated and the event is only swapped if it is in the "wrong" format for this system. An event can be swapped to the "wrong" format on purpose for example by a front-end which wants to produce events in a "right" format for a back-end analyzer which has different byte ordering.
Definition at line 235 of file TMidasEvent.cxx. References DWORD, DWORD_SWAP, Bank_t::fDataSize, Bank32_t::fDataSize, BankHeader_t::fDataSize, BankHeader_t::fFlags, Bank_t::fType, Bank32_t::fType, QWORD_SWAP, WORD, and WORD_SWAP. |
|
Get the event data.
Definition at line 161 of file TMidasEvent.h. |
|
Set the bank list. param [out] banksN The number of banks in the event.
Definition at line 438 of file TMidasEvent.cxx. References fBankListMax, fEventHeader, EventHeader_t::fEventId, Bank_t::fName, Bank32_t::fName, IterateBank(), and IterateBank32(). |
Here is the call graph for this function:
|
Get the event identification number.
Definition at line 120 of file TMidasEvent.h. References fEventHeader, and EventHeader_t::fEventId. |
|
Get the event trigger mask.
Definition at line 128 of file TMidasEvent.h. References fEventHeader, and EventHeader_t::fTriggerMask. |
|
Get the event serial number (incremented separately for each type of event).
Definition at line 136 of file TMidasEvent.h. References fEventHeader, and EventHeader_t::fSerialNumber. |
|
Get the event time stamp.
Definition at line 145 of file TMidasEvent.h. References fEventHeader, and EventHeader_t::fTimeStamp. |
|
Get the event data-size.
Definition at line 153 of file TMidasEvent.h. References EventHeader_t::fDataSize, and fEventHeader. |
|
Get the event header (usually to fill in the fields).
Definition at line 169 of file TMidasEvent.h. |
|
Dynamically allocate space for the event data. Definition at line 424 of file TMidasEvent.cxx. References fAllocated, fData, EventHeader_t::fDataSize, and fEventHeader. |
|
Set the MIDAS header and data area. The data is not copied, just the internal pointer set to point to the correct area. param [in] eventData The buffer containing the entire MIDAS event. Definition at line 112 of file TMidasEvent.cxx. References fData, EventHeader_t::fDataSize, fEventHeader, EventHeader_t::fEventId, EventHeader_t::fSerialNumber, EventHeader_t::fTimeStamp, and EventHeader_t::fTriggerMask. |
|
Set the event data - useful for online sorting when the data does not need to be copied into the class.
Definition at line 110 of file TMidasEvent.h. References fAllocated, and fData. |
|
Set the event identification-number.
Definition at line 70 of file TMidasEvent.h. References fEventHeader, and EventHeader_t::fEventId. |
|
Set the event trigger-mask.
Definition at line 78 of file TMidasEvent.h. References fEventHeader, and EventHeader_t::fTriggerMask. |
|
Set the event serial-number.
Definition at line 86 of file TMidasEvent.h. References fEventHeader, and EventHeader_t::fSerialNumber. |
|
Set the event time-stamp.
Definition at line 94 of file TMidasEvent.h. References fEventHeader, and EventHeader_t::fTimeStamp. |
|
Set the event data-size.
Definition at line 102 of file TMidasEvent.h. References EventHeader_t::fDataSize, and fEventHeader. |
|
Check if the event is a good size.
Definition at line 177 of file TMidasEvent.h. References EventHeader_t::fDataSize, and fEventHeader. |
|
Check to see if the trigger mask of the events is the same as that required.
Definition at line 185 of file TMidasEvent.h. References fEventHeader, and EventHeader_t::fTriggerMask. |
|
The event header may need byte-swapping. Definition at line 544 of file TMidasEvent.cxx. References DWORD_SWAP, EventHeader_t::fDataSize, fEventHeader, EventHeader_t::fEventId, EventHeader_t::fSerialNumber, EventHeader_t::fTimeStamp, EventHeader_t::fTriggerMask, and WORD_SWAP. |
|
Iterates through banks inside an event. The function can be used to enumerate all banks of an event.
Definition at line 491 of file TMidasEvent.cxx. References Bank_t::fDataSize. |
|
Iterates through banks inside an event. The function can be used to enumerate all banks of an event.
Definition at line 517 of file TMidasEvent.cxx. References Bank32_t::fDataSize. |
|
The maximum number of banks allowed in an event, currently 64. Definition at line 53 of file TMidasEvent.h. |
|
The maximum bank string size allowed in an event. Definition at line 56 of file TMidasEvent.h. |
|
A pointer to the event data. Definition at line 59 of file TMidasEvent.h. |
|
A boolean to test whether data has been copied into the event or set via a pointer (used to determine whether to delete data or not). Definition at line 64 of file TMidasEvent.h. |
|
The event header. Definition at line 67 of file TMidasEvent.h. |