Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4EventServer/TGo4MbsEvent.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE 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 <iostream.h>
00020 
00021 #include "TClonesArray.h"
00022 
00023 #include "Go4Log/TGo4Log.h"
00024 #include "Go4Exceptions/Go4Exceptions.h"
00025 #include "Go4Event/TGo4EventElement.h"
00026 #include "Go4EventServer/TGo4EventHeader10.h"
00027 #include "Go4EventServer/TGo4MbsSubEvent.h"
00028 #include "MbsAPI/s_bufhe_swap.h"
00029 #include "MbsAPI/s_filhe_swap.h"
00030 
00031 class TGo4FileSource;
00032 
00037 class TGo4MbsEvent : public TGo4EventElement {
00038   friend class TGo4MbsSource;
00039 
00040   friend class TGo4MbsStream;
00041   friend class TGo4MbsEventServer;
00042   friend class TGo4MbsTransport;
00043   friend class TGo4MbsFile;
00044   friend class TGo4RevServ;
00045 
00046   public:
00047     // should be only used by ROOT streaming, but public otherwise ROOT problems!
00048     TGo4MbsEvent();
00049 
00054     TGo4MbsEvent(UInt_t subnum, Short_t* subids, UInt_t datasize=100);
00055 
00061     TGo4MbsEvent(UInt_t subnum, Char_t* subcrates, Char_t* controls, Short_t* procids, UInt_t* datasizes);
00062 
00063     virtual ~TGo4MbsEvent();
00064 
00072     virtual Int_t Fill();
00073 
00074     virtual Int_t Init();
00075 
00077     virtual void Clear(Option_t *t="");
00078 
00079     void Set(Int_t dlen=0, Short_t type=10, Short_t subtype=1,
00080             Short_t dummy=0, Short_t trigger=0, Int_t count=0);
00081 
00082     void PrintEvent();
00083 
00086     void ResetIterator();
00087 
00093     TGo4MbsSubEvent* NextSubEvent(Bool_t all=kFALSE);
00094 
00099     TGo4MbsSubEvent * GetSubEvent(Char_t subcrate,
00100                                   Char_t ctrl,
00101                                   Short_t procid);
00102 
00107     TGo4MbsSubEvent * GetSubEvent(Short_t procid);
00108 
00109     void SetDlen(Int_t dlen) { fxHeader.fxGSIHeader.fiDlen = dlen; }
00110     Int_t GetDlen() const { return fxHeader.fxGSIHeader.fiDlen; }
00111     Int_t GetIntLen() const { return (GetDlen()-4)*sizeof(Short_t)/sizeof(Int_t); }
00112 
00113     void SetType(Short_t type) { fxHeader.fxGSIHeader.fsType  = type; }
00114     Short_t GetType() const { return fxHeader.fxGSIHeader.fsType; }
00115 
00116     void SetSubtype(Short_t subtype) { fxHeader.fxGSIHeader.fsSubtype = subtype; }
00117     Short_t GetSubtype() const { return fxHeader.fxGSIHeader.fsSubtype; }
00118 
00119     void SetDummy(Short_t dummy) { fxHeader.fsDummy  = dummy; }
00120     Short_t GetDummy() const { return fxHeader.fsDummy; }
00121 
00122     void SetTrigger(Short_t trigger) { fxHeader.fsTrigger = trigger; }
00123     Short_t GetTrigger() const { return fxHeader.fsTrigger; }
00124 
00125     void SetCount(Int_t count) { fxHeader.fiCount = count; }
00126     Int_t GetCount() const { return fxHeader.fiCount; }
00127 
00129     s_filhe * GetMbsSourceHeader();
00130 
00132     s_bufhe * GetMbsBufferHeader();
00133 
00136     void SetPrintEvent(Int_t num=1, Int_t sid=-1, Int_t longw=1, Int_t hexw=1, Int_t dataw=0);
00137 
00138   private:
00139 
00141     TGo4EventHeader10 fxHeader;
00142 
00144     TObjArray* fxSubEvArray;
00145 
00147     TIterator * fxIterator;
00148 
00150     TGo4MbsSource* fxMbsSource; 
00151 
00153     TGo4TreeSource* fxTreeSource; 
00154 
00156     TGo4FileSource* fxFileSource; 
00157 
00158   ClassDef(TGo4MbsEvent,1)
00159 };
00160 
00161 #endif //TGO4MBSEVENT_H
00162 
00163 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:53 2005 for Go4-v2.10-5 by doxygen1.2.15