|
NexusCPP
3.5.0
|
#include <nxbuffer.h>


Classes | |
| struct | Config |
| DataStreamer configuration structure. More... | |
| struct | Statistics |
| Write statistices. More... | |
Public Types | |
| enum | MemoryMode { COPY = 0, NO_COPY } |
| Memory mode. More... | |
| typedef enum nxcpp::DataStreamer::MemoryMode | MemoryMode |
| Memory mode. More... | |
| typedef struct nxcpp::DataStreamer::Statistics | Statistics |
| Write statistices. More... | |
| typedef struct NEXUSCPP_DECL nxcpp::DataStreamer::Config | Config |
| DataStreamer configuration structure. More... | |
Public Member Functions | |
| DataStreamer (const Config &cfg) | |
| virtual | ~DataStreamer () |
| Destructor. More... | |
| void | Initialize (const Config &cfg) |
| void | SetWriteNotificationCallback (const WriteNotificationCallback &cb) |
| void | SetExceptionHandler (IExceptionHandler *pHandler) |
| void | SetMessageHandler (IMessageHandler *pHandler) |
| void | SetDeviceName (const std::string &strDevice) |
| void | Reset () |
| Reset buffer in order to start a new acquisition. More... | |
| void | Finalize () |
| Terminate the buffering process. More... | |
| void | Abort (bool bSynchronize=false) |
| void | Stop () |
| Close the buffer and wait for synchronization. More... | |
| bool | IsDone () |
| Ask if all data have been flushed. More... | |
| void | Synchronize () |
| Wait the recording of all pushed data. More... | |
| void | Clean () |
| void | OnFlushData (DatasetWriter *pWriter) |
| IFlushNotification. More... | |
| bool | IsExistingItem (const std::string &sItemName) |
| Check if a data item has been declared. More... | |
| IExceptionHandler * | ExceptionHandler () const |
| Get exception handler. More... | |
| IMessageHandler * | MessageHandler () const |
| Get message handler. More... | |
| template<class TYPE > | |
| void | PushData (const std::string &sItemName, const TYPE *pData, unsigned int nCount) |
| template<class TYPE > | |
| void | PushAxisData (const std::string &sName, TYPE TValue) |
| void | AddDataItem (const std::string &sItemName, const std::vector< int > &viDimSize, bool bDataSignal=true) |
| void | AddDataItem0D (const std::string &sItemName, bool bDataSignal=true) |
| void | AddDataItem1D (const std::string &sItemName, int iSizeDim, bool bDataSignal=true) |
| void | AddDataItem2D (const std::string &sItemName, int iSizeDim1, int iSizeDim2, bool bDataSignal=true) |
| void | AddDataAxis (const std::string &sItemName, int iDimension, int iOrder) |
| void | SetDataItemMemoryMode (const std::string &sItemName, MemoryMode mode) |
| template<class TYPE > | |
| void | PushData (const std::string &sItemName, const TYPE *tData, unsigned int nCount=1) |
| template<class TYPE > | |
| void | PushAxisData (const std::string &sName, TYPE TValue) |
| void | PushIntegerAttribute (const std::string &sItemName, const std::string &sName, long lValue) |
| void | PushFloatAttribute (const std::string &sItemName, const std::string &sName, double dValue) |
| void | PushStringAttribute (const std::string &sItemName, const std::string &sName, const std::string &strValue) |
| void | SetWriteMode (const NexusFileWriter::WriteMode &mode) |
| void | SetTargetFolder (const std::string &sPath) |
| NexusFileWriter::WriteMode | WriteMode () const |
| const std::string & | GetTargetFolder () const |
| int | GetNbPushInFile () const |
| void | ResetStatistics () |
| Reset all statistics. More... | |
| Statistics | GetStatistics () const |
| Gets a copy of the statistics. More... | |
| DataStreamer (const std::string &, int, int) | |
| DataStreamer (const std::string &, int) | |
| DataStreamer (const std::string &, std::size_t, std::size_t) | |
| DataStreamer (const std::string &, std::size_t) | |
| void | Initialize (const std::string &x, const std::string &y="") |
| void | SetDataItemNodeName (const std::string &, const std::string &) |
| void | SetPath (const std::string &, const std::string &) |
| void | SetWriteNotificationCallback (WriteNotificationCallback &cb) |
| void | SetWorkingFolder (const std::string &) |
| const std::string & | GetWorkingFolder () const |
Static Public Member Functions | |
| static void | ResetBufferIndex () |
| static std::string | GenerateBufferName (const std::string &sBaseName, long lIndex, const std::string &strPrefix="") |
This is a utility classe aimed to allow streaming data into NeXus files
| typedef struct NEXUSCPP_DECL nxcpp::DataStreamer::Config nxcpp::DataStreamer::Config |
DataStreamer configuration structure.
Memory mode.
| typedef struct nxcpp::DataStreamer::Statistics nxcpp::DataStreamer::Statistics |
Write statistices.
Memory mode.
| nxcpp::DataStreamer::DataStreamer | ( | const Config & | cfg | ) |
Constructor
| cfg | Configuration |
|
virtual |
Destructor.
| nxcpp::DataStreamer::DataStreamer | ( | const std::string & | , |
| int | , | ||
| int | |||
| ) |
| nxcpp::DataStreamer::DataStreamer | ( | const std::string & | , |
| int | |||
| ) |
| nxcpp::DataStreamer::DataStreamer | ( | const std::string & | , |
| std::size_t | , | ||
| std::size_t | |||
| ) |
| nxcpp::DataStreamer::DataStreamer | ( | const std::string & | , |
| std::size_t | |||
| ) |
| void nxcpp::DataStreamer::Abort | ( | bool | bSynchronize = false | ) |
Abort the bufferization process
| bSynchronize | if true wait for last pushed data to be recorder |
| void nxcpp::DataStreamer::AddDataAxis | ( | const std::string & | sItemName, |
| int | iDimension, | ||
| int | iOrder | ||
| ) |
Add a axis-type data item
This type of data item is similar to 1-D data item but with additional dataset attributes
| sItemName | item name |
| iDimension | related scan dimension for this axis (first is '1') |
| iOrder | axis order on the dimension |
| void nxcpp::DataStreamer::AddDataItem | ( | const std::string & | sItemName, |
| const std::vector< int > & | viDimSize, | ||
| bool | bDataSignal = true |
||
| ) |
Generic data item declaration
Use this method to declare a new item for which you ha ve to stream data
| sItemName | item name |
| viDimSize | Dimensions array of the canonical data |
| bDataSignal | If 'true' this item will ba marked as 'signal' in the Nexus files stream |
| void nxcpp::DataStreamer::AddDataItem0D | ( | const std::string & | sItemName, |
| bool | bDataSignal = true |
||
| ) |
Add a Scalar-type data item
| sItemName | item name |
| bDataSignal | If 'true' this item will ba marked as 'signal' in |
| void nxcpp::DataStreamer::AddDataItem1D | ( | const std::string & | sItemName, |
| int | iSizeDim, | ||
| bool | bDataSignal = true |
||
| ) |
Add a 1-D (spectrum) data item
| sItemName | item name |
| iSizeDim | size of the data item |
| bDataSignal | If 'true' this item will ba marked as 'signal' in |
| void nxcpp::DataStreamer::AddDataItem2D | ( | const std::string & | sItemName, |
| int | iSizeDim1, | ||
| int | iSizeDim2, | ||
| bool | bDataSignal = true |
||
| ) |
Add a 2-D (image) data item
| sItemName | item name |
| iSizeDim1 | size of the 1st data item dimension |
| iSizeDim2 | size of the 2nd data item dimension |
| bDataSignal | If 'true' this item will ba marked as 'signal' in |
| void nxcpp::DataStreamer::Clean | ( | ) |
Clean Clean all buffers from destination folder
|
inline |
Get exception handler.
| void nxcpp::DataStreamer::Finalize | ( | ) |
Terminate the buffering process.
|
static |
GenerateBufferName Generate a standard buffer file's name according to the base name and given indexes
| sBaseName | buffer file base name |
| lIndex | buffer file index |
| strPrefix | prefix used to ensure uniqueness of file name |
|
inline |
| Statistics nxcpp::DataStreamer::GetStatistics | ( | ) | const |
Gets a copy of the statistics.
|
inline |
|
inline |

