File indexing completed on 2025-07-01 08:58:16
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 virtual void Init(void);
0017 virtual void Process(const std::shared_ptr<const JEvent>& aEvent);
0018 virtual void Finish(void);
0019
0020 pthread_mutex_t mutex;
0021 bool initialized;
0022 bool finalized;
0023 int prescale;
0024
0025 struct itimerval start_tmr;
0026 struct itimerval end_tmr;
0027
0028
0029 unsigned int Ncalls;
0030
0031
0032
0033 typedef struct{
0034 double tot_rate;
0035 double tot_integrated_rate;
0036 double thread_rate;
0037 double thread_delta_sec;
0038 double cpu;
0039 double mem_MB;
0040 unsigned int threadid;
0041 }rate_t;
0042
0043 rate_t rate;
0044
0045 TTree *rate_tree;
0046 };