File indexing completed on 2025-01-18 10:17:40
0001
0002
0003
0004
0005 #include <JANA/JEventProcessor.h>
0006
0007 #include <map>
0008 using std::map;
0009
0010 class TTree;
0011
0012 class JEventProcessorJANARATE:public JEventProcessor
0013 {
0014 public:
0015
0016 JEventProcessorJANARATE(JApplication* app): JEventProcessor(app) {}
0017
0018 virtual void Init(void);
0019 virtual void Process(const std::shared_ptr<const JEvent>& aEvent);
0020 virtual void Finish(void);
0021
0022 pthread_mutex_t mutex;
0023 bool initialized;
0024 bool finalized;
0025 int prescale;
0026
0027 struct itimerval start_tmr;
0028 struct itimerval end_tmr;
0029
0030
0031 unsigned int Ncalls;
0032
0033
0034
0035 typedef struct{
0036 double tot_rate;
0037 double tot_integrated_rate;
0038 double thread_rate;
0039 double thread_delta_sec;
0040 double cpu;
0041 double mem_MB;
0042 unsigned int threadid;
0043 }rate_t;
0044
0045 rate_t rate;
0046
0047 TTree *rate_tree;
0048 };