File indexing completed on 2025-01-18 10:01:39
0001
0002
0003
0004
0005
0006 #ifndef _RandomSource_h_
0007 #define _RandomSource_h_
0008
0009 #include <JANA/JEventSource.h>
0010 #include <JANA/JEventSourceGeneratorT.h>
0011
0012 class RandomSource : public JEventSource {
0013
0014 int m_max_emit_freq_hz = 100;
0015
0016 public:
0017 RandomSource();
0018
0019 RandomSource(std::string resource_name, JApplication* app);
0020
0021 virtual ~RandomSource() = default;
0022
0023 void Open() override;
0024
0025 Result Emit(JEvent&) override;
0026
0027 void Close() override;
0028
0029 static std::string GetDescription();
0030
0031 };
0032
0033 template <>
0034 double JEventSourceGeneratorT<RandomSource>::CheckOpenable(std::string);
0035
0036 #endif
0037