File: HDFPulseDataFile.hpp

package info (click to toggle)
pbseqlib 5.3.5%2Bdfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 7,148 kB
  • sloc: cpp: 77,259; python: 331; sh: 103; makefile: 41
file content (71 lines) | stat: -rw-r--r-- 1,795 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef _BLASR_HDF_PULSE_DATA_FILE_HPP_
#define _BLASR_HDF_PULSE_DATA_FILE_HPP_

#include <string>
#include <vector>

#include <H5Cpp.h>

#include <hdf/HDFGroup.hpp>
#include <hdf/HDFScanDataReader.hpp>
#include <hdf/HDFZMWReader.hpp>

class HDFPulseDataFile
{
public:
    H5::H5File hdfBasFile;
    HDFGroup pulseDataGroup;
    HDFGroup rootGroup;
    HDFGroup *rootGroupPtr;
    std::string pulseDataGroupName;
    HDFScanDataReader scanDataReader;
    bool useScanData;
    bool closeFileOnExit;

    // Max number of rows allowed to read into memory at a time.
    DSLength maxAllocNElements;

    HDFZMWReader zmwReader;
    std::vector<DSLength> eventOffset;
    UInt nReads;
    bool preparedForRandomAccess;

    DSLength GetAllReadLengths(std::vector<DNALength> &readLengths);

    void CheckMemoryAllocation(long allocSize, long allocLimit, const char *fieldName = NULL);

    HDFPulseDataFile();

    void PrepareForRandomAccess();

    int OpenHDFFile(std::string fileName,
                    const H5::FileAccPropList &fileAccPropList = H5::FileAccPropList::DEFAULT);

    //
    // All pulse data files contain the "PulseData" group name.
    //
    //
    int InitializePulseDataFile(std::string fileName, const H5::FileAccPropList &fileAccPropList =
                                                          H5::FileAccPropList::DEFAULT);

    int Initialize(std::string fileName,
                   const H5::FileAccPropList &fileAccPropList = H5::FileAccPropList::DEFAULT);

    //
    // Initialize inside another open group.
    //
    int Initialize(HDFGroup *rootGroupP);

    //
    // Initialize all fields
    //
    int Initialize();

    int InitializePulseGroup();

    size_t GetAllHoleNumbers(std::vector<unsigned int> &holeNumbers);

    void Close();
};

#endif