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

beamtime/tof-tdctest/go4/GET4V10/TGet4v1Proc.h (r4864/r4849)

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);     // <- Done
00038       void ProcessTriggerMessage(UInt_t uRocId, TGet4v1MessageExtended& extMess,
00039                                      Int_t iTriggerIndex = -1);                           // <- Done
00041       Bool_t BuildHits(UInt_t uRocId, UInt_t uGet4Id, Bool_t bBufferToBuild);                // <- Done
00042       Bool_t 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       Bool_t ProcessGet4SuppEpochMessage(  UInt_t uRocId, TGet4v1MessageExtended& extMess); // <- Done
00053       Bool_t ProcessGet4SuppDataMessage(   UInt_t uRocId, TGet4v1MessageExtended& extMess); // <- Done
00054       Bool_t ProcessGet4ReprocessSuppData( UInt_t uRocId, UInt_t uGet4Id ); // <- Done
00055       
00056       Int_t Process32BitGet4Message(UInt_t uRocId, TGet4v1MessageExtended& extMess);   // <- Done
00057 
00058       Bool_t fb24bitsReadoutDetected;
00059       Bool_t fb32bitsReadoutDetected;
00060       Bool_t AnalyzeAllGet4Channels( Get4v1Event &eventFull );                          // <- Done
00061       Bool_t AnalyzeAllGet4Channels24Bits( Get4v1Event &eventFull );                   // <- Done
00062       Bool_t AnalyzeAllGet4Channels32Bits( Get4v1Event &eventFull );                   // <- Done
00063 
00064       Bool_t PrintRocEpochIndexes(UInt_t uRocId, Int_t uMessagePriority = 0);           // <- Done
00065       Bool_t PrintRocEpochCycles(UInt_t uRocId, Int_t uMessagePriority = 0);            // <- Done
00066 
00067       /* after event completion reset until next triggers are found*/
00068       void ResetTrigger();
00069 
00070       /* after all input buffers are done, we reset end of buffer flag*/
00071       void ResetEndOfBuffer();
00072 
00073       /* For Debug histograms*/
00074       void UpdateLeadingDnlHistograms( Get4v1Event &eventFull, UInt_t uRocId = 0 );
00075       void UpdateTrailingDnlHistograms( Get4v1Event &eventFull, UInt_t uRocId = 0 );
00076 
00077       TGet4v1Param   *fParam;
00078       TGet4v1Event *fOutputEvent;  
00079       Get4v1Event   fCurrentGet4Event;
00080 
00081       Bool_t fIsTimeSorted; // true if messages within mbs container are strictly time sorted
00082 
00083       TH1           *fEvntSize;
00084       TH1           *fEvtPerProc;
00085       TH1           *fEvtIndexRoc;
00086       TH1           *fEvtIndexTrig;
00087       TH1           *fEvtIndexVme;
00088       UInt_t uInitialEvent;
00089       UInt_t uEventCountsRoc;
00090       UInt_t uEventCountsTrig;
00091       UInt_t uEventCountsVme;
00092       TH1           *fTriggerNumber;
00093 
00094       TH1           *fMsgsPerRoc;
00095       TH1           *fTriggerPerRoc;
00096 
00097       TH1* fDeltaTriggerTime;            // absolute time difference of all hits with respect to global trigger
00098       TGo4WinCond* fGlobalTriggerWind;   // time window to assign hits to output event (relative to last global trigger)
00099       TGo4WinCond* fGlobalAUXWind;       // time window to assign AUX to output event (relative to last global trigger)
00100       TGo4WinCond* fGlobalSelfTriggWind; // time window to detect coincidence of channel in self triggering case
00101 
00102       ULong_t fTotaldatasize;
00103 
00104       UInt_t         fCurrEvntTm;
00105 
00106       Double_t       fLastRateTm; // last time of rate measurement
00107       Double_t       fRate;       // currently calculated rate
00108 
00109       std::vector<TGet4v1Rec> ROC;  
00110       Bool_t fFirstSubEvent;     
00111 
00112       Bool_t fHasNewGlobalTrigger; 
00113       unsigned fTriggerCounter; 
00114       
00115 
00118       // General counters (allow for example event jumps by stream server)
00119       UInt_t     printData;
00120       UInt_t     uNbEvents[MAX_ROC];
00121       UInt_t     uFirstEventIndex[MAX_ROC];
00122       UInt_t     uPrevEventIndex[MAX_ROC];
00123       
00124       // Real events counters
00125       UInt_t     uEventInsideMbsEvtCount[MAX_ROC];
00126       UInt_t     uRealEventsCount[MAX_ROC];
00127       UInt_t     uNotEmptyEventInsideMbsEvtCount[MAX_ROC];
00128       UInt_t     uNotEmptyRealEventsCount[MAX_ROC];
00129 
00130       // Variables
00131       Get4v1Hit fHitTemp;
00132       // Histograms
00133       
00134 
00135       // Get4 v1.0
00136 
00137       // 24 bits
00138 
00139       // 32 bits
00140    private:
00141 
00146       /*#  TGet4v1Rec lnkTGet4v1Rec; */
00147 
00148 
00149       ClassDef(TGet4v1Proc,1)
00150 };
00151 
00152 #endif //TGET4V1PROC_H
00153 

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