GSI Object Oriented Online Offline (Go4)
GO4-5.3.2
|
#include <TGo4MbsSubEvent.h>
Public Member Functions | |
TGo4MbsSubEvent () | |
TGo4MbsSubEvent (Int_t datasize) | |
virtual | ~TGo4MbsSubEvent () |
virtual Int_t | Fill () |
virtual void | Clear (Option_t *t="") |
virtual void | PrintEvent () |
void | PrintMbsSubevent (Bool_t longw=kTRUE, Bool_t hexw=kTRUE, Bool_t dataw=kTRUE) |
void | Set (Int_t dlen, Short_t type=10, Short_t subtype=1, Short_t procid=0, Char_t subcrate=0, Char_t ctrl=0) |
void | SetDlen (Int_t dlen) |
Int_t | GetDlen () const |
Int_t | GetByteLen () const |
Int_t | GetIntLen () const |
void | SetType (Short_t type) |
Short_t | GetType () const |
void | SetSubtype (Short_t subtype) |
Short_t | GetSubtype () const |
void | SetProcid (Short_t procid) |
Short_t | GetProcid () const |
void | SetSubcrate (Char_t subcrate) |
Char_t | GetSubcrate () const |
void | SetControl (Char_t control) |
Char_t | GetControl () const |
void | SetFullId (Int_t fullid) |
Int_t | GetFullId () const |
Int_t | GetAllocatedLength () const |
Int_t * | GetDataField () |
Int_t | Data (Int_t i) const |
Bool_t | IsFilled () const |
Public Member Functions inherited from TGo4EventElement | |
TGo4EventElement () | |
TGo4EventElement (const char *name) | |
TGo4EventElement (const char *aName, const char *aTitle, Short_t aBaseCat=0) | |
virtual | ~TGo4EventElement (void) |
void | SetValid (Bool_t on) |
Bool_t | IsValid () const |
void | SetEventSource (TGo4EventSource *src) |
void | SetParent (TGo4EventElement *par) |
void | SetKeepContents (Bool_t on=kTRUE) |
TGo4EventElement * | GetParent () const |
virtual TGo4EventElement * | GetChild (const char *name) |
TGo4EventSource * | GetEventSource () const |
Bool_t | CheckEventSource (const char *classname) |
virtual Int_t | Init () |
virtual void | makeBranch (TBranch *parent) |
virtual void | deactivate () |
virtual void | activate () |
virtual void | clearAll (Int_t) |
virtual Bool_t | isComposed () |
virtual Short_t | getId () |
virtual void | setDebug (Bool_t debug) |
virtual TGo4EventElement & | operator[] (Int_t) |
virtual void | Print (Option_t *option="") const |
virtual void | synchronizeWithTree (TTree *tree, TGo4EventElement **var_ptr=0) |
virtual Int_t | activateBranch (TBranch *branch, Int_t index=0, TGo4EventElement **var_ptr=0) |
virtual TTree * | CreateSampleTree (TGo4EventElement **sample=0) |
void | ShowSampleTree () |
Private Member Functions | |
void | ReAllocate (Int_t newsize) |
Private Attributes | |
Bool_t | fbIsFilled |
Bool_t | fbIsDataOwner |
TGo4SubEventHeader10 | fxHeader |
Int_t | fiAllocLen |
Int_t * | fiData |
Friends | |
class | TGo4MbsSource |
class | TGo4MbsEvent |
Additional Inherited Members | |
Protected Attributes inherited from TGo4EventElement | |
Short_t | fIdentifier |
Bool_t | fDebug |
Bool_t | fbKeepContents |
Debug level. More... | |
Subevent class for gsi mbs data.
Definition at line 24 of file TGo4MbsSubEvent.h.
TGo4MbsSubEvent::TGo4MbsSubEvent | ( | ) |
Definition at line 21 of file TGo4MbsSubEvent.cxx.
References GO4TRACE.
TGo4MbsSubEvent::TGo4MbsSubEvent | ( | Int_t | datasize | ) |
Definition at line 33 of file TGo4MbsSubEvent.cxx.
References fbIsDataOwner, fiAllocLen, fiData, and GO4TRACE.
|
virtual |
Definition at line 50 of file TGo4MbsSubEvent.cxx.
References Clear(), TGo4Log::Debug(), fbIsDataOwner, fiData, GetAllocatedLength(), and GO4TRACE.
|
virtual |
Reimplemented from TGo4EventElement.
Definition at line 146 of file TGo4MbsSubEvent.cxx.
References TGo4SubEventHeader10::Clear(), fbIsDataOwner, fbIsFilled, TGo4MbsSource::fguLONGBYSHORT, fiAllocLen, fiData, fxHeader, GetDlen(), GO4TRACE, and Set().
Referenced by TGo4MbsEvent::Clear(), ReAllocate(), and ~TGo4MbsSubEvent().
|
inline |
Returns the value at position i in the fiData field. If Index i is out of DLen range, zero is returned.
Definition at line 90 of file TGo4MbsSubEvent.h.
References fiData, and GetAllocatedLength().
Referenced by main().
|
inlinevirtual |
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=fxEventSource->GetA(); etc ), or by direct copy to the member (like fxEventSource->FillMemoryAt(&myevent.a);)
Reimplemented from TGo4EventElement.
Definition at line 38 of file TGo4MbsSubEvent.h.
|
inline |
Return length of allocated memory for data field.
Definition at line 82 of file TGo4MbsSubEvent.h.
References fiAllocLen.
Referenced by Data(), and ~TGo4MbsSubEvent().
|
inline |
Return raw data length in bytes
Definition at line 58 of file TGo4MbsSubEvent.h.
References GetDlen().
Referenced by GetIntLen().
|
inline |
Definition at line 76 of file TGo4MbsSubEvent.h.
References TGo4SubEventHeader10::fcControl, and fxHeader.
Referenced by TGo4MbsEvent::AddSubEvent(), TGo4MbsEvent::GetSubEvent(), and PrintMbsSubevent().
|
inline |
Direct access to the fiData field pointer. User has to care about allocated range as specified in fiAllocLen.
Definition at line 86 of file TGo4MbsSubEvent.h.
References fiData.
Referenced by TXXXProc::BuildEvent(), TXXXUnpackProc::BuildEvent(), TGo4SimpleEventProcessor::BuildSimpleEvent(), PrintMbsSubevent(), TMeshUnpackProc::UnpackBranch1(), TMeshUnpackProc::UnpackBranch2(), and TMeshUnpackProc::UnpackBranch3().
|
inline |
Definition at line 55 of file TGo4MbsSubEvent.h.
References TGo4GSIEventHeader::fiDlen, TGo4SubEventHeader10::fxGSIHeader, and fxHeader.
Referenced by TGo4SimpleEventProcessor::BuildSimpleEvent(), Clear(), GetByteLen(), PrintMbsSubevent(), TMeshUnpackProc::UnpackBranch1(), TMeshUnpackProc::UnpackBranch2(), and TMeshUnpackProc::UnpackBranch3().
|
inline |
Definition at line 79 of file TGo4MbsSubEvent.h.
References TGo4SubEventHeader10::fiFullid, and fxHeader.
|
inline |
Return raw data length in int (4-bytes)
Definition at line 61 of file TGo4MbsSubEvent.h.
References GetByteLen().
Referenced by TXXXProc::BuildEvent(), TXXXUnpackProc::BuildEvent(), and PrintMbsSubevent().
|
inline |
Definition at line 70 of file TGo4MbsSubEvent.h.
References TGo4SubEventHeader10::fsProcid, and fxHeader.
Referenced by TGo4MbsEvent::AddSubEvent(), TGo4SimpleEventProcessor::BuildSimpleEvent(), TGo4MbsEvent::GetSubEvent(), TGo4MbsEvent::PrintMbsEvent(), and PrintMbsSubevent().
|
inline |
Definition at line 73 of file TGo4MbsSubEvent.h.
References TGo4SubEventHeader10::fcSubcrate, and fxHeader.
Referenced by TGo4MbsEvent::AddSubEvent(), TXXXProc::BuildEvent(), TXXXUnpackProc::BuildEvent(), TGo4MbsEvent::GetSubEvent(), PrintMbsSubevent(), TMeshUnpackProc::UnpackBranch1(), TMeshUnpackProc::UnpackBranch2(), and TMeshUnpackProc::UnpackBranch3().
|
inline |
Definition at line 67 of file TGo4MbsSubEvent.h.
References TGo4GSIEventHeader::fsSubtype, TGo4SubEventHeader10::fxGSIHeader, and fxHeader.
Referenced by PrintMbsSubevent().
|
inline |
Definition at line 64 of file TGo4MbsSubEvent.h.
References TGo4GSIEventHeader::fsType, TGo4SubEventHeader10::fxGSIHeader, and fxHeader.
Referenced by PrintMbsSubevent().
|
inline |
true if this subevent was filled since the last Clear()
Definition at line 94 of file TGo4MbsSubEvent.h.
References fbIsFilled.
Referenced by TGo4MbsEvent::NextSubEvent().
|
virtual |
Print event with default arguments
Reimplemented from TGo4EventElement.
Definition at line 66 of file TGo4MbsSubEvent.cxx.
References GO4TRACE, and PrintMbsSubevent().
void TGo4MbsSubEvent::PrintMbsSubevent | ( | Bool_t | longw = kTRUE , |
Bool_t | hexw = kTRUE , |
||
Bool_t | dataw = kTRUE |
||
) |
Print MBS subevent
longw | - data in long format (4 bytes) |
hexw | - print in hex format |
dataw | - print raw data |
Definition at line 95 of file TGo4MbsSubEvent.cxx.
References GetControl(), GetDataField(), GetDlen(), GetIntLen(), GetProcid(), GetSubcrate(), GetSubtype(), GetType(), and l.
Referenced by PrintEvent(), and TGo4MbsEvent::PrintMbsEvent().
|
private |
Allocate the data field with newsize. Free the previously allocated field before, and set new fiAllocLen value.
Definition at line 171 of file TGo4MbsSubEvent.cxx.
References Clear(), TGo4Log::Debug(), fbIsDataOwner, fiAllocLen, fiData, and GO4TRACE.
Referenced by TGo4MbsEvent::AddSubEvent().
void TGo4MbsSubEvent::Set | ( | Int_t | dlen, |
Short_t | type = 10 , |
||
Short_t | subtype = 1 , |
||
Short_t | procid = 0 , |
||
Char_t | subcrate = 0 , |
||
Char_t | ctrl = 0 |
||
) |
Definition at line 131 of file TGo4MbsSubEvent.cxx.
References SetDlen(), SetSubtype(), and SetType().
Referenced by Clear().
|
inline |
Definition at line 75 of file TGo4MbsSubEvent.h.
References TGo4SubEventHeader10::fcControl, and fxHeader.
Referenced by TGo4MbsEvent::SimpleInit(), and TGo4MbsEvent::TGo4MbsEvent().
|
inline |
Definition at line 54 of file TGo4MbsSubEvent.h.
References TGo4GSIEventHeader::fiDlen, TGo4SubEventHeader10::fxGSIHeader, and fxHeader.
Referenced by TGo4MbsEvent::AddSubEvent(), and Set().
|
inline |
Definition at line 78 of file TGo4MbsSubEvent.h.
References TGo4SubEventHeader10::fiFullid, and fxHeader.
|
inline |
Definition at line 69 of file TGo4MbsSubEvent.h.
References TGo4SubEventHeader10::fsProcid, and fxHeader.
Referenced by TGo4MbsEvent::SimpleInit(), and TGo4MbsEvent::TGo4MbsEvent().
|
inline |
Definition at line 72 of file TGo4MbsSubEvent.h.
References TGo4SubEventHeader10::fcSubcrate, and fxHeader.
Referenced by TGo4MbsEvent::SimpleInit(), and TGo4MbsEvent::TGo4MbsEvent().
|
inline |
Definition at line 66 of file TGo4MbsSubEvent.h.
References TGo4GSIEventHeader::fsSubtype, TGo4SubEventHeader10::fxGSIHeader, and fxHeader.
Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().
|
inline |
Definition at line 63 of file TGo4MbsSubEvent.h.
References TGo4GSIEventHeader::fsType, TGo4SubEventHeader10::fxGSIHeader, and fxHeader.
Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().
|
friend |
Definition at line 27 of file TGo4MbsSubEvent.h.
|
friend |
Definition at line 26 of file TGo4MbsSubEvent.h.
|
private |
True if subevent owns data field. note that this should not be streamed to root file!
Definition at line 108 of file TGo4MbsSubEvent.h.
Referenced by TGo4MbsEvent::AddSubEvent(), Clear(), ReAllocate(), TGo4MbsSubEvent(), and ~TGo4MbsSubEvent().
|
private |
True if this subevent has already been filled in this event cycle. For subsequent subevents of identical header ids, prevents overwriting.
Definition at line 104 of file TGo4MbsSubEvent.h.
Referenced by TGo4MbsEvent::AddSubEvent(), Clear(), and IsFilled().
|
private |
Length of the allocated data field. Is not equal to the subevent data length which can be smaller. On filling the subevent, it is tested if the source data fits into the already allocated field; if the source data is larger, we will re-allocate the field with the larger size before filling it. If the source data is smaller, we leave the data field as is and use only the first DLen words.
Definition at line 121 of file TGo4MbsSubEvent.h.
Referenced by TGo4MbsEvent::AddSubEvent(), Clear(), GetAllocatedLength(), ReAllocate(), and TGo4MbsSubEvent().
|
private |
Pointer to external integer field containing the subevent data. Length of this field may be changed dynamically depending on the maximum length of the incoming subevent of this type.
Definition at line 127 of file TGo4MbsSubEvent.h.
Referenced by TGo4MbsEvent::AddSubEvent(), Clear(), Data(), GetDataField(), ReAllocate(), TGo4MbsSubEvent(), and ~TGo4MbsSubEvent().
|
private |
Definition at line 111 of file TGo4MbsSubEvent.h.
Referenced by TGo4MbsEvent::AddSubEvent(), Clear(), GetControl(), GetDlen(), GetFullId(), GetProcid(), GetSubcrate(), GetSubtype(), GetType(), SetControl(), SetDlen(), SetFullId(), SetProcid(), SetSubcrate(), SetSubtype(), and SetType().