| void nxcpp::DataStreamer::Initialize | ( | const Config & | cfg | ) |
| void nxcpp::DataStreamer::Initialize | ( | const std::string & | x, |
| const std::string & | y = "" |
||
| ) |
| bool nxcpp::DataStreamer::IsDone | ( | ) |
Ask if all data have been flushed.
| bool nxcpp::DataStreamer::IsExistingItem | ( | const std::string & | sItemName | ) |
Check if a data item has been declared.
|
inline |
Get message handler.
|
virtual |
IFlushNotification.
Implements nxcpp::DatasetWriter::IFlushNotification.
| void nxcpp::DataStreamer::PushAxisData | ( | const std::string & | sName, |
| TYPE | TValue | ||
| ) |
| void nxcpp::DataStreamer::PushAxisData | ( | const std::string & | sName, |
| TYPE | TValue | ||
| ) |
PushAxisData
| sName | Axis name on which datas will be added |
| TValue | Measured position on the axis |
| void nxcpp::DataStreamer::PushData | ( | const std::string & | sItemName, |
| const TYPE * | pData, | ||
| unsigned int | nCount | ||
| ) |
Synchrotron SOLEIL
Nexus API for Tango servers
Creation : 2011/01/12 Authors : Stephane Poirier, Clement Rodriguez
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
| void nxcpp::DataStreamer::PushData | ( | const std::string & | sItemName, |
| const TYPE * | tData, | ||
| unsigned int | nCount = 1 |
||
| ) |
PushData
| sItemName | sensor's name to which data will be added |
| tData | Added data |
| nCount | canonical data count |
| void nxcpp::DataStreamer::PushFloatAttribute | ( | const std::string & | sItemName, |
| const std::string & | sName, | ||
| double | dValue | ||
| ) |
PushFloatAttribute Set an integer-type attribute belonging to the date item named sItemName.
| sItemName | name of the dataitem or axis which the attribute will belong to |
| sName | name of the attribute |
| dValue | value of the attribute |
| void nxcpp::DataStreamer::PushIntegerAttribute | ( | const std::string & | sItemName, |
| const std::string & | sName, | ||
| long | lValue | ||
| ) |
PushIntegerAttribute Set an integer-type attribute belonging to the date item named sItemName.
| sItemName | name of the dataitem or axis which the attribute will belong to |
| sName | name of the attribute |
| lValue | value of the attribute |
| void nxcpp::DataStreamer::PushStringAttribute | ( | const std::string & | sItemName, |
| const std::string & | sName, | ||
| const std::string & | strValue | ||
| ) |
PushStringAttribute Set an std::string-type attribute belonging to the date item named sItemName.
| sItemName | name of the dataitem or axis which the attribute will belong to |
| sName | name of the attribute |
| strValue | value of the attribute |
| void nxcpp::DataStreamer::Reset | ( | ) |
Reset buffer in order to start a new acquisition.
|
static |
Tell the streamer we start a new acquisition sequence, therefore the first file index of every stream will be reset to '1' This method whould not be called for all subsequent DataStreamer objects
| void nxcpp::DataStreamer::ResetStatistics | ( | ) |
Reset all statistics.
| void nxcpp::DataStreamer::SetDataItemMemoryMode | ( | const std::string & | sItemName, |
| MemoryMode | mode | ||
| ) |
Set dataitem memory management mode
| sItemName | item name |
| mode | Writing mode (COPY/NO_COPY) |
| void nxcpp::DataStreamer::SetDataItemNodeName | ( | const std::string & | , |
| const std::string & | |||
| ) |
|
inline |
Sets the name of the tango device
| void nxcpp::DataStreamer::SetExceptionHandler | ( | IExceptionHandler * | pHandler | ) |
Set exception handler
| pHandler | The exception handler |
| void nxcpp::DataStreamer::SetMessageHandler | ( | IMessageHandler * | pHandler | ) |
Set message handler
| pHandler | The message handler |
| void nxcpp::DataStreamer::SetPath | ( | const std::string & | , |
| const std::string & | |||
| ) |
|
inline |
|
inline |
|
inline |
| void nxcpp::DataStreamer::SetWriteNotificationCallback | ( | const WriteNotificationCallback & | cb | ) |
Set the write notification callback
| cb | WritenotificationCallBack method |
|
inline |
| void nxcpp::DataStreamer::Stop | ( | ) |
Close the buffer and wait for synchronization.
| void nxcpp::DataStreamer::Synchronize | ( | ) |
Wait the recording of all pushed data.
|
inline |
1.8.13