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

onlinemonitor/spadicV10monitor/TSpadicV10Rec.h (r4864/r3199)

Go to the documentation of this file.
00001 #ifndef TSPADICV10REC_H
00002 #define TSPADICV10REC_H
00003 
00004 
00005 #include <vector>
00006 #include <stdint.h>
00007 
00008 #include "TCBMBeamtimeProc.h"
00009 #include "sp605/Iterator.h"
00010 #include "sp605/Message.h"
00011 #include "sp605/Board.h"
00012 #include "TSpadicV10Event.h"
00013 
00014 class TSpadicV10Param;
00015 class TPedestalExtractor;
00016 class TGo4MbsSubEvent;
00017 class TLatex;
00018 
00019 class TGo4WinCond;
00020 
00021 
00022 #define NUM_DIFFS 16
00023 
00024 struct TSpadicV10Rec {
00025 
00026    bool   fActive;  // indicate that record for spadic is active
00027 
00028    Int_t fSpadicV10Id;
00029 
00030    uint32_t   fCurrEpoch;  // current epoch on the spadic
00031 
00032    TH2* fSpadic_trace2D;  // current traces vs channel number map per frontend group
00033    TH1* fSpadic_trace[MAX_SPADICV10CHANNELS]; // current  trace for each channel
00034    TH1* fSpadic_trace_clean[MAX_SPADICV10CHANNELS]; // cleaned trace for each channel
00035    TH1* fSpadic_ADCdist[MAX_SPADICV10CHANNELS]; // cleaned trace for each channel
00036    TH2* fSpadic_overflows; // map of overflow counts for each group/channel
00037    TH1* fMsgTypes; // messages types
00038    TH1* fTrigTypes; // channel trigger types
00039    TH1* fStopTypes; // messagestop types
00040    TH1* fInfoTypes; // info message types
00041    TH1* fTrigger_Chs; // channel occupation for the trigger condition
00042 
00043    //TH1* fSysUserTypes; // user system messages
00044    //TH1* fFebADC[2]; // value of ADC on the FEBs
00045 
00046    TGo4WinCond* fAUXWind; // time window to assign AUX to event (relative to last trigger, differs from NX messages)
00047    TH1* fTrigger_Fronts[MAX_SPADICV10_GROUPS]; // time shift between last trigger and frontend hit
00048 
00049    uint64_t fLastTm[MAX_SPADICV10CHANNELS];  //
00050 
00051    TSpadicV10Rec();
00052 };
00053 
00054 
00055 struct TSpadicV10BoardRec {
00056 
00057    bool  fActive;  // indicate that record for board is active
00058 
00059    sp605::Iterator fIter; // iterator of current spadic input buffer
00060 
00061    TH1* fMsgCnt; // messages count for all kind of sources Black-Box and SPADICS
00062    TH1* fMsgTypes; // SYNC/ROC messages types
00063    TH1* fAUXch; // filling of AUX channels
00064    TH1* fAUXt[MAX_SPADICV10_AUX]; // time distribution of aux signals
00065    TH1* fSYNCt[MAX_SPADICV10_SYNC]; // time distribution of sync signals
00066    TH1* fSysTypes; // system messages types
00067 
00068    TH1* fTrigger; // histogram for trigger time diff
00069    TH1* fTrigger_100; // histogram for trigger time diff
00070    TGo4WinCond* fTriggerWind; // time window to assign hits to event (relative to last trigger)
00071    TH1* fEvntMultipl; // event multiplicity (how many messages selected)
00072 
00073    std::vector<TSpadicV10Rec> SPADICS; // vector with data for spadics
00074 
00075    std::vector<TSpadicV10MessageExtended> fUnprocessedMsg; // buffer of not accounted hit messages of previous mbs evnts
00076 
00077    Bool_t fIsEventComplete; // flag to indicate that all messages in time window are captured
00078    Bool_t fHasNewData;     // flag indicates if new data was produced for the ROC
00079    Bool_t fHasNewTrigger; // flag to indicate that we have new local trigger message for this ROC
00080    Bool_t fHasEndOfBuffer; // flag to indicate that mbs input buffer is fully processed
00081    UInt_t fTriggersPerBuffer; // count number of aux triggers per buffer (new buffer if this is above parameter maximum)
00082    UInt_t fLoopsPerBuffer; // count loops over same mbs input event in keep mode. (new buffer is this is above parameter maximumd)
00083 
00084    uint64_t  fStartSyncTm; // time of SYNC signal in the beginning of subevent
00085    uint64_t  fStopSyncTm; // time of SYNC signal at the end of subevent
00086    Int_t     fDabcSeparator; // sync id of the dabc event separator. For event finalizing condition
00087 
00088    uint64_t fLastTriggerTm; // last time of trigger signal (defined by parameter)
00089    uint64_t fLastAuxTm[MAX_SPADICV10_AUX];  // last time of rising edge of AUX signals
00090    uint64_t fLastSyncTm[MAX_SPADICV10_SYNC]; // last time of SYNC signals
00091    uint32_t fLastSyncId[MAX_SPADICV10_SYNC]; // last ID of SYNC signals
00092 
00093 
00094    TSpadicV10BoardRec();
00095 
00096    void MakeSpadicsVector(UInt_t mask);
00097 
00098    unsigned numSpadics() const { return SPADICS.size(); }
00099 
00100    bool AssertSpadic(unsigned spid) const { return spid < SPADICS.size() ? SPADICS[spid].fActive : false; }
00101 
00102 };
00103 
00104 #endif
00105 
00106 

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