LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include <inttypes.h>
#include <stdarg.h>
#include <string.h>
#include <sstream>
#include <string>
#include <vector>
Go to the source code of this file.
Classes | |
struct | c2numpy_writer |
Macros | |
#define | C2NUMPY_CHECK_ITEM |
#define | C2NUMPY_INCREMENT_ITEM |
Enumerations | |
enum | c2numpy_type { C2NUMPY_BOOL, C2NUMPY_INT, C2NUMPY_INTC, C2NUMPY_INTP, C2NUMPY_INT8, C2NUMPY_INT16, C2NUMPY_INT32, C2NUMPY_INT64, C2NUMPY_UINT8, C2NUMPY_UINT16, C2NUMPY_UINT32, C2NUMPY_UINT64, C2NUMPY_FLOAT, C2NUMPY_FLOAT16, C2NUMPY_FLOAT32, C2NUMPY_FLOAT64, C2NUMPY_COMPLEX, C2NUMPY_COMPLEX64, C2NUMPY_COMPLEX128, C2NUMPY_STRING = 100, C2NUMPY_END = 255 } |
Functions | |
const char * | c2numpy_descr (c2numpy_type type) |
int | c2numpy_init (c2numpy_writer *writer, const std::string outputFilePrefix, int32_t numRowsPerFile) |
int | c2numpy_addcolumn (c2numpy_writer *writer, const std::string name, c2numpy_type type) |
int | c2numpy_open (c2numpy_writer *writer) |
int | c2numpy_bool (c2numpy_writer *writer, int8_t data) |
int | c2numpy_int (c2numpy_writer *writer, int64_t data) |
int | c2numpy_intc (c2numpy_writer *writer, int data) |
int | c2numpy_intp (c2numpy_writer *writer, size_t data) |
int | c2numpy_int8 (c2numpy_writer *writer, int8_t data) |
int | c2numpy_int16 (c2numpy_writer *writer, int16_t data) |
int | c2numpy_int32 (c2numpy_writer *writer, int32_t data) |
int | c2numpy_int64 (c2numpy_writer *writer, int64_t data) |
int | c2numpy_uint8 (c2numpy_writer *writer, uint8_t data) |
int | c2numpy_uint16 (c2numpy_writer *writer, uint16_t data) |
int | c2numpy_uint32 (c2numpy_writer *writer, uint32_t data) |
int | c2numpy_uint64 (c2numpy_writer *writer, uint64_t data) |
int | c2numpy_float (c2numpy_writer *writer, double data) |
int | c2numpy_float32 (c2numpy_writer *writer, float data) |
int | c2numpy_float64 (c2numpy_writer *writer, double data) |
int | c2numpy_string (c2numpy_writer *writer, const char *data) |
int | c2numpy_close (c2numpy_writer *writer) |
Variables | |
const char * | C2NUMPY_VERSION = "1.2" |
#define C2NUMPY_CHECK_ITEM |
Definition at line 222 of file c2numpy.h.
Referenced by c2numpy_bool(), c2numpy_float(), c2numpy_float32(), c2numpy_float64(), c2numpy_int(), c2numpy_int16(), c2numpy_int32(), c2numpy_int64(), c2numpy_int8(), c2numpy_intc(), c2numpy_intp(), c2numpy_string(), c2numpy_uint16(), c2numpy_uint32(), c2numpy_uint64(), and c2numpy_uint8().
#define C2NUMPY_INCREMENT_ITEM |
Definition at line 230 of file c2numpy.h.
Referenced by c2numpy_bool(), c2numpy_float(), c2numpy_float32(), c2numpy_float64(), c2numpy_int(), c2numpy_int16(), c2numpy_int32(), c2numpy_int64(), c2numpy_int8(), c2numpy_intc(), c2numpy_intp(), c2numpy_string(), c2numpy_uint16(), c2numpy_uint32(), c2numpy_uint64(), and c2numpy_uint8().
enum c2numpy_type |
Definition at line 29 of file c2numpy.h.
int c2numpy_addcolumn | ( | c2numpy_writer * | writer, |
const std::string | name, | ||
c2numpy_type | type | ||
) |
Definition at line 157 of file c2numpy.h.
References c2numpy_writer::columnNames, c2numpy_writer::columnTypes, and c2numpy_writer::numColumns.
Referenced by nnet::WaveformDenoiseTest::beginJob(), nnet::NoiseWaveformDump::beginJob(), nnet::RawWaveformDump::beginJob(), nnet::RawWaveformClnSigDump::beginJob(), and nnet::PointIdTrainingData::beginJob().
int c2numpy_bool | ( | c2numpy_writer * | writer, |
int8_t | data | ||
) |
Definition at line 244 of file c2numpy.h.
References C2NUMPY_BOOL, C2NUMPY_CHECK_ITEM, C2NUMPY_INCREMENT_ITEM, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by c2numpy_descr().
int c2numpy_close | ( | c2numpy_writer * | writer | ) |
Definition at line 425 of file c2numpy.h.
References c2numpy_writer::currentRowInFile, fclose(), c2numpy_writer::file, c2numpy_writer::numRowsPerFile, c2numpy_writer::sizeSeekPosition, and c2numpy_writer::sizeSeekSize.
Referenced by nnet::WaveformDenoiseTest::endJob(), nnet::NoiseWaveformDump::endJob(), nnet::RawWaveformDump::endJob(), nnet::RawWaveformClnSigDump::endJob(), and nnet::PointIdTrainingData::endJob().
const char* c2numpy_descr | ( | c2numpy_type | type | ) |
Definition at line 71 of file c2numpy.h.
References C2NUMPY_BOOL, c2numpy_bool(), C2NUMPY_COMPLEX, C2NUMPY_COMPLEX128, C2NUMPY_COMPLEX64, C2NUMPY_FLOAT, c2numpy_float(), C2NUMPY_FLOAT16, C2NUMPY_FLOAT32, c2numpy_float32(), C2NUMPY_FLOAT64, c2numpy_float64(), C2NUMPY_INT, c2numpy_int(), C2NUMPY_INT16, c2numpy_int16(), C2NUMPY_INT32, c2numpy_int32(), C2NUMPY_INT64, c2numpy_int64(), C2NUMPY_INT8, c2numpy_int8(), C2NUMPY_INTC, c2numpy_intc(), C2NUMPY_INTP, c2numpy_intp(), C2NUMPY_STRING, C2NUMPY_UINT16, c2numpy_uint16(), C2NUMPY_UINT32, c2numpy_uint32(), C2NUMPY_UINT64, c2numpy_uint64(), C2NUMPY_UINT8, and c2numpy_uint8().
Referenced by c2numpy_open().
int c2numpy_float | ( | c2numpy_writer * | writer, |
double | data | ||
) |
Definition at line 352 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_FLOAT, C2NUMPY_INCREMENT_ITEM, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by c2numpy_descr().
int c2numpy_float32 | ( | c2numpy_writer * | writer, |
float | data | ||
) |
Definition at line 369 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_FLOAT32, C2NUMPY_INCREMENT_ITEM, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by nnet::WaveformDenoiseTest::analyze(), nnet::NoiseWaveformDump::analyze(), nnet::RawWaveformDump::analyze(), nnet::RawWaveformClnSigDump::analyze(), nnet::PointIdTrainingData::analyze(), and c2numpy_descr().
int c2numpy_float64 | ( | c2numpy_writer * | writer, |
double | data | ||
) |
Definition at line 378 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_FLOAT64, C2NUMPY_INCREMENT_ITEM, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by c2numpy_descr().
int c2numpy_init | ( | c2numpy_writer * | writer, |
const std::string | outputFilePrefix, | ||
int32_t | numRowsPerFile | ||
) |
Definition at line 140 of file c2numpy.h.
References c2numpy_writer::currentColumn, c2numpy_writer::currentFileNumber, c2numpy_writer::currentRowInFile, c2numpy_writer::file, c2numpy_writer::numColumns, c2numpy_writer::numRowsPerFile, c2numpy_writer::outputFilePrefix, c2numpy_writer::sizeSeekPosition, and c2numpy_writer::sizeSeekSize.
Referenced by nnet::WaveformDenoiseTest::beginJob(), nnet::NoiseWaveformDump::beginJob(), nnet::RawWaveformDump::beginJob(), nnet::RawWaveformClnSigDump::beginJob(), and nnet::PointIdTrainingData::beginJob().
int c2numpy_int | ( | c2numpy_writer * | writer, |
int64_t | data | ||
) |
Definition at line 253 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_INCREMENT_ITEM, C2NUMPY_INT, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by c2numpy_descr().
int c2numpy_int16 | ( | c2numpy_writer * | writer, |
int16_t | data | ||
) |
Definition at line 289 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_INCREMENT_ITEM, C2NUMPY_INT16, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by nnet::WaveformDenoiseTest::analyze(), nnet::NoiseWaveformDump::analyze(), nnet::RawWaveformDump::analyze(), nnet::RawWaveformClnSigDump::analyze(), and c2numpy_descr().
int c2numpy_int32 | ( | c2numpy_writer * | writer, |
int32_t | data | ||
) |
Definition at line 298 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_INCREMENT_ITEM, C2NUMPY_INT32, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by nnet::NoiseWaveformDump::analyze(), nnet::RawWaveformDump::analyze(), nnet::RawWaveformClnSigDump::analyze(), and c2numpy_descr().
int c2numpy_int64 | ( | c2numpy_writer * | writer, |
int64_t | data | ||
) |
Definition at line 307 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_INCREMENT_ITEM, C2NUMPY_INT64, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by c2numpy_descr().
int c2numpy_int8 | ( | c2numpy_writer * | writer, |
int8_t | data | ||
) |
Definition at line 280 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_INCREMENT_ITEM, C2NUMPY_INT8, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by c2numpy_descr().
int c2numpy_intc | ( | c2numpy_writer * | writer, |
int | data | ||
) |
Definition at line 262 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_INCREMENT_ITEM, C2NUMPY_INTC, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by c2numpy_descr().
int c2numpy_intp | ( | c2numpy_writer * | writer, |
size_t | data | ||
) |
Definition at line 271 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_INCREMENT_ITEM, C2NUMPY_INTP, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by c2numpy_descr().
int c2numpy_open | ( | c2numpy_writer * | writer | ) |
Definition at line 165 of file c2numpy.h.
References c2numpy_descr(), c2numpy_writer::columnNames, c2numpy_writer::columnTypes, c2numpy_writer::currentFileNumber, c2numpy_writer::file, c2numpy_writer::numColumns, c2numpy_writer::numRowsPerFile, c2numpy_writer::outputFilePrefix, c2numpy_writer::sizeSeekPosition, and c2numpy_writer::sizeSeekSize.
int c2numpy_string | ( | c2numpy_writer * | writer, |
const char * | data | ||
) |
Definition at line 411 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_INCREMENT_ITEM, C2NUMPY_STRING, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by nnet::WaveformDenoiseTest::analyze(), nnet::NoiseWaveformDump::analyze(), nnet::RawWaveformDump::analyze(), and nnet::RawWaveformClnSigDump::analyze().
int c2numpy_uint16 | ( | c2numpy_writer * | writer, |
uint16_t | data | ||
) |
Definition at line 325 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_INCREMENT_ITEM, C2NUMPY_UINT16, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by nnet::WaveformDenoiseTest::analyze(), nnet::NoiseWaveformDump::analyze(), nnet::RawWaveformDump::analyze(), nnet::RawWaveformClnSigDump::analyze(), nnet::PointIdTrainingData::analyze(), and c2numpy_descr().
int c2numpy_uint32 | ( | c2numpy_writer * | writer, |
uint32_t | data | ||
) |
Definition at line 334 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_INCREMENT_ITEM, C2NUMPY_UINT32, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by nnet::WaveformDenoiseTest::analyze(), nnet::NoiseWaveformDump::analyze(), nnet::RawWaveformDump::analyze(), nnet::RawWaveformClnSigDump::analyze(), nnet::PointIdTrainingData::analyze(), and c2numpy_descr().
int c2numpy_uint64 | ( | c2numpy_writer * | writer, |
uint64_t | data | ||
) |
Definition at line 343 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_INCREMENT_ITEM, C2NUMPY_UINT64, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by c2numpy_descr().
int c2numpy_uint8 | ( | c2numpy_writer * | writer, |
uint8_t | data | ||
) |
Definition at line 316 of file c2numpy.h.
References C2NUMPY_CHECK_ITEM, C2NUMPY_INCREMENT_ITEM, C2NUMPY_UINT8, c2numpy_writer::columnTypes, c2numpy_writer::currentColumn, c2numpy_writer::file, and c2numpy_writer::numColumns.
Referenced by nnet::PointIdTrainingData::analyze(), and c2numpy_descr().