|
|
Go to the documentation of this file.
11 #ifndef O_LARGEFILE //for OSX
16 if (
sizeof(
unsigned long long) != 8 ||
sizeof(
unsigned short) != 2)
17 throw std::runtime_error(
std::string(
"Wrong platform: sizeof(unsigned long long)!=8 || sizeof(unsigned short)!=2"));
48 throw(std::runtime_error(
"Error of reading"));
50 throw(std::runtime_error(
"Open some file first"));
56 size_t dduWordCount = 0;
59 while (!
end && dduWordCount < 50000) {
60 unsigned long long *dduWord =
start;
61 unsigned long long preHeader = 0;
69 if ((
word_2 & 0xFFFFFFFFFFFF0000LL) == 0x8000000180000000LL) {
78 if ((
word_0 & 0xFFFFFFFFFFFF0000LL) == 0xFFFFFFFFFFFF0000LL)
89 if ((
word_0 & 0xFFFFFFFFFFFF0000LL) == 0x8000FFFF80000000LL) {
102 memcpy(
event, &preHeader,
sizeof(preHeader));
103 event +=
sizeof(preHeader) /
sizeof(
unsigned short);
108 event += (dduWord -
start) *
sizeof(
unsigned long long) /
sizeof(
unsigned short);
111 if (dduWordCount == 50000) {
120 throw(std::runtime_error(
"Error of reading"));
144 for (
int i = 0;
i < prescaling;
i++) {
unsigned int rejectCriteria
unsigned long long word_0
unsigned short raw_event[200000]
unsigned long long file_buffer[4000]
virtual ~FileReaderDDU(void)
int open(const char *filename)
unsigned long long word_2
size_t read(const unsigned short *&buf)
unsigned int acceptCriteria
unsigned long long * file_buffer_end
unsigned int selectCriteria
unsigned long long word_1
size_t next(const unsigned short *&buf, int prescaling=1)