RawBeamSwicData.cxx File Reference

#include "RawBeamSwicData.h"
#include <iostream>

Go to the source code of this file.

Functions

int unscale (const double &d)
int ul2int (const double &d1, const double &d2)

Variables

static const int CALCULATION_OFFSET = 0
static const int CALCULATION_BLOCK_COUNT = 8
static const int MEAN_FLAG_OFFSET = 0
static const int SIGMA_FLAG_OFFSET = 1
static const int INTENSITY_FLAG_OFFSET = 2
static const int FOM_FLAG_OFFSET = 3
static const int STATUS_FLAG_OFFSET = 4
static const int MEAN_OFFSET = 5
static const int SIGMA_OFFSET = 7
static const int INTENSITY_OFFSET = 9
static const int FOM_OFFSET = 11
static const int CALCULATION_BLOCK_LENGTH = 13
static const int RAW_OFFSET = CALCULATION_BLOCK_LENGTH * CALCULATION_BLOCK_COUNT + CALCULATION_OFFSET
static const int RAW_LENGTH = 96
static const int POSITION_OFFSET = 200
static const int EVENT8FTIMESTAMP_OFFSET = 201
static const int GPSTIMESTAMP_OFFSET = EVENT8FTIMESTAMP_OFFSET + 4
static const int SAMPLEEVENT_OFFSET = GPSTIMESTAMP_OFFSET + 4
static const int RESETEVENT_OFFSET = SAMPLEEVENT_OFFSET + 1
static const int N0CEVENT_OFFSET = RESETEVENT_OFFSET + 1
static const int MILLISLASTMI_OFFSET = N0CEVENT_OFFSET + 1
static const int N1DEVENTMIRESET_OFFSET = MILLISLASTMI_OFFSET + 1
static const int N1DEVENT00_OFFSET = N1DEVENTMIRESET_OFFSET + 1
static const int HORIZONTAL_BLOCK_NUMBER = 0
static const int VERTICAL_BLOCK_NUMBER = 1

Function Documentation

int ul2int ( const double &  d1,
const double &  d2 
)

Definition at line 146 of file RawBeamSwicData.cxx.

References unscale().

Referenced by RawBeamSwicData::VmeNanoseconds(), and RawBeamSwicData::VmeSeconds().

00147 {
00148     int id1 = unscale(d1);
00149     int id2 = unscale(d2);
00150     return (id1<<16)+(id2&0xffff);
00151 }

int unscale ( const double &  d  ) 

Definition at line 138 of file RawBeamSwicData.cxx.

00139 {
00140 //    double temp_needed_to_avoid_gcc_bug = d*32767./10.;
00141 //    return (int)temp_needed_to_avoid_gcc_bug;
00142     return (int)(d*32767.001/10.);
00143 }


Variable Documentation

const int CALCULATION_BLOCK_COUNT = 8 [static]

Definition at line 85 of file RawBeamSwicData.cxx.

const int CALCULATION_BLOCK_LENGTH = 13 [static]

Definition at line 101 of file RawBeamSwicData.cxx.

const int CALCULATION_OFFSET = 0 [static]

Definition at line 84 of file RawBeamSwicData.cxx.

const int EVENT8FTIMESTAMP_OFFSET = 201 [static]

Definition at line 111 of file RawBeamSwicData.cxx.

const int FOM_FLAG_OFFSET = 3 [static]

Definition at line 91 of file RawBeamSwicData.cxx.

const int FOM_OFFSET = 11 [static]

Definition at line 99 of file RawBeamSwicData.cxx.

const int GPSTIMESTAMP_OFFSET = EVENT8FTIMESTAMP_OFFSET + 4 [static]
const int HORIZONTAL_BLOCK_NUMBER = 0 [static]

Definition at line 133 of file RawBeamSwicData.cxx.

const int INTENSITY_FLAG_OFFSET = 2 [static]

Definition at line 90 of file RawBeamSwicData.cxx.

const int INTENSITY_OFFSET = 9 [static]

Definition at line 98 of file RawBeamSwicData.cxx.

const int MEAN_FLAG_OFFSET = 0 [static]

Definition at line 88 of file RawBeamSwicData.cxx.

const int MEAN_OFFSET = 5 [static]

Definition at line 96 of file RawBeamSwicData.cxx.

const int MILLISLASTMI_OFFSET = N0CEVENT_OFFSET + 1 [static]

Definition at line 119 of file RawBeamSwicData.cxx.

const int N0CEVENT_OFFSET = RESETEVENT_OFFSET + 1 [static]

Definition at line 118 of file RawBeamSwicData.cxx.

const int N1DEVENT00_OFFSET = N1DEVENTMIRESET_OFFSET + 1 [static]

Definition at line 121 of file RawBeamSwicData.cxx.

const int N1DEVENTMIRESET_OFFSET = MILLISLASTMI_OFFSET + 1 [static]

Definition at line 120 of file RawBeamSwicData.cxx.

const int POSITION_OFFSET = 200 [static]

Definition at line 108 of file RawBeamSwicData.cxx.

const int RAW_LENGTH = 96 [static]

Definition at line 105 of file RawBeamSwicData.cxx.

Definition at line 104 of file RawBeamSwicData.cxx.

const int RESETEVENT_OFFSET = SAMPLEEVENT_OFFSET + 1 [static]

Definition at line 117 of file RawBeamSwicData.cxx.

const int SAMPLEEVENT_OFFSET = GPSTIMESTAMP_OFFSET + 4 [static]

Definition at line 116 of file RawBeamSwicData.cxx.

const int SIGMA_FLAG_OFFSET = 1 [static]

Definition at line 89 of file RawBeamSwicData.cxx.

const int SIGMA_OFFSET = 7 [static]

Definition at line 97 of file RawBeamSwicData.cxx.

const int STATUS_FLAG_OFFSET = 4 [static]

Definition at line 92 of file RawBeamSwicData.cxx.

const int VERTICAL_BLOCK_NUMBER = 1 [static]

Definition at line 134 of file RawBeamSwicData.cxx.


Generated on 8 Jul 2019 for loon by  doxygen 1.6.1