Hall C ROOT/C++ Analyzer (hcana)
|
Event handler to check TI and FADC synchronization.
Check syncronization of 4ns clock times recorded by the TIs and the FADCs. Also can be used to detect CAEN1190 TDC syncronization problems and write out a new coda file that corrects the synchronization. (These TDC synchronization problems were occuring in the spring of 2018.)
This event handler is typically not used in normal anlysis scripts. It is used with custom to check suspect runs and write synchronization corrected data files.
To use as a plugin, add to the analysis script:
THcTimeSyncEvtHandler *timesync = new THcTimeSyncEvtHandler("timesync","ADC/TI Time synchrnoziation")); timesync->AddEvtType(1); timesync->AddEvtType(2); ... gHaEvtHandlers->Add(timesync);
Assumes that all FADCs are in banks with the tag 250 and all TIblob banks are tag 4. And that these banks are contained without further structure in ROC banks. Also asssumes that the only banks containing banks are ROC banks.
Definition at line 19 of file THcTimeSyncEvtHandler.h.
Classes | |
struct | RocStats |
struct | RocTimes |
Public Member Functions | |
virtual void | AddExpectedOffset (Int_t roc, Int_t offset) |
virtual Int_t | AllTdcsPresent (UInt_t *bank) |
virtual Int_t | Analyze (THaEvData *evdata) |
virtual Int_t | End (THaRunBase *r=0) |
virtual EStatus | Init (const TDatime &run_time) |
virtual void | PrintStats () |
virtual void | SetBadROC (Int_t roc) |
virtual void | SetBadSyncSizeTrigger (Int_t sizetrigger) |
virtual void | SetExpectedOffset (Int_t roc, Int_t offset) |
virtual void | SetResync (Bool_t b) |
virtual Int_t | SetRewriteFile (const char *filename) |
THcTimeSyncEvtHandler (const char *name, const char *description) | |
virtual | ~THcTimeSyncEvtHandler () |
Private Types | |
typedef struct THcTimeSyncEvtHandler::RocStats | RocStats_t |
typedef struct THcTimeSyncEvtHandler::RocTimes | RocTimes_t |
Private Member Functions | |
virtual void | AccumulateStats (Bool_t sync) |
virtual void | InitStats () |
THcTimeSyncEvtHandler & | operator= (const THcTimeSyncEvtHandler &fh) |
THcTimeSyncEvtHandler (const THcTimeSyncEvtHandler &fh) | |
Private Attributes | |
std::map< Int_t, RocStats_t * > | CrateStatsMap |
std::map< Int_t, RocTimes_t * > | CrateTimeMap |
std::map< Int_t, Int_t > | ExpectedOffsetMap |
Int_t | fBadROC |
Int_t | fBadSyncSizeTrigger |
Decoder::THaCodaFile * | fCodaOut |
Int_t | fDumpNew |
Bool_t | fFirstTdcCheck |
Bool_t | fFirstTime |
UInt_t | fLastEvent [32000] |
Bool_t | fLastEventWasSync |
Int_t | fMasterRoc |
Int_t | fNEvents |
Bool_t | fResync |
Int_t | fSlippage |
UInt_t | fSlippingBank [32000] |
UInt_t | fTdcMask |
Bool_t | fWriteDelayed |
Int_t | handle |
#include <THcTimeSyncEvtHandler.h>
|
private |
|
private |
THcTimeSyncEvtHandler::THcTimeSyncEvtHandler | ( | const char * | name, |
const char * | description | ||
) |
Definition at line 57 of file THcTimeSyncEvtHandler.cxx.
|
virtual |
Definition at line 68 of file THcTimeSyncEvtHandler.cxx.
|
private |
Definition at line 402 of file THcTimeSyncEvtHandler.cxx.
Definition at line 496 of file THcTimeSyncEvtHandler.cxx.
Check that all the 1190 TDCs that should be present are there.
Return codes: 0: All TDCs present 1: TDCs missing at high end of crate 2: TDCs missing at low end of crate 3: Other arrangement of missing
Definition at line 559 of file THcTimeSyncEvtHandler.cxx.
Definition at line 81 of file THcTimeSyncEvtHandler.cxx.
|
virtual |
Definition at line 532 of file THcTimeSyncEvtHandler.cxx.
|
virtual |
Definition at line 500 of file THcTimeSyncEvtHandler.cxx.
|
privatevirtual |
Initialize structure to hold statistics Record the offset of each TI and FADC time relative to the trigger time of the master TI.
Definition at line 346 of file THcTimeSyncEvtHandler.cxx.
|
private |
|
virtual |
Definition at line 453 of file THcTimeSyncEvtHandler.cxx.
Definition at line 33 of file THcTimeSyncEvtHandler.h.
Definition at line 35 of file THcTimeSyncEvtHandler.h.
Definition at line 492 of file THcTimeSyncEvtHandler.cxx.
Definition at line 34 of file THcTimeSyncEvtHandler.h.
|
virtual |
Definition at line 539 of file THcTimeSyncEvtHandler.cxx.
|
private |
Definition at line 94 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 93 of file THcTimeSyncEvtHandler.h.
Definition at line 95 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 50 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 52 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 57 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 49 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 54 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 42 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 46 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 53 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 43 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 44 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 51 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 45 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 47 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 55 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 48 of file THcTimeSyncEvtHandler.h.
|
private |
Definition at line 58 of file THcTimeSyncEvtHandler.h.