• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

beamtime/gsi-aug12/get4v10/go4/GET4V10/TGet4v1Proc.h (r4864/r3872)

Go to the documentation of this file.
00001 #ifndef TGET4V1PROC_H
00002 #define TGET4V1PROC_H
00003 
00004 #include "roc/Iterator.h"
00005 
00006 #include <vector>
00007 #include <stdint.h>
00008 
00009 #include "TCBMBeamtimeProc.h"
00010 
00011 #include "roc/Message.h"
00012 #include "roc/Board.h"
00013 
00014 class TGet4v1Param;
00015 class TGo4MbsSubEvent;
00016 class TGet4MessageFull;
00017 
00018 #include "TGet4v1Event.h"
00019 #include "TGet4v1Rec.h"
00020 
00021 
00022 class TGet4v1Proc : public TCBMBeamtimeProc {
00023    public:
00024       TGet4v1Proc();  // <- Done
00025       TGet4v1Proc(const char* name);
00026       virtual ~TGet4v1Proc() ;                                                          // <- Done
00027 
00028       virtual void InitEvent(TGo4EventElement * evt);                                   // <- Done
00029 
00030       virtual void ProcessSubevent(TGo4MbsSubEvent* subevt);                           // <- Done
00031 
00032       virtual void FinalizeEvent();
00033 
00034    protected:
00035 
00037       void ProcessExtendedMessage(UInt_t uRocId, TGet4v1MessageExtended& extMess);     // <- 1/2 Done (24 bit?)
00038       void ProcessTriggerMessage(UInt_t uRocId, TGet4v1MessageExtended& extMess);      // <- 1/2 Done (24 bit?)
00040       Bool_t BuildHits(UInt_t uRocId, UInt_t uGet4Id);                                   // <- 1/2 Done (24 bit?)
00041       Bool_t BuildHitsAfterTrigg(UInt_t uRocId, UInt_t uGet4Id);                        // <- 1/2 Done (24 bit?)
00042       void CheckHit(UInt_t uRocId, UInt_t uGet4Id, Get4v1Hit& hit);                      // <- Done
00043 
00044       void CheckEventClosure();                                                         // <- Done
00045 
00047       Bool_t ProcessRocSyncMessage(    UInt_t uRocId, TGet4v1MessageExtended& extMess); // <- Done
00048       Bool_t ProcessRocEpochMessage(  UInt_t uRocId, TGet4v1MessageExtended& extMess);  // <- Done
00049       Bool_t ProcessGet4EpochMessage(  UInt_t uRocId, TGet4v1MessageExtended& extMess); // <- Done
00050       Bool_t ProcessGet4DataMessage(   UInt_t uRocId, TGet4v1MessageExtended& extMess); // <- Done
00051       Bool_t ProcessGet4ExtSyncMessage(UInt_t uRocId, TGet4v1MessageExtended& extMess); // <- NOT Done
00052       
00053       Int_t Process32BitGet4Message(UInt_t uRocId, TGet4v1MessageExtended& extMess);   // <- Done
00054 
00055       Bool_t fb32bitsReadoutDetected;
00056       Bool_t AnalyzeAllGet4Channels( Get4v1Event &eventFull );                          // <- NOT Done
00057       Bool_t AnalyzeAllGet4Channels24Bits( Get4v1Event &eventFull );                   // <- NOT Done
00058       Bool_t AnalyzeAllGet4Channels32Bits( Get4v1Event &eventFull );                   // <- NOT Done
00059 
00060       Bool_t PrintRocEpochIndexes(UInt_t uRocId, Int_t uMessagePriority = 0);           // <- Done
00061       Bool_t PrintRocEpochCycles(UInt_t uRocId, Int_t uMessagePriority = 0);            // <- Done
00062 
00063       /* after event completion reset until next triggers are found*/
00064       void ResetTrigger();
00065 
00066       /* after all input buffers are done, we reset end of buffer flag*/
00067       void ResetEndOfBuffer();
00068 
00069       /* For Debug histograms*/
00070       void UpdateLeadingDnlHistograms( Get4v1Event &eventFull, UInt_t uRocId = 0 );
00071       void UpdateTrailingDnlHistograms( Get4v1Event &eventFull, UInt_t uRocId = 0 );
00072 
00073       TGet4v1Param   *fParam;
00074       TGet4v1Event *fOutputEvent;  
00075       Get4v1Event   fCurrentGet4Event;
00076 
00077       Bool_t fIsTimeSorted; // true if messages within mbs container are strictly time sorted
00078 
00079       TH1           *fEvntSize;
00080 
00081       TH1           *fMsgsPerRoc;
00082       TH1           *fTriggerPerRoc;
00083 
00084       TH1* fDeltaTriggerTime;            // absolute time difference of all hits with respect to global trigger
00085       TGo4WinCond* fGlobalTriggerWind;   // time window to assign hits to output event (relative to last global trigger)
00086       TGo4WinCond* fGlobalAUXWind;       // time window to assign AUX to output event (relative to last global trigger)
00087       TGo4WinCond* fGlobalSelfTriggWind; // time window to detect coincidence of channel in self triggering case
00088 
00089       ULong_t fTotaldatasize;
00090 
00091       UInt_t         fCurrEvntTm;
00092 
00093       Double_t       fLastRateTm; // last time of rate measurement
00094       Double_t       fRate;       // currently calculated rate
00095 
00096       std::vector<TGet4v1Rec> ROC;  
00097       Bool_t fFirstSubEvent;     
00098 
00099       Bool_t fHasNewGlobalTrigger; 
00100       unsigned fTriggerCounter; 
00101       
00102 
00105       // General counters (allow for example event jumps by stream server)
00106       UInt_t     printData;
00107       UInt_t     uNbEvents[MAX_ROC];
00108       UInt_t     uFirstEventIndex[MAX_ROC];
00109       UInt_t     uPrevEventIndex[MAX_ROC];
00110       
00111       // Variables
00112       Get4v1Hit fHitTemp;
00113       // Histograms
00114       
00115 
00116       // Get4 v1.0
00117 
00118       // 24 bits
00119 
00120       // 32 bits
00121    private:
00122 
00127       /*#  TGet4v1Rec lnkTGet4v1Rec; */
00128 
00129 
00130       ClassDef(TGet4v1Proc,1)
00131 };
00132 
00133 #endif //TGET4V1PROC_H
00134 

Generated on Tue Dec 10 2013 04:52:20 for ROCsoft by  doxygen 1.7.1