Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4MbsEvent Class Reference

Wrapper for the standard gsi event structure as deliverd from mbs. More...

#include <TGo4MbsEvent.h>

Inheritance diagram for TGo4MbsEvent:

TGo4EventElement List of all members.

Public Member Functions

 TGo4MbsEvent ()
 TGo4MbsEvent (UInt_t subnum, Short_t *subids, UInt_t datasize=100)
 Ctor expecting the number of subevents to initialize and an array which specifies the subevent ids (procids) to create.
 TGo4MbsEvent (UInt_t subnum, Char_t *subcrates, Char_t *controls, Short_t *procids, UInt_t *datasizes)
 Ctor expecting the number of subevents to initialize and arrays which specify the subevent ids (subcrate, ctrl, procid) to create.
virtual ~TGo4MbsEvent ()
virtual Int_t Fill ()
 Method called by the event owner (analysis step) to fill the event element from the set event source.
virtual Int_t Init ()
 Method called on initialization of event classes.
virtual void Clear (Option_t *t="")
 Method called by the event owner (analysis step) to clear the event element.
void Set (Int_t dlen=0, Short_t type=10, Short_t subtype=1, Short_t dummy=0, Short_t trigger=0, Int_t count=0)
void PrintEvent ()
 Method called by the event owner (analysis step) to clear the event element.
void ResetIterator ()
 Set the internal iterator of the subevent array to the beginning of the array.
TGo4MbsSubEventNextSubEvent (Bool_t all=kFALSE)
 Iterator for subevent array.
TGo4MbsSubEventGetSubEvent (Char_t subcrate, Char_t ctrl, Short_t procid)
 Access to subevent in list by procid, subcrate and ctrl identifiers.
TGo4MbsSubEventGetSubEvent (Short_t procid)
 Access to subevent in list by procid.
void SetDlen (Int_t dlen)
Int_t GetDlen () const
Int_t GetIntLen () const
void SetType (Short_t type)
Short_t GetType () const
void SetSubtype (Short_t subtype)
Short_t GetSubtype () const
void SetDummy (Short_t dummy)
Short_t GetDummy () const
void SetTrigger (Short_t trigger)
Short_t GetTrigger () const
void SetCount (Int_t count)
Int_t GetCount () const
s_filheGetMbsSourceHeader ()
 Access to the info header of the current mbs source.
s_bufheGetMbsBufferHeader ()
 Access to the buffer header of the current event.
void SetPrintEvent (Int_t num=1, Int_t sid=-1, Int_t longw=1, Int_t hexw=1, Int_t dataw=0)
 Set the "printout event" mode for the current mbs source.

Private Attributes

TGo4EventHeader10 fxHeader
 
TObjArray * fxSubEvArray
 dynamic array of subevents.
TIterator * fxIterator
 Iterator for array.
TGo4MbsSourcefxMbsSource
 points to mbssource if exists
TGo4TreeSourcefxTreeSource
 points to treesource if exists
TGo4FileSourcefxFileSource
 points to filesource if exists

Friends

class TGo4MbsSource

Detailed Description

Wrapper for the standard gsi event structure as deliverd from mbs.

Definition at line 40 of file TGo4MbsEvent.h.


Constructor & Destructor Documentation

TGo4MbsEvent::TGo4MbsEvent  ) 
 

Definition at line 29 of file TGo4MbsEvent.cxx.

References TRACE.

TGo4MbsEvent::TGo4MbsEvent UInt_t  subnum,
Short_t *  subids,
UInt_t  datasize = 100
 

Ctor expecting the number of subevents to initialize and an array which specifies the subevent ids (procids) to create.

Subevent number subnum must not extend the length of subids field.

Definition at line 41 of file TGo4MbsEvent.cxx.

References Clear(), fxIterator, fxSubEvArray, ResetIterator(), TGo4MbsSubEvent::SetProcid(), and TRACE.

TGo4MbsEvent::TGo4MbsEvent UInt_t  subnum,
Char_t *  subcrates,
Char_t *  controls,
Short_t *  procids,
UInt_t *  datasizes
 

Ctor expecting the number of subevents to initialize and arrays which specify the subevent ids (subcrate, ctrl, procid) to create.

Subevent number subnum must not extend the length of subids field. Array datasizes contains preallocated size of each subevent data field.

