<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Teemu,<br>
<br>
<div>By your comment:<br>
<br>
</div>
<div>If you really need to access all the data, you can call
requestStorage(-1) on the storage object before adding any data,
and then you can access all the data using tryGetDataFrame(). But
you should be aware that this increases memory consumption
significantly.<br>
<br>
What I understand is that the DataStorage object doesn't store any
data I produced with my tool, correct? So when it pass through a
frame, it only deals with the data produced by that frame and then
it will pass the results to the plot or histogram module or to a
file, is this correct?<br>
<br>
So in this case, if I am trying to do such an analysis, which will
use data produced by all the frames together. The analysis module
can't help, is that correct?<br>
<br>
Thank you for your reply.<br>
<br>
Bests,<br>
Yunlong<br>
<br>
</div>
<br>
<div class="moz-cite-prefix">On 11/20/14 11:58 PM, Teemu Murtola
wrote:<br>
</div>
<blockquote
cite="mid:CAB5URpajc5=ShaULyTZShDShFCXC-j8ZA+NOuTz8vBC0XwOTfQ@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div dir="ltr">Hi,<br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Nov 20, 2014 at 9:14 PM,
Yunlong Liu <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:yliu120@jh.edu" target="_blank">yliu120@jh.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">I am
trying to write my own analysis code using Gromacs API.<br>
I made my own analysis module which inherits
AbstractAnalysisData and AbstractDataModuleSerial
interface. I want to call tryGetDataFrame( index ) to
assess data store in the my AnalysisDataStorage object in
the function of dataFinished(). Though I tried many ways,
I still get an invalid header.<br>
<br>
I called storage_.finishFrame() in finishedFrame function
so that this should be a problem. I am curious about why
the storage object doesn't provide an easier way to access
the data like getData( index ).</blockquote>
<div><br>
</div>
<div>Just naming the function differently does not help;
there is already a getDataFrame() in AbstractAnalysisData,
but it would probably not do what you expect. ;) If you
would expect to have such a function that would be able to
unconditionally return all the data, never failing, that
would mean that the storage object would need to
unconditionally store all the data that you produce. That
can come at a very high memory cost (depending on the
amount of data that your tool produces, and on the length
of your trajectory). So the storage object only stores
previous frames if someone explicitly requests it do so,
by calling requestStorage().</div>
<div><br>
</div>
<div>If you really need to access all the data, you can call
requestStorage(-1) on the storage object before adding any
data, and then you can access all the data using
tryGetDataFrame(). But you should be aware that this
increases memory consumption significantly.</div>
<div><br>
</div>
<div>None of the Gromacs tools that have been so far
converted (either merged, or those still waiting for
review at <a moz-do-not-send="true"
href="http://gerrit.gromacs.org">gerrit.gromacs.org</a>)
to use the framework actually require such storage, so it
is quite a reasonable design to not store all that data
unnecessary. And some, like 'gmx rdf', produce massive
amounts of intermediate data that would not really make
sense to store.</div>
<div><br>
</div>
<div>Hope this helps,</div>
<div>Teemu</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
</body>
</html>