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

beamtime/tof-tdctest/go4/GET4V10/TGet4v1Param.h (r4864/r4860)

Go to the documentation of this file.
00001 #ifndef TGET4V1PARAM_H
00002 #define TGET4V1PARAM_H
00003 
00004 #include "TGo4Parameter.h"
00005 #include "TGet4v1Event.h"
00006 
00007 class TGo4EventElement;
00008 
00009 #define MAX_DATA_TRIGG 24
00010 #define MAX_SEC_TRIG    8
00011 
00012 class TGet4v1Param : public TGo4Parameter {
00013    public:
00014 
00015       // default constructor - important for streamer
00016       TGet4v1Param();
00017 
00018       TGet4v1Param(const char* name);
00019 
00020       virtual ~TGet4v1Param();
00021 
00022       /* implemented to copy setup of active roc to roc event */
00023       virtual Bool_t UpdateFrom(TGo4Parameter* rhs);
00024 
00025       /* Actual set roc event configuration. To be used from setup macro*/
00026       Bool_t SetConfigRocs();
00027 
00028       UInt_t numRocs;  // maximum roc id in use +1
00029 
00030       Bool_t activeRoc[MAX_ROC]; //enable roc of id
00031 
00032       Bool_t noTrigger;  // ignore trigger window and take all messages with initial event division
00033 
00034       Int_t triggerSignal; // 0 .. 3 is AUXs, 10-11 is SYNCs
00035 
00036       Bool_t globalTrigger; // true for selecting messages under global corrected time window, false for using separate windows for each roc
00037 
00038       UInt_t masterRoc; // id number of ROC which is time/trigger reference for global roc
00039 
00040       UInt_t maxBufferTriggers; // maximum number of triggers in same mbs input buffer until retrieving next
00041       UInt_t maxBufferLoops; // maximum number of loops over same mbs input buffer until retrieving next
00042 
00043       Double_t timeScale[MAX_ROC]; // scaling factor for time correction
00044 
00045       Int_t timeShift[MAX_ROC]; // instrumental time shift between triggers of each ROC
00046 
00047       Bool_t doSorting;  // perform time sorting of messages
00048 
00049       Bool_t         bGet4Debug;           // provide debug information about Get4 errors
00050       
00051       Bool_t bTriggerAfterData;       // kFALSE = SYNC arriving before the event data, kTRUE = after
00052 
00054       Int_t     iEventNbGap;          // -1 = check Off, Gap in event nember between get4 events
00055       Int_t     uEventNbCycle;        // No Online Change - Size of the event nember cycle
00056       UInt_t    uSyncCycleSize;       // No Online Change - Size of the synchronization cycle in epochs
00057       // No Online Change - kFALSE = Normal epoch operation,
00058       //                    kTRUE = 24b readout suppressed epoch mode, epoch only just after data
00059       Bool_t    bSuppressedEpochs;    // No Online Change - For suppressed epoch mode in 24b readout
00060       Bool_t    bLongTimeHistos;      // Enable some Long duration counts monitoring histos (10 days)
00061       ULong64_t uRocCycleSize;        // No Online Change - Size of roc epoch counter cycle in epochs
00062       UInt_t    uMainSyncCycleSize;   // No Online Change - Size of the synchronization cycle in Main clock (250MHz) epochs
00063       UInt_t    uNbRocsGet4;          // No Online Change - Nb of Rocs "GET4" in setup
00064       UInt_t    uGet4RocsMapping[MAX_ROC]; // No Online Change - Roc-GET4 id among indexes of all rocs
00065       UInt_t    uNbGet4;                   // No Online Change - Total Nb of active FEET boards in setup
00066       UInt_t    uGet4Mapping[MAX_GET4];    // No Online Change - Get4 Mapping: there should be always at least 2*nbfeets entries here
00067       UInt_t    uGet4Active[MAX_GET4];          // Activated Get4 chips (indexes after remapping => not hardware map !)
00068       UInt_t    uGet4EdgeInversion[MAX_GET4];   // Edges inversion: affect all channels of a GET4 chip
00069       UInt_t    uSilentMode;          // Remove all printouts => Blind mode!
00070       UInt_t    uDebugHistoOn;        // No Online Change - Enable/Disable general debug histograms
00071       UInt_t    uDebugPrintOn;        // Number of data messages to be printed on screen for debug
00072       UInt_t    uGet4Print;           // Number of data messages to be printed on screen for debug
00073 
00074       UInt_t    uNbTriggerChan;       // Number of Get4 channels to use for the coincidence trigger, max 8
00075       UInt_t    uCoincidenceWinSize;  // Size of the coincidence window for trigger building
00076       UInt_t    uTriggerChannels[8];  // Channels to be used for building a coincidence trigger
00077       /*************************************/
00078 
00079       /************* GET4 v1.0 *************/
00080       Bool_t    b32bReadoutModeGet4v1;   // Get4 v1.0 readout mode: kFALSE = 24 bits, kTRUE = 32 bits
00081       /*************************************/
00082       /************* GET4 v1.x debug *******/
00083       Double_t  dMaxTot;                 // Maximal allowed Tot for 24 bits hit building, in ps
00084       Bool_t    bTotHistoEnable;         // Enable Tot histograms
00085       Bool_t    bDebugHistoEnable;       // Enable the time difference, finetime and DNL histograms
00086       UInt_t    uNbEventsDnlUpdate;      // Nb of events between 2 updates of the DNL histograms
00087       UInt_t    uGet4TimeDiffChip1;      // Index of first chip to be used for time difference histos
00088       UInt_t    uGet4TimeDiffChip2;      // Index of first chip to be used for time difference histos
00089       Bool_t    bChannelRateHistoEnable; // Enable Rate histograms for each channel
00090       Bool_t    bChipRateHistoEnable;    // Enable Rate histograms for each chip
00091       /*************************************/
00092       /*********** free-streaming **********/
00093       Bool_t    bRawDataMode;            // kFALSE = DABC data format, 1 SYNC/Event, kTRUE = RAW DATA format, all messages
00094       Bool_t    bFreeStreaming;          // kFALSE = Sync trigger/no trigger, kTRUE= online detection/selection from data
00095       UInt_t    uNbTriggers;             // Number of user defined data triggers
00096       UInt_t    uNbSecondarySelectionCh[MAX_DATA_TRIGG]; // Nb of secondary channels to use for event detection/selection
00097       UInt_t    uMainSelectionTdc[MAX_DATA_TRIGG];       // TDC index of the main signal for online selection. Selection window is relative to this
00098       UInt_t    uMainSelectionChannel[MAX_DATA_TRIGG];   // Channel of the main signal for online selection. Selection window is relative to this
00099       UInt_t    uSecondarySelectionTdc[MAX_DATA_TRIGG][MAX_SEC_TRIG];     // TDC index of the secondary signals for online selection.
00100       UInt_t    uSecondarySelectionChannel[MAX_DATA_TRIGG][MAX_SEC_TRIG]; // Channel of the secondary signals for online selection.
00101       Double_t  dCoincidenceWindowStart[MAX_DATA_TRIGG]; // Beginning of time window in which secondary channels have to be present, relative to main channel
00102       Double_t  dCoincidenceWindowStop[MAX_DATA_TRIGG];  // End of time window in which secondary channels have to be present, relative to main channel
00103       Double_t  dDeadTime;               // Minimal time between the main channel of two identical triggers in ns
00104 
00105       // kFALSE = 1 hit => max 1 event of same trigger, 2nd event ignored ( ~Deadtime )
00106       // kTRUE  = 1 hit => all events matching trigger window inside MBS event as long as same trigger
00107       Bool_t    bAllowEventMixing;       // kFALSE = 1 hit => max 1 event, kTRUE = 1 hit => all trigger window matching events inside MBS event
00108       /*************************************/
00109 
00110       /************** Detectors ************/
00111       Int_t   iMainReferenceTdc;         // No Online Change - TDC used for the reference signals profiles in Detector classes, -1 disable it
00112       Int_t   iReference1Channel;        // No Online Change - Channel used for the 1st reference histogram in Detector classes, -1 disable it
00113       Int_t   iReference2Channel;        // No Online Change - Channel used for the 2nd reference histogram in Detector classes, -1 disable it
00114       /*************************************/
00115 
00117       void SetNbRocsGet4(UInt_t num);
00118 
00120       Int_t FindGet4RocId(UInt_t rocid) const;
00121 
00123       UInt_t DefineGet4IndexOffset(UInt_t rocid) const;
00124 
00126       void SetNbGet4(UInt_t num);
00127 
00129       UInt_t RemapGet4Chip(UInt_t chip) const;
00130       UInt_t RemapGet4Chip(UInt_t roc, UInt_t chip) const;
00131 
00133       Bool_t IsValidRoc(UInt_t board) const { return board < numRocs; }
00134 
00136       Bool_t IsValidGet4Chip(UInt_t chip) const { return chip < uNbGet4; }
00137 
00139       Bool_t IsActiveRoc(UInt_t board) const { return (board < numRocs)? (kTRUE == activeRoc[board]): kFALSE ; }
00140 
00142       Bool_t IsActiveGet4Chip(UInt_t chip) const { return (chip < uNbGet4)? (1 == uGet4Active[chip]): kFALSE; }
00143 
00145       Int_t  IsTriggerMainChannel( UInt_t tdc, UInt_t channel );
00147       Int_t  IsTriggerSecChannel( UInt_t tdc, UInt_t channel );
00149       Int_t  GetSecChannelIndex( UInt_t uTrigger,  UInt_t tdc, UInt_t channel );
00150 
00151       Bool_t IsMainOfThisTrigger( UInt_t uTrigger,  UInt_t tdc, UInt_t channel );
00152       Bool_t IsSecOfThisTrigger(  UInt_t uTrigger,  UInt_t tdc, UInt_t channel );
00153 
00154       Bool_t PrintGet4Options();
00155 
00156 
00157    ClassDef(TGet4v1Param, 1)
00158 };
00159 
00160 #endif // TGET4V1PARAM_H

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