BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
RawFileReader.h
Go to the documentation of this file.
1#ifndef BESIII_RAW_FILE_READER_H
2#define BESIII_RAW_FILE_READER_H
3
6#include <vector>
7#include <string>
8
9//forward declaration
10class raw_ifstream;
11class EvtIdxHandler;
13
14typedef std::vector<std::string> VFileNames_t;
15
17{
18 public :
19
21
22 static std::vector<int> getEventNumber(const VFileNames_t& idxfnames);
23
24 // thread safe
25 RawFileReader(const std::string& fname);
26 RawFileReader(const VFileNames_t& fnames);
27 RawFileReader(const std::string& fname, const std::string& idxfname);
28 RawFileReader(const VFileNames_t& fnames, const VFileNames_t& idxfnames);
29 virtual ~RawFileReader();
30
31 // thread safe
32 const uint32_t* nextEvent();
33 const uint32_t* currentEvent() const { return m_buffer; }
34
35 // following interface are not thread safe !!!
36 const uint32_t* nextEvent(int nIgnore);
37 const uint32_t* findEventById(uint32_t evtId);
38 const uint32_t* roughlyNextEvent(int nIgnore, int evtByte = 0);
39
40
41 std::string currentFile();
42 uint32_t tellg();
43 uint32_t stat();
44
45
46 private :
47
48 const uint32_t* notSafeNextEvent();
49
50 void read_one_event();
51 RawFileReader& nextFile(RawFileException& e);
52
53 RawFileReader(); //stop default
54
55
56 private :
57
58 uint32_t m_bufferSize;
59 uint32_t* m_buffer;
60
61 raw_ifstream* m_rfs;
62 EvtIdxHandler* m_idxHandler;
63
64 DataSeparatorRecord m_dataSeparatorRecord;
65};
66
67#endif
std::vector< std::string > VFileNames_t
Definition: RawFileReader.h:14
#define private
virtual ~RawFileReader()
const uint32_t * findEventById(uint32_t evtId)
const VFileNames_t ReaderArgType
Definition: RawFileReader.h:20
const uint32_t * roughlyNextEvent(int nIgnore, int evtByte=0)
const uint32_t * nextEvent()
uint32_t tellg()
const uint32_t * currentEvent() const
Definition: RawFileReader.h:33
static std::vector< int > getEventNumber(const VFileNames_t &idxfnames)
uint32_t stat()
std::string currentFile()