Experimental Physics and Industrial Control System
Hi Mark,
> The array counter in the NDPluginFile plugin is intended to be a count of the actual number of arrays written to disk, not the number of callbacks received by the plugin. Moving the arrayCounter++ before the if would violate this, since then it would increment even if the array was not saved if autosave was false and the Save button was not pressed for each array.
I was under the impression that ArrayCounter is meant to hold number of arrays received by the plugin. For the number of files actually written I would look at the FileNumber (which can not be representative if AutoIncrement is set to 0). To me ArrayCounter seemed like a good indicator that arrays are coming to the plugin and saving of data can take place.
>
> We could increment the array count each time that Save button is pressed in single mode. That would be preferable, but would have the problem that one can save the same array multiple times with the Save button, and then array count is misleading, since it is counting the same array multiple times.
>
> Note that in an upcoming R3-0 release of ADCore we propose to do a major re-write of NDPluginFile to simplify things. This is documented here:
>
> https://github.com/areaDetector/ADCore/issues/73
...
>
> Proposed change:
>
> Eliminate FileWriteMode
>
> Eliminate Autosave
>
> Eliminate Capture
>
> Retain Save, it will start/stop file saving
>
> Rename NumCapture to NumSave. It defines the total number of NDArrays to save. If it is <=0 then file saving will continue until Save is set to 0.
>
> Add NumArraysPerFile. It defines the number of NDArrays per file.
>
Seems like it should result in a cleaner interface to file saving which is good direction IMO.
Given that numSaved is <= 0, would the ArrayCounter then hold the number of arrays actually saved?
Thanks,
Hinko
> With these changes the number of arrays per file can be defined independently of the total number of arrays to save. This allows saving single arrays per file with HDF5 and netCDF, for example which is not currently possible.
>
> This change will require changes to many clients so it will need to be a major release of ADCore.
> *******************************************************************
>
> I would appreciate any comments on this proposed change.
>
> Mark
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Hinko Kocevar
> Sent: Wednesday, March 18, 2015 9:26 AM
> To: [email protected]
> Subject: Increment array counter for NDFileModeSingle
>
> Hi,
>
> In areaDetector NDPluginFile I noticed that the array count is incremented only if autosave is active (if in Single mode). This means that by clicking ‘Save’ button the array counter is not incremented. Is there a reason for this?
>
> See https://github.com/areaDetector/ADCore/blob/master/ADApp/pluginSrc/NDPluginFile.cpp#L708.
>
> By moving arrayCounter++ before the if() would a way to have array counter incremented even if autosave is not active.
>
> Best regards,
> Hinko
- References:
- Increment array counter for NDFileModeSingle Hinko Kocevar
- RE: Increment array counter for NDFileModeSingle Mark Rivers
- Navigate by Date:
- Prev:
Re: pyepics not updating pv.enum_strs after connection Jameson Graef Rollins
- Next:
Error while staring archive engine in eclipse Kalyani Thigale/TVM/TCS
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: Increment array counter for NDFileModeSingle Mark Rivers
- Next:
pyepics not updating pv.enum_strs after connection Jameson Graef Rollins
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024