Definition at line 66 of file TGo4MbsEvent.cxx.

References Clear(), fxIterator, fxSubEvArray, ResetIterator(), TGo4MbsSubEvent::SetControl(), TGo4MbsSubEvent::SetProcid(), TGo4MbsSubEvent::SetSubcrate(), and TRACE.

TGo4MbsEvent::~TGo4MbsEvent  )  [virtual]
 

Definition at line 97 of file TGo4MbsEvent.cxx.

References fxIterator, fxSubEvArray, and TRACE.


Member Function Documentation

Int_t TGo4MbsEvent::Fill  )  [virtual]
 

Method called by the event owner (analysis step) to fill the event element from the set event source.

Event source can be the source of the analysis step (if this is a raw event) or the event processor (if this is a reduced event). Fill method has to specify how the event source writes to the members of this event structure. Either by calling methods of the source (like myevent.a=GetEventSource()->GetA(); etc ), or by direct copy to the member (like GetEventSource()->FillMemoryAt(&myevent.a);)

Reimplemented from TGo4EventElement.

Definition at line 105 of file TGo4MbsEvent.cxx.

References TGo4FileSource::BuildEvent(), TGo4TreeSource::BuildEvent(), TGo4MbsSource::BuildMbsEvent(), Clear(), TGo4Log::Debug(), fxFileSource, fxIterator, fxMbsSource, fxSubEvArray, fxTreeSource, TGo4EventSource::GetErrMess(), GETEVT__SUCCESS, TGo4MbsSource::NextEvent(), and TRACE.

Int_t TGo4MbsEvent::Init  )  [virtual]
 

Method called on initialization of event classes.

User might check the correct type of the eventsource here and assign this to a subclass pointer.

Reimplemented from TGo4EventElement.

Definition at line 172 of file TGo4MbsEvent.cxx.

References TGo4EventElement::CheckEventSource(), TGo4Log::Debug(), fxFileSource, fxMbsSource, fxTreeSource, TGo4EventElement::GetEventSource(), and TRACE.

void TGo4MbsEvent::Clear Option_t *  t = ""  )  [virtual]
 

Method called by the event owner (analysis step) to clear the event element.

Reimplemented from TGo4EventElement.

Definition at line 203 of file TGo4MbsEvent.cxx.

References TGo4MbsSubEvent::Clear(), NextSubEvent(), ResetIterator(), and TRACE.

Referenced by Fill(), and TGo4MbsEvent().

void TGo4MbsEvent::Set Int_t  dlen = 0,
Short_t  type = 10,
Short_t  subtype = 1,
Short_t  dummy = 0,
Short_t  trigger = 0,
Int_t  count = 0
 

Definition at line 219 of file TGo4MbsEvent.cxx.

References SetCount(), SetDlen(), SetDummy(), SetSubtype(), SetTrigger(), and SetType().

void TGo4MbsEvent::PrintEvent  )  [virtual]
 

Method called by the event owner (analysis step) to clear the event element.

Reimplemented from TGo4EventElement.

Definition at line 230 of file TGo4MbsEvent.cxx.

References GetCount(), GetDlen(), GetSubtype(), GetTrigger(), GetType(), NextSubEvent(), TGo4MbsSubEvent::PrintEvent(), TGo4EventElement::PrintEvent(), and ResetIterator().

Referenced by main().

void TGo4MbsEvent::ResetIterator  ) 
 

Set the internal iterator of the subevent array to the beginning of the array.

Definition at line 261 of file TGo4MbsEvent.cxx.

References fxIterator, fxSubEvArray, and TRACE.

Referenced by TXXXProc::BuildEvent(), TGo4MbsSource::BuildMbsSubEvent(), TGo4SimpleEventProcessor::BuildSimpleEvent(), Clear(), GetSubEvent(), PrintEvent(), TGo4MbsEvent(), TMeshUnpackProc::UnpackBranch1(), TMeshUnpackProc::UnpackBranch2(), TMeshUnpackProc::UnpackBranch3(), and TXXXUnpackProc::XXXUnpack().

TGo4MbsSubEvent * TGo4MbsEvent::NextSubEvent Bool_t  all = kFALSE  ) 
 

Iterator for subevent array.

