|
Analysis-Utilities 26.9.9
C++/ROOT utilities for nuclear measurement data analysis
|
Cursor over a SOLARIS DAQ .sol file. More...
#include <BinaryUtils.hpp>
Public Member Functions | |
| SOLReader () | |
| Construct a reader with no file open and traces enabled. | |
| virtual | ~SOLReader () |
| void | SetSkipTraces (Bool_t skip) |
| Skip trace payloads while still parsing every block. | |
| Bool_t | GetSkipTraces () const |
| Whether trace payloads are being skipped. | |
| Bool_t | ReadEvent () override |
| Decode the next record into the derived reader's current event. | |
| const SOLData & | GetCurrentEvent () const |
| The block most recently read. | |
| SOLData & | GetCurrentEvent () |
| Mutable access to the block most recently read. | |
| Long64_t | GetBlockID () const |
| Zero-based index of the block most recently read. | |
| SOLHit | ToHit () const |
| Copy the current block's header fields into a standalone SOLHit. | |
| 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. | |
Static Public Member Functions | |
| static std::vector< TString > | SplitSolFileByTime (const char *inputFile, const char *outputDir, Double_t chunkSeconds, Int_t &totalBlocks, Int_t &totalChunks) |
| Split a run file into time-bounded chunks. | |
Additional Inherited Members | |
| Protected Attributes inherited from BinaryReader | |
| std::ifstream | file |
| TString | filename |
| Bool_t | file_open |
| Long64_t | bytes_read |
Cursor over a SOLARIS DAQ .sol file.
Definition at line 551 of file BinaryUtils.hpp.
|
inline |
Construct a reader with no file open and traces enabled.
Definition at line 559 of file BinaryUtils.hpp.
|
inlinevirtual |
Definition at line 561 of file BinaryUtils.hpp.
|
inline |
Zero-based index of the block most recently read.
Definition at line 582 of file BinaryUtils.hpp.
|
inline |
Mutable access to the block most recently read.
Definition at line 579 of file BinaryUtils.hpp.
|
inline |
The block most recently read.
Definition at line 576 of file BinaryUtils.hpp.
Referenced by InitUtils::ConvertSOLBinToHits(), and InitUtils::ConvertSOLBinToROOT().
|
inline |
Whether trace payloads are being skipped.
Definition at line 570 of file BinaryUtils.hpp.
|
overridevirtual |
Decode the next record into the derived reader's current event.
Implements BinaryReader.
Definition at line 712 of file BinaryUtils.cpp.
Referenced by InitUtils::ConvertSOLBinToHits(), and InitUtils::ConvertSOLBinToROOT().
|
inline |
Skip trace payloads while still parsing every block.
| skip | kTRUE to discard traces as blocks are read. Much faster and far cheaper in memory when only header fields are needed. |
Definition at line 568 of file BinaryUtils.hpp.
|
static |
Split a run file into time-bounded chunks.
Each output file collects blocks whose timestamps fall within chunkSeconds of that chunk's first block. Reads and writes are bulk-buffered at 4 MiB, so splitting runs close to disk speed.
| inputFile | Path to the source .sol file. |
| outputDir | Directory for the chunk files, which are named <basename>_chunk<NNN>.sol. |
| chunkSeconds | Chunk duration in seconds. Compared against the nanosecond block timestamps internally. |
| totalBlocks | Set to the number of blocks processed. |
| totalChunks | Set to the number of chunk files created. |
Definition at line 512 of file BinaryUtils.cpp.
| SOLHit SOLReader::ToHit | ( | ) | const |
Copy the current block's header fields into a standalone SOLHit.
The way to retain a block past the next ReadEvent(): the result owns its data and carries no traces.
Definition at line 975 of file BinaryUtils.cpp.
Referenced by InitUtils::ConvertSOLBinToHits().