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 "../RPC/TRpcParam.h" 00013 #include "../PLASTICS/TPlasticsEvent.h" 00014 #include "../PLASTICS/TPlasticsParam.h" 00015 //#include "../PADRPC/TPadRpcEvent.h" 00016 #include "../SCALERS/TScalersEvent.h" 00017 #ifdef ROOTCONV_WITHHODO 00018 #include "TFiberHodEvent.h" 00019 #endif 00020 00021 // 2nd level events 00022 #include "../VFTX/TVftxEvent.h" 00023 00024 // 1st level events 00025 #include "GET4V10/TGet4v1Event.h" 00026 #include "GET4V10/TGet4v1Param.h" 00027 #include "MBSUNPACK/TMbsCrateEvent.h" 00028 #include "TTriglogEvent.h" 00029 #include "TEpicsEvent.h" 00030 00031 #include "TGsiAug12Param.h" 00032 #include "TCBMBeamtimeProc.h" 00033 #if defined(ROOTCONV_WITHHODO) 00034 #include "TRocProc.h" 00035 #include "TRocParam.h" 00036 #endif 00037 00038 #include "TFile.h" 00039 #include "TTree.h" 00040 #include "TH3.h" 00041 00042 #ifdef ROOTCONV_WITHHODO 00043 class TFiberHodEvent; 00044 #endif 00045 00046 class TGo4EventElement; 00047 class TGo4MbsSubEvent; 00048 00049 class TMbsCrateEvent; 00050 class TTriglogEvent; 00051 class TEpicsEvent; 00052 00053 class TVftxEvent; 00054 00055 class TRootConverterProc : public TCBMBeamtimeProc { 00056 public: 00057 00058 TRootConverterProc(const char* name = 0); 00059 virtual ~TRootConverterProc(); 00060 00061 00062 virtual void InitEvent(TGo4EventElement*); 00063 00064 /* this is the main processing function here*/ 00065 virtual void FinalizeEvent(); 00066 00067 00068 protected: 00069 TRootConverterParam * fRootConvPar; 00070 TGsiAug12Param * fParAnalysis; 00071 TGet4v1Param * fGet4v1Par; 00072 TRpcParam * fParRpc[NB_RPC]; 00073 TPlasticsParam * fParPlastics[NB_PLASTICS]; 00074 00075 #if defined(ROOTCONV_WITHHODO) 00076 TRocParam* fRocPar; 00077 #endif 00078 00080 TGet4v1Event * fGet4v1InputEvent; 00081 00083 TMbsCrateEvent * fCrateInputEvent; 00084 00086 TTriglogEvent * fTriglogInputEvent; 00087 00089 TEpicsEvent * fEpicsInputEvent; 00090 00092 TVftxEvent * fVftxInputEvent; 00093 00095 TRpcEvent *fRpcInputEvent[NB_RPC]; 00097 TPlasticsEvent *fPlasticsInputEvent[NB_PLASTICS]; 00098 00100 // TPadRpcEvent * fPadRpcInputEvent; 00101 00103 TScalersEvent * fScalOrMu1InputEvent; 00104 00106 TScalersEvent * fScalOrMu2InputEvent; 00107 00109 TMatchingEvent * fMatchingInputEvent; 00110 00111 #ifdef ROOTCONV_WITHHODO 00112 00113 TFiberHodEvent * fHodoInputEvent; 00114 #endif 00115 00116 TRootConverterEvent * fOutputEvent; 00117 00118 // Options readout from setup file or assigned from #define 00119 UInt_t fNumRocs; 00120 00121 // General counters 00122 UInt_t uNbEvents; 00123 UInt_t uFirstEventIndex; 00124 UInt_t uPrevEventIndex; 00125 00126 // Tree outputs 00127 TString sOutputFilename; 00128 TDirectory* oldDir; 00129 TFile* fRootOut; 00130 TTree* cleanTree; 00131 00132 #ifdef ROOTCONV_WITHHODO 00133 // Hodoscope 00134 TFiberHodEvent::hit_t hitHodoscope; 00135 #endif 00136 00137 // Single event GET4 00138 Get4v1Tdc fGet4Board[MAX_GET4]; 00139 00140 // Single event Detectors Events 00141 Rpc_Event fRpcSingleEvent[NB_RPC]; 00142 // PadRpc_Event fPadRpcSingleEvent[NB_PAD_RPC]; 00143 Plastics_Event fPlasticsSingleEvent[NB_PLASTICS]; 00144 00145 // EPICS Slow control 00146 UInt_t uSlowControlUpdateTime; 00147 vector< Double_t > vdPositiveHvI; 00148 vector< Double_t > vdPositiveHvU; 00149 vector< Double_t > vdNegativeHvI; 00150 vector< Double_t > vdNegativeHvU; 00151 00152 // Beam spot evolution histogramming 00153 UInt_t uFirstMbsTime; 00154 UInt_t uSpillStartMbsTime; 00155 UInt_t uLastMbsTime; 00156 00157 UInt_t uFirstMbsTimeMs; 00158 UInt_t uSpillStartMbsTimeMs; 00159 00160 // Histograms 00161 00162 // A bit of control, can be disabled 00163 TH1* hNbClustersPerEventHodoscope; 00164 TH3* hHit2DvsSeconds; 00165 TH3* hHit2DvsSecondsInSpill; 00166 TH3* hHit2DvsMilliSecondsInSpill; 00167 TH2* hHitXvsMilliSecondsInSpill; 00168 TH2* hHitYvsMilliSecondsInSpill; 00169 // Control over a flying pointer, not disableable 00170 UInt_t uEpicsTimeOrigin; 00171 TH1* hTimeEpicsUpdates; 00172 00173 private: 00174 00175 ClassDef(TRootConverterProc,1) 00176 }; 00177 00178 #endif //TROOTCONVPROC_H 00179