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

TGo4MbsEvent.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #ifndef TGO4MBSEVENT_H
00017 #define TGO4MBSEVENT_H
00018 
00019 #include "Riostream.h"
00020 
00021 #include "TGo4EventElement.h"
00022 
00023 #include "TGo4EventHeader10.h"
00024 #include "s_bufhe_swap.h"
00025 #include "s_filhe_swap.h"
00026 #include "TGo4MbsSubEvent.h"
00027 
00028 class TIterator;
00029 class TObjArray;
00030 class TGo4FileSource;
00031 class TGo4MbsSource;
00032 class TGo4TreeSource;
00033 class TGo4FileSource;
00034 class TGo4MbsSubEvent;
00035 
00040 class TGo4MbsEvent : public TGo4EventElement {
00041 
00042   friend class TGo4MbsSource;
00043 
00044   public:
00045 
00046     // should only be used in streaming
00047     TGo4MbsEvent();
00048 
00053     TGo4MbsEvent(UInt_t subnum, Short_t* subids, UInt_t datasize=100);
00054 
00060     TGo4MbsEvent(UInt_t subnum, Char_t* subcrates, Char_t* controls, Short_t* procids, UInt_t* datasizes);
00061 
00062     virtual ~TGo4MbsEvent();
00063 
00071     virtual Int_t Fill();
00072 
00073     virtual Int_t Init();
00074 
00076     virtual void Clear(Option_t *t="");
00077 
00078     void Set(Int_t dlen=0, Short_t type=10, Short_t subtype=1,
00079             Short_t dummy=0, Short_t trigger=0, Int_t count=0);
00080 
00081     void PrintEvent();
00082 
00085     void ResetIterator();
00086 
00092     TGo4MbsSubEvent* NextSubEvent(Bool_t all=kFALSE);
00093 
00098     TGo4MbsSubEvent * GetSubEvent(Char_t subcrate,
00099                                   Char_t ctrl,
00100                                   Short_t procid);
00101 
00106     TGo4MbsSubEvent * GetSubEvent(Short_t procid);
00107 
00108     void SetDlen(Int_t dlen) { fxHeader.fxGSIHeader.fiDlen = dlen; }
00109     Int_t GetDlen() const { return fxHeader.fxGSIHeader.fiDlen; }
00110     Int_t GetIntLen() const { return (GetDlen()-4)*sizeof(Short_t)/sizeof(Int_t); }
00111 
00112     void SetType(Short_t type) { fxHeader.fxGSIHeader.fsType  = type; }
00113     Short_t GetType() const { return fxHeader.fxGSIHeader.fsType; }
00114 
00115     void SetSubtype(Short_t subtype) { fxHeader.fxGSIHeader.fsSubtype = subtype; }
00116     Short_t GetSubtype() const { return fxHeader.fxGSIHeader.fsSubtype; }
00117 
00118     void SetDummy(Short_t dummy) { fxHeader.fsDummy  = dummy; }
00119     Short_t GetDummy() const { return fxHeader.fsDummy; }
00120 
00121     void SetTrigger(Short_t trigger) { fxHeader.fsTrigger = trigger; }
00122     Short_t GetTrigger() const { return fxHeader.fsTrigger; }
00123 
00124     void SetCount(Int_t count) { fxHeader.fiCount = count; }
00125     Int_t GetCount() const { return fxHeader.fiCount; }
00126 
00128     s_filhe * GetMbsSourceHeader();
00129 
00131     s_bufhe * GetMbsBufferHeader();
00132 
00135     void SetPrintEvent(Int_t num=1, Int_t sid=-1, Int_t longw=1, Int_t hexw=1, Int_t dataw=0);
00136 
00137   private:
00138 
00140     TGo4EventHeader10 fxHeader;
00141 
00143     TObjArray* fxSubEvArray;
00144 
00146     TIterator* fxIterator;
00147 
00149     TGo4MbsSource* fxMbsSource; 
00150 
00152     TGo4TreeSource* fxTreeSource; 
00153 
00155     TGo4FileSource* fxFileSource; 
00156 
00157   ClassDef(TGo4MbsEvent,1)
00158 };
00159 
00160 #endif //TGO4MBSEVENT_H
00161 
00162 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:08 2008 for Go4-v3.04-1 by  doxygen 1.4.2