OpendTect-6_4  6.4
seisrandomprovider.h
Go to the documentation of this file.
1 #ifndef seisrandomprovider_h
2 #define seisrandomprovider_h
3 
4 /*
5  ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: K. Tingdahl
9  Date: June 2012
10  RCS: $Id$
11  ________________________________________________________________________
12 
13  */
14 
15 
16 #include "seismod.h"
17 #include "binidvalset.h"
18 #include "callback.h"
19 #include "multidimstorage.h"
20 #include "thread.h"
21 #include "seistrc.h"
22 #include "refcount.h"
23 
24 class SeisTrcTranslator;
25 class SeisTrcReader;
26 
27 /* Request a trace anywhere, and it will become available to you as soon as
28  soon as possible. All reading is done int the background.
29 */
30 
32 {
33 public:
34  SeisRandomProvider(const MultiID& mid);
36 
37 
38  void requestTrace(const BinID&);
39 
41  const SeisTrc& getTrace() const { return curtrace_; }
42 
43 
44 protected:
45  bool readTraces();
46  void triggerWork();
47  void readFinished(CallBacker*);
48 
49  bool isreading_;
50 
52 
55 
58 };
59 
60 
61 
63 {
64 public:
65  SeisRandomRepository( const MultiID& mid );
66 
67  void addInterest(const BinID&);
68  void removeInterest(const BinID);
69 
70  const SeisTrc* getTrace(const BinID&) const;
72  const BinID& newTraceBid() const { return newtracebid_; }
73 
74 protected:
75 
76  struct TraceHolder
78  TraceHolder() : trc_( 0 ) {}
79 
81  };
82 
83  void incomingTrace( CallBacker* );
84 
85 
88 };
89 
90 #endif
#define mRefCountImpl(ClassName)
Macro to setup a class with destructor for reference counting.
Definition: refcount.h:163
Definition: seisrandomprovider.h:31
#define mExpClass(module)
Definition: commondefs.h:160
Summary for a Seismic object.
Definition: segydirectdef.h:23
Is an object that faciliates many threads to wait for something to happen.
Definition: thread.h:108
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
void requestTrace(EM::SubID)
Definition: multidimstorage.h:25
SeisTrc curtrace_
Definition: seisrandomprovider.h:56
SeisTrcTranslator * translator_
Definition: seisrandomprovider.h:54
SeisTrc * trc_
Definition: seisrandomprovider.h:80
Notifier< SeisRandomRepository > traceAvailable
Definition: seisrandomprovider.h:71
BinIDValueSet wantedbids_
Definition: seisrandomprovider.h:57
TraceHolder()
Definition: seisrandomprovider.h:78
reads from a seismic data store.
Definition: seisread.h:50
Definition: seistrctr.h:90
BinID newtracebid_
Definition: seisrandomprovider.h:87
SeisTrcReader * reader_
Definition: seisrandomprovider.h:53
Definition: seisrandomprovider.h:76
Notifier< SeisRandomProvider > traceAvailable
Definition: seisrandomprovider.h:40
bool isreading_
Definition: seisrandomprovider.h:49
MultiDimStorage< TraceHolder * > storage_
Definition: seisrandomprovider.h:86
Threads::ConditionVar lock_
Definition: seisrandomprovider.h:51
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
Seismic trace.
Definition: seistrc.h:34
A Pos::IdxPairValueSet with BinIDs.
Definition: binidvalset.h:23
Definition: seisrandomprovider.h:62
const BinID & newTraceBid() const
Definition: seisrandomprovider.h:72
const SeisTrc * getTrace(EM::SubID) const
const SeisTrc & getTrace() const
Definition: seisrandomprovider.h:41
Compound key consisting of ints.
Definition: multiid.h:25

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019