Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:17:18

0001 
0002 // Copyright 2020, Jefferson Science Associates, LLC.
0003 // Subject to the terms in the LICENSE file found in the top-level directory.
0004 
0005 
0006 #ifndef _DecodeDASSource_h_
0007 #define _DecodeDASSource_h_
0008 
0009 #include <JANA/JEventSource.h>
0010 
0011 #include <fstream>
0012 #include <string>
0013 
0014 class DecodeDASSource : public JEventSource {
0015 
0016 public:
0017 
0018     // constructors and destructors
0019     DecodeDASSource(std::string source_name, JApplication* app);
0020     ~DecodeDASSource() override;
0021 
0022     // define public methods
0023     static std::string GetDescription() { return "streamDet event source (direct ADC serialization mode)"; }
0024     void Open() final;
0025     void Close() final;
0026     Result Emit(JEvent&) final;
0027 
0028 private:
0029 
0030     // file stream and event counter
0031     std::ifstream ifs;
0032     size_t current_event_nr = 0;
0033 
0034 };
0035 
0036 #endif // _DecodeDASSource_h_
0037