If reset is kTRUE, the iteration starts at the first TObjArray slot, otherwise we continue at the position after the last call of this method. Parameter all specifies if all available subevents are delivered, or only subevents which were filled in the previous cycle.

Definition at line 275 of file TGo4MbsEvent.cxx.

References fxIterator, TGo4MbsSubEvent::IsFilled(), and TRACE.

Referenced by TXXXProc::BuildEvent(), TGo4MbsSource::BuildMbsSubEvent(), TGo4SimpleEventProcessor::BuildSimpleEvent(), Clear(), GetSubEvent(), PrintEvent(), TMeshUnpackProc::UnpackBranch1(), TMeshUnpackProc::UnpackBranch2(), TMeshUnpackProc::UnpackBranch3(), and TXXXUnpackProc::XXXUnpack().

TGo4MbsSubEvent * TGo4MbsEvent::GetSubEvent Char_t  subcrate,
Char_t  ctrl,
Short_t  procid
 

Access to subevent in list by procid, subcrate and ctrl identifiers.

Returns zero if no subevent of these ids is found. If event has subevents with identical ids, the first in order will be returned (use NextSubEvent() to access all in this case).

Definition at line 292 of file TGo4MbsEvent.cxx.

References TGo4MbsSubEvent::GetControl(), TGo4MbsSubEvent::GetProcid(), TGo4MbsSubEvent::GetSubcrate(), NextSubEvent(), ResetIterator(), and TRACE.

TGo4MbsSubEvent * TGo4MbsEvent::GetSubEvent Short_t  procid  ) 
 

Access to subevent in list by procid.

Returns zero if no subevent of this id is found. If event has subevents with identical procid, the first in order will be returned (use NextSubEvent() to access all in this case). Not recommended to use, left for compatibility!

Definition at line 311 of file TGo4MbsEvent.cxx.

References TGo4MbsSubEvent::GetProcid(), NextSubEvent(), ResetIterator(), and TRACE.

void TGo4MbsEvent::SetDlen Int_t  dlen  )  [inline]
 

Definition at line 108 of file TGo4MbsEvent.h.

References TGo4GSIEventHeader::fiDlen, TGo4EventHeader10::fxGSIHeader, and fxHeader.

Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().

Int_t TGo4MbsEvent::GetDlen  )  const [inline]
 

Definition at line 109 of file TGo4MbsEvent.h.

References TGo4GSIEventHeader::fiDlen, TGo4EventHeader10::fxGSIHeader, and fxHeader.

Referenced by GetIntLen(), PrintEvent(), and TMeshAnalysis::UserEventFunc().

Int_t TGo4MbsEvent::GetIntLen  )  const [inline]
 

Definition at line 110 of file TGo4MbsEvent.h.

References GetDlen().

void TGo4MbsEvent::SetType Short_t  type  )  [inline]
 

Definition at line 112 of file TGo4MbsEvent.h.

References TGo4GSIEventHeader::fsType, TGo4EventHeader10::fxGSIHeader, and fxHeader.

Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().

Short_t TGo4MbsEvent::GetType  )  const [inline]
 

Definition at line 113 of file TGo4MbsEvent.h.

References TGo4GSIEventHeader::fsType, TGo4EventHeader10::fxGSIHeader, and fxHeader.

Referenced by PrintEvent().

void TGo4MbsEvent::SetSubtype Short_t  subtype  )  [inline]
 

Definition at line 115 of file TGo4MbsEvent.h.

References TGo4GSIEventHeader::fsSubtype, TGo4EventHeader10::fxGSIHeader, and fxHeader.

Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().

Short_t TGo4MbsEvent::GetSubtype  )  const [inline]
 

Definition at line 116 of file TGo4MbsEvent.h.

References TGo4GSIEventHeader::fsSubtype, TGo4EventHeader10::fxGSIHeader, and fxHeader.

Referenced by PrintEvent().

void TGo4MbsEvent::SetDummy Short_t  dummy  )  [inline]
 

Definition at line 118 of file TGo4MbsEvent.h.

References TGo4EventHeader10::fsDummy, and fxHeader.

Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().

Short_t TGo4MbsEvent::GetDummy  )  const [inline]
 

Definition at line 119 of file TGo4MbsEvent.h.

References TGo4EventHeader10::fsDummy, and fxHeader.

void TGo4MbsEvent::SetTrigger Short_t  trigger  )  [inline]
 

