Analysis-Utilities 26.9.9
C++/ROOT utilities for nuclear measurement data analysis
Loading...
Searching...
No Matches
WaveDump742Reader Class Reference

Cursor over a WaveDump DT5742 binary file. More...

#include <BinaryUtils.hpp>

Inheritance diagram for WaveDump742Reader:
Collaboration diagram for WaveDump742Reader:

Public Member Functions

 WaveDump742Reader (Bool_t with_corrections=kTRUE)
 Construct a reader with no file open.
virtual ~WaveDump742Reader ()
Bool_t ReadEvent () override
 Decode the next record into the derived reader's current event.
const WaveDump742DataGetCurrentEvent () const
 The event most recently read.
WaveDump742DataGetCurrentEvent ()
 Mutable access to the event most recently read.
void SetCorrectionsEnabled (Bool_t enable)
 Turn the DT5742 timing corrections on or off.
Bool_t GetCorrectionsEnabled () const
 Whether the timing corrections are being applied.
Public Member Functions inherited from BinaryReader
 BinaryReader ()
 Construct a reader with no file open.
virtual ~BinaryReader ()
 Closes the file if it is still open.
virtual Bool_t Open (const char *fname)
 Open a binary file for reading.
virtual void Close ()
 Close the file. Safe to call when nothing is open.
Bool_t IsOpen () const
 Whether a file is currently open.
TString GetFileName () const
 Path most recently passed to Open().
Long64_t GetBytesRead () const
 Bytes consumed so far, for progress reporting.
Bool_t IsEOF () const
 Whether the file is exhausted or was never opened.

Additional Inherited Members

Protected Attributes inherited from BinaryReader
std::ifstream file
TString filename
Bool_t file_open
Long64_t bytes_read

Detailed Description

Cursor over a WaveDump DT5742 binary file.

Definition at line 339 of file BinaryUtils.hpp.

Constructor & Destructor Documentation

◆ WaveDump742Reader()

WaveDump742Reader::WaveDump742Reader ( Bool_t with_corrections = kTRUE)
inline

Construct a reader with no file open.

Parameters
with_correctionskTRUE (default) to apply the DT5742 timing corrections as events are decoded.

Definition at line 350 of file BinaryUtils.hpp.

◆ ~WaveDump742Reader()

virtual WaveDump742Reader::~WaveDump742Reader ( )
inlinevirtual

Definition at line 353 of file BinaryUtils.hpp.

Member Function Documentation

◆ GetCorrectionsEnabled()

Bool_t WaveDump742Reader::GetCorrectionsEnabled ( ) const
inline

Whether the timing corrections are being applied.

Definition at line 368 of file BinaryUtils.hpp.

◆ GetCurrentEvent() [1/2]

WaveDump742Data & WaveDump742Reader::GetCurrentEvent ( )
inline

Mutable access to the event most recently read.

Returns
A reference valid only until the next ReadEvent().

Definition at line 362 of file BinaryUtils.hpp.

◆ GetCurrentEvent() [2/2]

const WaveDump742Data & WaveDump742Reader::GetCurrentEvent ( ) const
inline

The event most recently read.

Returns
A reference valid only until the next ReadEvent().

Definition at line 359 of file BinaryUtils.hpp.

Referenced by InitUtils::ConvertWavedumpBinToROOT().

◆ ReadEvent()

Bool_t WaveDump742Reader::ReadEvent ( )
overridevirtual

Decode the next record into the derived reader's current event.

Returns
kTRUE if a record was read; kFALSE at end of file or on a malformed record.

Implements BinaryReader.

Definition at line 288 of file BinaryUtils.cpp.

Referenced by InitUtils::ConvertWavedumpBinToROOT().

◆ SetCorrectionsEnabled()

void WaveDump742Reader::SetCorrectionsEnabled ( Bool_t enable)
inline

Turn the DT5742 timing corrections on or off.

Parameters
enablekTRUE to apply them to subsequently read events.

Definition at line 366 of file BinaryUtils.hpp.


The documentation for this class was generated from the following files: