BOSS 7.1.0
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 uint32_t runNo();
41
42 std::string currentFile();
43 uint32_t tellg();
44 uint32_t stat();
45
46
47 private :
48
49 const uint32_t* notSafeNextEvent();
50
51 void read_one_event();
52 RawFileReader& nextFile(RawFileException& e);
53
54 RawFileReader(); //stop default
55
56
57 private :
58
59 uint32_t m_bufferSize;
60 uint32_t* m_buffer;
61
62 raw_ifstream* m_rfs;
63 EvtIdxHandler* m_idxHandler;
64
65 DataSeparatorRecord m_dataSeparatorRecord;
66};
67
68#endif
#define private
std::vector< std::string > VFileNames_t
Definition: RawFileReader.h:14
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
uint32_t runNo()
static std::vector< int > getEventNumber(const VFileNames_t &idxfnames)
uint32_t stat()
std::string currentFile()