Definition at line 121 of file TGo4MbsEvent.h.

References TGo4EventHeader10::fsTrigger, and fxHeader.

Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().

Short_t TGo4MbsEvent::GetTrigger  )  const [inline]
 

Definition at line 122 of file TGo4MbsEvent.h.

References TGo4EventHeader10::fsTrigger, and fxHeader.

Referenced by TXXXProc::BuildEvent(), and PrintEvent().

void TGo4MbsEvent::SetCount Int_t  count  )  [inline]
 

Definition at line 124 of file TGo4MbsEvent.h.

References TGo4EventHeader10::fiCount, and fxHeader.

Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().

Int_t TGo4MbsEvent::GetCount  )  const [inline]
 

Definition at line 125 of file TGo4MbsEvent.h.

References TGo4EventHeader10::fiCount, and fxHeader.

Referenced by TGo4SimpleEventProcessor::BuildSimpleEvent(), PrintEvent(), TMeshAnalysis::UserEventFunc(), and TXXXAnalysis::UserEventFunc().

s_filhe * TGo4MbsEvent::GetMbsSourceHeader  ) 
 

Access to the info header of the current mbs source.

Definition at line 333 of file TGo4MbsEvent.cxx.

References fxMbsSource, and TGo4MbsSource::GetInfoHeader().

Referenced by TMeshAnalysis::UserPostLoop(), and TXXXAnalysis::UserPreLoop().

s_bufhe * TGo4MbsEvent::GetMbsBufferHeader  ) 
 

Access to the buffer header of the current event.

Definition at line 342 of file TGo4MbsEvent.cxx.

References fxMbsSource, and TGo4MbsSource::GetBufferHeader().

Referenced by TMeshAnalysis::UserEventFunc(), and TMeshAnalysis::UserPostLoop().

void TGo4MbsEvent::SetPrintEvent Int_t  num = 1,
Int_t  sid = -1,
Int_t  longw = 1,
Int_t  hexw = 1,
Int_t  dataw = 0
 

Set the "printout event" mode for the current mbs source.

See TGo4MbsSource::SetPrintEvent for parameter description.

Definition at line 350 of file TGo4MbsEvent.cxx.

References fxMbsSource, and TGo4MbsSource::SetPrintEvent().

Referenced by TGo4ComSetPrintEvent::ExeCom().


Friends And Related Function Documentation

friend class TGo4MbsSource [friend]
 

Definition at line 42 of file TGo4MbsEvent.h.


Member Data Documentation

TGo4EventHeader10 TGo4MbsEvent::fxHeader [private]
 

Definition at line 140 of file TGo4MbsEvent.h.

Referenced by GetCount(), GetDlen(), GetDummy(), GetSubtype(), GetTrigger(), GetType(), SetCount(), SetDlen(), SetDummy(), SetSubtype(), SetTrigger(), and SetType().

TObjArray* TGo4MbsEvent::fxSubEvArray [private]
 

dynamic array of subevents.

Definition at line 143 of file TGo4MbsEvent.h.

Referenced by TGo4MbsSource::BuildMbsSubEvent(), Fill(), ResetIterator(), TGo4MbsEvent(), and ~TGo4MbsEvent().

TIterator* TGo4MbsEvent::fxIterator [private]
 

Iterator for array.

Definition at line 146 of file TGo4MbsEvent.h.

Referenced by Fill(), NextSubEvent(), ResetIterator(), TGo4MbsEvent(), and ~TGo4MbsEvent().

TGo4MbsSource* TGo4MbsEvent::fxMbsSource [private]
 

points to mbssource if exists

Definition at line 149 of file TGo4MbsEvent.h.

Referenced by Fill(), GetMbsBufferHeader(), GetMbsSourceHeader(), Init(), and SetPrintEvent().

TGo4TreeSource* TGo4MbsEvent::fxTreeSource [private]
 

points to treesource if exists

Definition at line 152 of file TGo4MbsEvent.h.

Referenced by Fill(), and Init().

TGo4FileSource* TGo4MbsEvent::fxFileSource [private]
 

points to filesource if exists

Definition at line 155 of file TGo4MbsEvent.h.

Referenced by Fill(), and Init().


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 13:01:05 2008 for Go4-v3.04-1 by  doxygen 1.4.2