// $Id$ // // File: MyProcessor.h // Created: Mon Aug 28 EDT 2006 // Creator: davidl (on Darwin swire-b241.jlab.org 8.7.0 powerpc) // #ifndef _MyProcessor_ #define _MyProcessor_ #include #include #include using namespace std; #include #include class MyProcessor:public JEventProcessor{ public: MyProcessor(); ~MyProcessor(){} const char* className(void){return "MyProcessor";} private: jerror_t init(void){return NOERROR;} ///< Called once at program start. jerror_t brun(JEventLoop *eventLoop, int runnumber); ///< Called everytime a new run number is detected. jerror_t evnt(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. void AddEPICSEvent(JEventLoop *loop); pthread_mutex_t file_mutex; ofstream fout; int runnumber; #define MAX_PHOTONS 10 #define MAX_TRIGTDCS 32 typedef struct{ short adcN[18]; short adcS[18]; float tdcN[18]; float tdcS[18]; int Ntdctrig; float tdctrig[MAX_TRIGTDCS]; short tdctrigid[MAX_TRIGTDCS]; short adcsumN; short adcsumS; short trig; int Nphotons; float tphoton[MAX_PHOTONS]; float Ephoton[MAX_PHOTONS]; }bcal_t; bcal_t b; typedef struct{ float I2c24; float x2c24; float y2c24; float I2c21; float x2c21; float y2c21; unsigned int time; }beam_t; beam_t beam; typedef struct{ float templ1; float templ2; float templ3; float humidityl1; float humidityl2; float humidityl3; unsigned int time; }environment_t; environment_t env; }; #endif // _MyProcessor_