Commit 76ef08ce by IOWA\dheitbri

Upgraded to 64bit

parent 39e4aadf
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
/// ///
/// $Id: DaqBuffer.h,v 1.5 2013/04/30 00:59:10 IOWA\vhorosewski Exp $ /// $Id: DaqBuffer.h,v 1.6 2020/03/12 00:43:37 IOWA\dheitbri Exp $
/// ///
/// Date: December 2004 /// Date: December 2004
/// ///
...@@ -32,8 +32,8 @@ public: ...@@ -32,8 +32,8 @@ public:
std::vector<TDaqByte>::const_pointer GetDataPtr() const; ///< Return faw pointer to data std::vector<TDaqByte>::const_pointer GetDataPtr() const; ///< Return faw pointer to data
int GetCount() const; ///< Return number of typed elements in buffer size_t GetCount() const; ///< Return number of typed elements in buffer
int GetSize() const; ///< Return buffer size in bytes size_t GetSize() const; ///< Return buffer size in bytes
char* GetChar(int ind=0); ///< Return char type pointer to data char* GetChar(int ind=0); ///< Return char type pointer to data
int* GetInt(int ind=0); ///< Return int type pointer to data int* GetInt(int ind=0); ///< Return int type pointer to data
float* GetFloat(int ind=0); ///< Return float type pointer to data float* GetFloat(int ind=0); ///< Return float type pointer to data
...@@ -55,7 +55,7 @@ protected: ...@@ -55,7 +55,7 @@ protected:
/// ///
/// This function ... /// This function ...
// //
inline int inline size_t
CDaqBuffer::GetSize() const CDaqBuffer::GetSize() const
{ {
return (int)m_Data.size(); return (int)m_Data.size();
...@@ -63,7 +63,7 @@ CDaqBuffer::GetSize() const ...@@ -63,7 +63,7 @@ CDaqBuffer::GetSize() const
/// ///
/// This function ... /// This function ...
inline int inline size_t
CDaqBuffer::GetCount() const CDaqBuffer::GetCount() const
{ {
return m_Count; return m_Count;
......
...@@ -83,38 +83,39 @@ private: ...@@ -83,38 +83,39 @@ private:
bool ReadHeader(FILE *); bool ReadHeader(FILE *);
bool ReadChannelInfo(FILE *); bool ReadChannelInfo(FILE *);
bool DetectFrameHeader(int recFrame); bool DetectFrameHeader(int recFrame);
bool ResyncFrame(int curFrame, int& skipCount); bool ResyncFrame(int curFrame, long long& skipCount);
TResyncOutcome ResyncChannel(int recFrame, int& skipCount); TResyncOutcome ResyncChannel(int recFrame, long long& skipCount);
bool WriteTocFile(const std::string& fname); bool WriteTocFile(const std::string& fname);
bool ReadTocFile(const std::string& fname); bool ReadTocFile(const std::string& fname);
TReadErrorCode ReadFrameHeader(int, int& ,int&, int&); TReadErrorCode ReadFrameHeader(int, int& ,int&, long long&);
TReadErrorCode ReadDataForOneFrame(int, TIntVec, TDataVec &, void *, std::vector<bool>&); TReadErrorCode ReadDataForOneFrame(int, TIntVec, TDataVec &, void *, std::vector<bool>&);
TReadErrorCode ReadChannelDataForOneFrame(int, int, CDaqBuffer&, void*, bool&); TReadErrorCode ReadChannelDataForOneFrame(int, int, CDaqBuffer&, void*, bool&);
std::string m_Filename; std::string m_Filename;
std::string m_Version; ///< file version std::string m_Version; ///< file version
FILE* m_pFile; FILE* m_pFile;
std::string m_Title; ///< Simulation title, as stored in DAQ file std::string m_Title; ///< Simulation title, as stored in DAQ file
std::string m_Date; ///< Date of collection, as stored in DAQ file std::string m_Date; ///< Date of collection, as stored in DAQ file
std::string m_Subj; ///< As stored in DAQ file std::string m_Subj; ///< As stored in DAQ file
std::string m_Run; ///< As stored in DAQ file std::string m_Run; ///< As stored in DAQ file
std::string m_RunInst; ///< As stored in DAQ file std::string m_RunInst; ///< As stored in DAQ file
int m_NumEntries; ///< As stored in DAQ file int m_NumEntries; ///< As stored in DAQ file
int m_Frequency; ///< As stored in DAQ file int m_Frequency; ///< As stored in DAQ file
void (*m_UserErrorFunc)(const char *, const char *); void (*m_UserErrorFunc)(const char *, const char *);
void (*m_UserProgrFunc)(const char *, int, int); void (*m_UserProgrFunc)(const char *, int, int);
bool m_TocExists; ///< Indicates a TOC exists in a file bool m_TocExists; ///< Indicates a TOC exists in a file
bool m_HaveToc; ///< Indicates if we have TOC in memory bool m_HaveToc; ///< Indicates if we have TOC in memory
TChanInfoVec m_Channels; ///< Channel information TChanInfoVec m_Channels; ///< Channel information
long m_DataOffset; ///< where data starts in the file long long m_DataOffset; ///< where data starts in the file
std::map<int, int> m_Toc; ///< given a sim frame, gives the offset in the file typedef std::map<int, long long> TTocMap;
std::vector<int> m_DroppedFrames; TTocMap m_Toc; ///< given a sim frame, gives the offset in the file
std::vector<int> m_DroppedFrames;
int m_FirstFrame; int m_FirstFrame;
int m_LastFrame; int m_LastFrame;
mutable std::string m_LastError; mutable std::string m_LastError;
TDaqEofStatus m_EofStatus; TDaqEofStatus m_EofStatus;
// These are for data integrity // These are for data integrity
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// //
// $Id: DaqIoLibDefines.h,v 1.4 2019/07/09 14:33:59 IOWA\dheitbri Exp $ // $Id: DaqIoLibDefines.h,v 1.5 2020/03/12 00:43:37 IOWA\dheitbri Exp $
// Date: March, 2005 // Date: March, 2005
// Author: Yiannis Papelis // Author: Yiannis Papelis
// //
...@@ -18,6 +18,7 @@ class CDaqChannelInfo; ...@@ -18,6 +18,7 @@ class CDaqChannelInfo;
#define DAQ_MAGIC_NUM_VER_2_2 0x2C3D4E7F #define DAQ_MAGIC_NUM_VER_2_2 0x2C3D4E7F
#define DAQ_END_MARK 0x1A2B2C3D #define DAQ_END_MARK 0x1A2B2C3D
#define DAQ_TOC_MAGIC_NUM 0x2C3ABCDE #define DAQ_TOC_MAGIC_NUM 0x2C3ABCDE
#define DAQ_TOC_MAGIC_NUM64 0x123ABCDE
typedef unsigned char TDaqByte; typedef unsigned char TDaqByte;
typedef std::vector<int> TIntVec; typedef std::vector<int> TIntVec;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment