[OpendTect_Developers] How to make an outer loop for computeData method ?

Khaerul Adzany khaerul.adzany at waviv.com
Tue Feb 1 07:30:23 CET 2011


Dear All,

I'm a newbie here, and my question is related to attribute plugin
development.

Is there any way so can we apply a outer loop for computeData method in our
attribute class?
Because I need to go to the first trace of the DataHolder's output after all
trace is processed.

Here's the class definition that I've written:

#include "attribprovider.h"

namespace Attrib
{
mClass MygAttr : public Provider
{
public:
    static void initClass();
MyAttr(Desc&);
    static const char* attribName() { return "My Attribute"; }
    static const char* modeStr() { return "mode"; }
    static const char* epchStr() { return "epch"; }
    static const char* alphaStr() { return "alpha"; }
    static const char* betaStr() { return "beta"; }

protected:
     ~MyAttr(){}
    static WimgProvider* createInstance(Desc&);
    static void           updateDesc(Desc&);
    bool allowParallelComputation() const { return true; }
    bool getInputData(const BinID&, int zintv);
    void prepareForComputeData();
    bool computeData(const DataHolder&, const BinID& relpos, // <-- I want
to make this method (computeData) loops for n times, defined in epch_
variable
     int z0, int nrsamples, int threadid) const;
    bool finalizeCalculation(bool scs);

        int mode_;
int epch_;
float alph_;
int beta_;

    ObjectSet<const DataHolder> inpdata_;

};

}


Best Regards,

Khaerul Adzany
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opendtect.org/pipermail/developers/attachments/20110201/3a41e584/attachment.html>


More information about the Developers mailing list