00001 #ifndef TROOTCONVPROC_H 00002 #define TROOTCONVPROC_H 00003 00004 #include "TRootConverterEvent.h" 00005 #include "TRootConverterParam.h" 00006 00007 // 4th level events 00008 #include "../MATCHING/TMatchingEvent.h" 00009 00010 // 3rd level events 00011 #include "../RPC/TRpcEvent.h" 00012 #include "../PLASTICS/TPlasticsEvent.h" 00013 #include "../PADRPC/TPadRpcEvent.h" 00014 00015 // 2nd level events 00016 #ifdef ROOTCONV_WITHHODO 00017 #include "TFiberHodEvent.h" 00018 #endif 00019 #include "../VFTX/TVftxEvent.h" 00020 #include "../SCALERS/TScalersEvent.h" 00021 00022 // 1st level events 00023 #include "MBSUNPACK/TMbsCrateEvent.h" 00024 #include "TTriglogEvent.h" 00025 #include "TEpicsEvent.h" 00026 00027 #include "TCBMBeamtimeProc.h" 00028 #if defined(ROOTCONV_WITHHODO) 00029 #include "TRocProc.h" 00030 #include "TRocParam.h" 00031 #endif 00032 00033 #include "TFile.h" 00034 #include "TTree.h" 00035 #include "TH3.h" 00036 00037 #ifdef ROOTCONV_WITHHODO 00038 class TFiberHodEvent; 00039 #endif 00040 00041 class TGo4EventElement; 00042 class TGo4MbsSubEvent; 00043 00044 class TMbsCrateEvent; 00045 class TTriglogEvent; 00046 class TEpicsEvent; 00047 00048 class TVftxEvent; 00049 00050 class TRootConverterProc : public TCBMBeamtimeProc { 00051 public: 00052 00053 TRootConverterProc(const char* name = 0); 00054 virtual ~TRootConverterProc(); 00055 00056 00057 virtual void InitEvent(TGo4EventElement*); 00058 00059 /* this is the main processing function here*/ 00060 virtual void FinalizeEvent(); 00061 00062 00063 protected: 00064 TRootConverterParam * fRootConvPar; 00065 00066 #if defined(ROOTCONV_WITHHODO) 00067 TRocParam* fRocPar; 00068 #endif 00069 00071 TMbsCrateEvent * fCrateInputEvent; 00072 00074 TTriglogEvent * fTriglogInputEvent; 00075 00077 TEpicsEvent * fEpicsInputEvent; 00078 00080 TVftxEvent * fVftxInputEvent; 00081 00083 TRpcEvent * fRpcHdInputEvent; 00084 00086 TRpcEvent * fRpcBucInputEvent; 00087 00089 TRpcEvent * fRpcBucMod1InputEvent; 00090 00092 TRpcEvent * fRpcBucMod2InputEvent; 00093 00095 TRpcEvent * fRpcBucMod3InputEvent; 00096 00098 TRpcEvent * fRpcBucMod4InputEvent; 00099 00101 TPlasticsEvent * fPlasticsInputEvent; 00102 00104 TPadRpcEvent * fPadRpcInputEvent; 00105 00107 TScalersEvent * fScalOrMu1InputEvent; 00108 00110 TScalersEvent * fScalOrMu2InputEvent; 00111 00113 TMatchingEvent * fMatchingInputEvent; 00114 00115 #ifdef ROOTCONV_WITHHODO 00116 00117 TFiberHodEvent * fHodoInputEvent; 00118 #endif 00119 00120 TRootConverterEvent * fOutputEvent; 00121 00122 // Options readout from setup file or assigned from #define 00123 UInt_t fNumRocs; 00124 00125 // General counters 00126 UInt_t uNbEvents; 00127 UInt_t uFirstEventIndex; 00128 UInt_t uPrevEventIndex; 00129 00130 // Tree outputs 00131 TString sOutputFilename; 00132 TDirectory* oldDir; 00133 TFile* fRootOut; 00134 TTree* cleanTree; 00135 00136 #ifdef ROOTCONV_WITHHODO 00137 // Hodoscope 00138 TFiberHodEvent::hit_t hitHodoscope; 00139 #endif 00140 00141 // EPICS Slow control 00142 UInt_t uSlowControlUpdateTime; 00143 vector< Double_t > vdPositiveHvI; 00144 vector< Double_t > vdPositiveHvU; 00145 vector< Double_t > vdNegativeHvI; 00146 vector< Double_t > vdNegativeHvU; 00147 00148 // Beam spot evolution histogramming 00149 UInt_t uFirstMbsTime; 00150 UInt_t uSpillStartMbsTime; 00151 UInt_t uLastMbsTime; 00152 00153 UInt_t uFirstMbsTimeMs; 00154 UInt_t uSpillStartMbsTimeMs; 00155 00156 // Histograms 00157 00158 // A bit of control, can be disabled 00159 TH1* hNbClustersPerEventHodoscope; 00160 TH3* hHit2DvsSeconds; 00161 TH3* hHit2DvsSecondsInSpill; 00162 TH3* hHit2DvsMilliSecondsInSpill; 00163 TH2* hHitXvsMilliSecondsInSpill; 00164 TH2* hHitYvsMilliSecondsInSpill; 00165 // Control over a flying pointer, not disableable 00166 UInt_t uEpicsTimeOrigin; 00167 TH1* hTimeEpicsUpdates; 00168 00169 private: 00170 00171 ClassDef(TRootConverterProc,1) 00172 }; 00173 00174 #endif //TROOTCONVPROC_H 00175