#ifndef _JEventProcessor_TPOL_waveform_ #define _JEventProcessor_TPOL_waveform_ #include #include "TTree.h" const uint32_t NCHANNELS_TPOL = 32; class JEventProcessor_TPOL_waveform:public jana::JEventProcessor{ public: JEventProcessor_TPOL_waveform(); ~JEventProcessor_TPOL_waveform(); const char* className(void){return "JEventProcessor_TPOL_waveform";} static const UInt_t NMAX = 200; // Number of hits UInt_t nwaveforms; Int_t eventnum; Int_t slot[NMAX]; Int_t sector[NMAX]; Double_t pedestal[NMAX]; uint16_t maxcounts[NMAX]; uint16_t waveform[NMAX][100]; // PSC stuff UInt_t nhits_PSC; Int_t iLeft_PSC[NMAX]; Int_t iRight_PSC[NMAX]; Float_t t_iLeft_PSC[NMAX]; Float_t t_iRight_PSC[NMAX]; // PS stuff UInt_t nhits_PS; Int_t iLeft_PS[NMAX]; Int_t iRight_PS[NMAX]; Float_t e_iLeft_PS[NMAX]; Float_t e_iRight_PS[NMAX]; // Debug flag bool DEBUG_TPOL; // Flag to run over 2015 Spring data bool INVERTED_POLARITY; private: jerror_t init(void); ///< Called once at program start. jerror_t brun(jana::JEventLoop *eventLoop, int runnumber); ///< Called everytime a new run number is detected. jerror_t evnt(jana::JEventLoop *eventLoop, int eventnumber); ///< Called every event. jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called. jerror_t fini(void); ///< Called after last event of last event source has been processed. // KM TTree *outtree; }; #endif // _JEventProcessor_TPOL_waveform_