Mantid
|
isis raw file. More...
#include <isisraw2.h>
Public Member Functions | |
void | clear () |
Clears the output buffer. More... | |
int | ioRAW (FILE *file, bool from_file, bool read_data=true) override |
Loads the headers of the file, leaves the file pointer at a specific position. More... | |
ISISRAW2 () | |
No arg Constructor. More... | |
bool | readData (FILE *file, int i) |
Read data. More... | |
void | skipData (FILE *file, int i) |
Skip data. More... | |
~ISISRAW2 () override | |
Public Member Functions inherited from ISISRAW | |
int | getTimeChannels (float *rtcb1, int n) |
rtcb1 is of size t_ntc1+1 More... | |
int | ioRAW (FILE *file, ADD_STRUCT *s, int len, bool from_file) |
stuff More... | |
virtual int | ioRAW (FILE *file, bool from_file, bool read_data=true) |
stuff More... | |
int | ioRAW (FILE *file, char **s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, char *s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, DAEP_STRUCT *s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, DDES_STRUCT **s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, DDES_STRUCT *s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, DHDR_STRUCT *s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, float **s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, float *s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, HDR_STRUCT *s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, int **s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, int *s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, IVPB_STRUCT *s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, LOG_LINE **s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, LOG_LINE *s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, LOG_STRUCT *s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, RPB_STRUCT *s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, SE_STRUCT **s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, SE_STRUCT *s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, SPB_STRUCT *s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, uint32_t **s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, uint32_t *s, int len, bool from_file) |
stuff More... | |
int | ioRAW (FILE *file, USER_STRUCT *s, int len, bool from_file) |
stuff More... | |
ISISRAW () | |
stuff More... | |
ISISRAW (const ISISRAW &)=delete | |
ISISRAW (ISISCRPT_STRUCT *crpt) | |
stuff More... | |
ISISRAW (ISISCRPT_STRUCT *crpt, bool doUpdateFromCRPT) | |
stuff More... | |
ISISRAW & | operator= (ISISRAW)=delete |
int | printInfo (std::ostream &os) |
stuff More... | |
int | readFromFile (const char *filename, bool read_data=true) |
stuff More... | |
int | size_check () |
stuff More... | |
int | updateFromCRPT () |
stuff More... | |
virtual | ~ISISRAW () |
stuff More... | |
Public Attributes | |
int | ndes |
ndes More... | |
Public Attributes inherited from ISISRAW | |
struct ADD_STRUCT | add |
9*4 bytes More... | |
int * | code |
code for UTn tables (size NDET) More... | |
int * | crat |
crate number for each detector (size NDET) More... | |
DAEP_STRUCT | daep |
DAE parameter block (size 64*4 bytes) More... | |
uint32_t * | dat1 |
compressed data for (NTC1+1)*(NSP1+1)*NPER values More... | |
int | data_format |
data section format (0 = by TC, 1 = by spectrum) More... | |
DDES_STRUCT * | ddes |
(NSP1+1)*NPER items, totoal size (NSP1+1)*NPER*2*4 bytes More... | |
float * | delt |
hold off table (size NDET) More... | |
DHDR_STRUCT | dhdr |
size 32*4 bytes More... | |
int | e_nse |
number of controlled SEPs NSEP More... | |
SE_STRUCT * | e_seblock |
NSEP SE parameter blocks (total size NSEP*32*4 bytes) More... | |
int | frmt_ver_no |
format version number VER1 (=2) More... | |
HDR_STRUCT | hdr |
header block (80 bytes) More... | |
int | i_det |
number of detectors NDET More... | |
char | i_inst [8] |
instrument name More... | |
int | i_mon |
number of monitors NMON More... | |
int | i_use |
number of user defined UTn tables NUSE More... | |
IVPB_STRUCT | ivpb |
instrument parameter block (64*4 bytes) More... | |
float * | len2 |
L2 table (size NDET) More... | |
LOG_STRUCT | logsect |
log section More... | |
int * | mdet |
detector number for monitors (size NMON) More... | |
int * | modn |
module number for each detector (size NDET) More... | |
int * | monp |
prescale value for each monitor (size NMON) More... | |
int * | mpos |
module position for each detector (size NDET) More... | |
int | r_number |
run number More... | |
char | r_title [80] |
run title More... | |
RPB_STRUCT | rpb |
run parameter block (32*4 bytes) More... | |
SPB_STRUCT | spb |
sample parameter block (64*4 bytes) More... | |
int * | spec |
spectrum number table (size NDET) More... | |
int | t_nfpp |
number of frames per period More... | |
int | t_nper |
number of periods More... | |
int | t_nsp1 |
number of spectra in time regime 1 More... | |
int | t_ntc1 |
number of time channels in time regime 1 More... | |
int | t_ntrg |
number of time regimes (=1) More... | |
int | t_pmap [256] |
period number for each basic period More... | |
int | t_pre1 |
prescale for 32MHz clock More... | |
int * | t_tcb1 |
time channel boundaries in clock pulses (size NTC1+1) More... | |
int | t_tcm1 [5] |
time channel mode More... | |
float | t_tcp1 [5][4] |
time channel parameters More... | |
int * | timr |
time regime for each detector (size NDET) More... | |
float * | tthe |
2theta scattering angle (size NDET) More... | |
float * | u_dat |
user defined data (ULEN, max size 400 words) More... | |
int | u_len |
length of user data section More... | |
int * | udet |
user detector number for each detector (size NDET) More... | |
USER_STRUCT | user |
user information (8*20 bytes) More... | |
float * | ut |
nuse UT* user tables (total size NUSE*NDET) ut01=phi More... | |
int | ver2 |
run section version number VER2 (=1) More... | |
int | ver3 |
instrument section version number (=2) More... | |
int | ver4 |
SE section version number (=2) More... | |
int | ver5 |
DAE section version number (=2) More... | |
int | ver6 |
TCB section version number (=1) More... | |
int | ver7 |
user version number (=1) More... | |
int | ver8 |
data version number (=2) More... | |
Private Attributes | |
int | m_bufferSize |
char * | outbuff |
output buffer More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ISISRAW | |
static int | vmstime (char *timbuf, int len, time_t time_value) |
stuff More... | |
isis raw file.
Definition at line 13 of file isisraw2.h.
ISISRAW2::ISISRAW2 | ( | ) |
No arg Constructor.
Definition at line 22 of file isisraw2.cpp.
References Mantid::Kernel::Logger::debug(), Mantid::Kernel::SingletonHolder< T >::Instance(), and m_bufferSize.
|
override |
Definition at line 163 of file isisraw2.cpp.
References outbuff.
void ISISRAW2::clear | ( | ) |
|
overridevirtual |
Loads the headers of the file, leaves the file pointer at a specific position.
file | :: The file handle to use |
from_file | :: Whether to read from or write to a file |
read_data | :: Whether to go on to read the data |
Reimplemented from ISISRAW.
Definition at line 43 of file isisraw2.cpp.
References ADD_STRUCT::ad_dae, ADD_STRUCT::ad_data, ADD_STRUCT::ad_end, ADD_STRUCT::ad_inst, ADD_STRUCT::ad_log, ADD_STRUCT::ad_run, ADD_STRUCT::ad_se, ADD_STRUCT::ad_tcb, ADD_STRUCT::ad_user, ISISRAW::add, ISISRAW::code, ISISRAW::crat, ISISRAW::daep, ISISRAW::dat1, ISISRAW::data_format, ISISRAW::ddes, ISISRAW::delt, ISISRAW::dhdr, ISISRAW::e_nse, ISISRAW::e_seblock, Mantid::Kernel::Logger::error(), ISISRAW::frmt_ver_no, ISISRAW::hdr, ISISRAW::i_det, ISISRAW::i_inst, ISISRAW::i_mon, ISISRAW::i_use, ISISRAW::ioRAW(), ISISRAW::ivpb, ISISRAW::len2, m_bufferSize, ISISRAW::mdet, ISISRAW::modn, ISISRAW::monp, ISISRAW::mpos, ndes, outbuff, ISISRAW::r_title, ISISRAW::rpb, ISISRAW::spb, ISISRAW::spec, ISISRAW::t_nper, ISISRAW::t_nsp1, ISISRAW::t_ntc1, ISISRAW::t_pre1, ISISRAW::t_tcb1, ISISRAW::t_tcp1, ISISRAW::timr, ISISRAW::tthe, ISISRAW::u_dat, ISISRAW::u_len, ISISRAW::udet, ISISRAW::user, ISISRAW::ut, ISISRAW::ver3, ISISRAW::ver4, ISISRAW::ver5, ISISRAW::ver6, ISISRAW::ver7, and ISISRAW::ver8.
Referenced by Mantid::DataHandling::LoadRawHelper::ioRaw(), and Mantid::DataHandling::CreateSimulationWorkspace::loadMappingFromRAW().
bool ISISRAW2::readData | ( | FILE * | file, |
int | i | ||
) |
Read data.
file | :: The file pointer |
i | :: The amount of data to read |
Definition at line 146 of file isisraw2.cpp.
References byte_rel_expn(), ISISRAW::dat1, ISISRAW::ddes, Mantid::Kernel::Logger::debug(), ISISRAW::ioRAW(), m_bufferSize, ndes, DDES_STRUCT::nwords, outbuff, and ISISRAW::t_ntc1.
Referenced by Mantid::DataHandling::LoadRawHelper::readData().
void ISISRAW2::skipData | ( | FILE * | file, |
int | i | ||
) |
Skip data.
file | :: The file pointer |
i | :: The amount of data to skip |
Definition at line 133 of file isisraw2.cpp.
References ISISRAW::ddes, ndes, and Mantid::Kernel::Logger::warning().
Referenced by Mantid::DataHandling::LoadRawHelper::skipData().
|
private |
Definition at line 27 of file isisraw2.h.
Referenced by ioRAW(), ISISRAW2(), and readData().
int ISISRAW2::ndes |
|
private |
output buffer
Definition at line 26 of file isisraw2.h.
Referenced by clear(), ioRAW(), readData(), and ~ISISRAW2().