ICP  1
icp_interfaces.h
Go to the documentation of this file.
1 #ifndef ICP_INTERFACES
2 #define ICP_INTERFACES
3 
4 #include "IsisBase.h"
5 #include "isisvme_types.h"
6 
7 struct DAEEventHeader;
8 struct DetectorEvent32;
9 class DAEstatus;
10 
12 {
13  virtual void callback32(const DAEEventHeader* head, const DetectorEvent32* events, int nevents, const int* spec_mapping) = 0;
14 };
15 
16 
18 {
19  virtual uint32_t getNewEvents(isisU32_t* buffer, uint32_t maxlen, uint64_t& num_unread, bool& run_ended, DAEstatus& status) = 0;
20  virtual uint64_t nNewEventWords(DAEstatus& status) = 0;
21  virtual void updateDAEEventLastRead(DAEstatus& status) = 0;
22  virtual int eventSourceID() const = 0;
23  virtual const int* getDAE2SpecMap() = 0;
24  virtual isisU32_t getLastAddressRead() = 0;
25  virtual void setLastAddressRead(isisU32_t addr) = 0;
26 };
27 
28 struct IFile
29 {
31  virtual int open(const std::string& path, Mode mode, int shflag) = 0;
32  virtual size_t write(const void* data, size_t element_size, size_t nelement) = 0;
33  virtual size_t read(void* data, size_t element_size, size_t nelement) = 0;
34  virtual int close() = 0;
35  virtual int seek(int64_t offset, int whence) = 0;
36  virtual int discardContents() = 0;
37  virtual int flush() = 0;
38  virtual bool isOpen() const = 0;
39 };
40 
42 {
43  virtual void start(int run_number, bool clear_counters) = 0;
44  virtual void wait() = 0;
45  virtual void stop(bool close_file) = 0;
46 };
47 
48 #endif /* ICP_INTERFACES */
virtual void stop(bool close_file)=0
virtual void start(int run_number, bool clear_counters)=0
virtual int flush()=0
virtual bool isOpen() const =0
virtual size_t write(const void *data, size_t element_size, size_t nelement)=0
virtual const int * getDAE2SpecMap()=0
virtual void callback32(const DAEEventHeader *head, const DetectorEvent32 *events, int nevents, const int *spec_mapping)=0
virtual int eventSourceID() const =0
fixed header marker for DAEEventHeader
Definition: dae_events.h:44
unsigned long isisU32_t
Definition: isisvme_types.h:8
virtual uint32_t getNewEvents(isisU32_t *buffer, uint32_t maxlen, uint64_t &num_unread, bool &run_ended, DAEstatus &status)=0
virtual void wait()=0
virtual int close()=0
virtual void updateDAEEventLastRead(DAEstatus &status)=0
virtual void setLastAddressRead(isisU32_t addr)=0
virtual int open(const std::string &path, Mode mode, int shflag)=0
virtual size_t read(void *data, size_t element_size, size_t nelement)=0
virtual int seek(int64_t offset, int whence)=0
virtual int discardContents()=0
virtual uint64_t nNewEventWords(DAEstatus &status)=0
virtual isisU32_t getLastAddressRead()=0