-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathRegionWellsReader.h
More file actions
53 lines (36 loc) · 1.19 KB
/
Copy pathRegionWellsReader.h
File metadata and controls
53 lines (36 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* Copyright (C) 2011 Ion Torrent Systems, Inc. All Rights Reserved */
#ifndef REGIONWELLSREADER_H
#define REGIONWELLSREADER_H
#include <deque>
#include <vector>
#include <string>
#include <cstdio>
#include "Mask.h"
// RegionWellsReader - a simple, thread-safe reader for .wells file that fetches one region at a time
class RawWells;
class RegionWellsReader {
public:
RegionWellsReader();
~RegionWellsReader();
bool OpenForRead(RawWells *_wells, int _sizeX, int _sizeY, int _numRegionsX, int _numRegionsY);
bool OpenForRead2(RawWells *_wells, int _sizeX, int _sizeY, int _sizeRegionX, int _sizeRegionY);
bool loadNextRegion(std::deque<int> &wellX, std::deque<int> &wellY, std::deque<std::vector<float> > &wellMeasurements, int &iRegion);
bool loadRegion(std::deque<int> &wellX, std::deque<int> &wellY, std::deque<std::vector<float> > &wellMeasurements,
int regionX, int regionY, Mask *mask);
void Close();
private:
int sizeX;
int sizeY;
public:
int numRegionsX;
int numRegionsY;
private:
int sizeRegionX;
int sizeRegionY;
unsigned short numFlows;
int nextRegionX;
int nextRegionY;
RawWells *wells;
pthread_mutex_t *read_mutex;
};
#endif // REGIONWELLSREADER_H