My Project
|
#include <T0TreatToolsBase.hh>
Public Member Functions | |
T0TreatToolsBase (UInt4 bytes_of_org_event=8) | |
Constructor. | |
virtual | ~T0TreatToolsBase () |
Destructor. | |
UInt4 | readOrgEvent (string filename) |
Load original event data. | |
UInt4 | saveT0IndexEvent (string filename) |
Make T0 index file. | |
UInt4 | readT0IndexEvent (string filename) |
Read T0 index file. | |
vector< UInt4 > | putVectorT0Index () |
Put T0 index. | |
vector< UInt4 > | putVectorT0IndexBySec (Double start_sec, Double end_sec) |
Put T0 index vector between start ana end. | |
vector< UInt8 > | putVectorPulseId () |
Put PulseId. | |
vector< UInt8 > | putVectorPulseIdBySec (Double start_sec, Double end_sec) |
Put PulseId vector between start ana end. | |
vector< Double > | putVectorT0Clock () |
Put T0 clock. | |
vector< UInt4 > | putT0IndexByPid (UInt8 start_pid, UInt8 end_pid) |
Put required region of T0 index. | |
vector< UInt4 > | putT0IndexByClock (Double start_clock, Double end_clock) |
Put required region of T0 index. | |
vector< Double > | putT0ClockRegion () |
Put the region of clock number of T0. | |
vector< UInt8 > | putPidRegion () |
Put region of of PID. | |
vector< Double > | putT0ClockDiffAll () |
vector< Double > | putT0ClockDiff () |
void | decodeT0ClockEvt (UChar eventClock[], Double *clock) |
bool | CheckReliable () |
vector< Double > | convertInstClockToDateTime (Double inst_clock) |
convert Instrument Clock (UTC) to Date Time (JST) | |
Double | convertDateTimeToInstClock (vector< Double > date_time) |
convert Date Time (JST) to Instrument Clock which its origin is 2008/1/1 00:00:00 (MLF origin Date Time) | |
vector< Double > | putMeasPeriodFromT0 () |
put measuring period from instrument clock event | |
void | SetBytesOfOrgEvent (UInt4 bytes_of_org_event) |
vector< UInt4 > | putSlicedT0IndexEvent (UInt4 start_posi, string path_to_file, UInt4 *count_to_last) |
vector< UInt4 > | putSlicedT0IndexEventPy (UInt4 start_posi, string path_to_file) |
Put required region of T0 index from T0Index Event file. |
Tools for treating T0 event in eventdata
updated 130227: define BytesOfOrgEvent for readOrgEvent 100910: delete returnBytesOfEvent and define const BytesOfT0Event
T0TreatToolsBase::T0TreatToolsBase | ( | UInt4 | bytes_of_org_event = 8 | ) |
Constructor.
bytes_of_org_event | size of event to be read [bytes] |
Double T0TreatToolsBase::convertDateTimeToInstClock | ( | vector< Double > | date_time | ) |
convert Date Time (JST) to Instrument Clock which its origin is 2008/1/1 00:00:00 (MLF origin Date Time)
vector<Double> | vector of year,month,day,hour,minute,second,sub-second |
(Double) | instrument clock decoded from Instrument clock event |
vector< Double > T0TreatToolsBase::convertInstClockToDateTime | ( | Double | inst_clock | ) |
convert Instrument Clock (UTC) to Date Time (JST)
inst_clock | (Double) instrument clock decoded from Instrument clock event |
vector<Double> | vector of year,month,day,hour,minute,second,sub-second |
vector< Double > T0TreatToolsBase::putMeasPeriodFromT0 | ( | ) |
put measuring period from instrument clock event
This returns vector with 12 params. If conversion is failed, size of returned vector is one.
None |
vector< UInt8 > T0TreatToolsBase::putPidRegion | ( | ) |
Put region of of PID.
Put first PID and last PID of T0
vector<UInt4> | vector size is 2. |
vector< UInt4 > T0TreatToolsBase::putSlicedT0IndexEventPy | ( | UInt4 | start_posi, |
string | path_to_file | ||
) |
Put required region of T0 index from T0Index Event file.
T0Index will be picked up from start_posi to count_to_last.
start_posi | T0Index events before start_posi are skipped. |
path_to_file | path to event data file |
count_to_last | the number of events from start_poti to last. Set 0 when read all events after start_posi. |
vector<UInt4> |
vector< Double > T0TreatToolsBase::putT0ClockRegion | ( | ) |
Put the region of clock number of T0.
Put two clock numbers for top and last index of T0
vector<double> | vector size is 2. |
vector< UInt4 > T0TreatToolsBase::putT0IndexByClock | ( | Double | start_clock, |
Double | end_clock | ||
) |
Put required region of T0 index.
Put start and end index of T0 by given Clocks.
start_clock | clock at beggining in required region |
end_clock | clock at last in reaquired region |
vector<UInt4> | vector size is 2. |
vector< UInt4 > T0TreatToolsBase::putT0IndexByPid | ( | UInt8 | start_pid, |
UInt8 | end_pid | ||
) |
Put required region of T0 index.
Put start and end index of T0 by given Pulse-IDs.
start_pid | pulse id at beggining in required region |
end_pid | pulse id at last in reaquired region |
vector<UInt4> | vector size is 2. |
vector< UInt8 > T0TreatToolsBase::putVectorPulseId | ( | ) |
Put PulseId.
Put all PulseIDs as vector
vector<UInt8> |
vector< UInt8 > T0TreatToolsBase::putVectorPulseIdBySec | ( | Double | start_sec, |
Double | end_sec | ||
) |
Put PulseId vector between start ana end.
Put PulseId index in the range of given parameters
start_sec | (Double) |
end_sec | (Double) |
vector<UInt8> |
vector< Double > T0TreatToolsBase::putVectorT0Clock | ( | ) |
Put T0 clock.
Put all T0 clocks as vector
vector<double> |
vector< UInt4 > T0TreatToolsBase::putVectorT0Index | ( | ) |
Put T0 index.
Put all T0 index as vector
vector<UInt4> |
vector< UInt4 > T0TreatToolsBase::putVectorT0IndexBySec | ( | Double | start_sec, |
Double | end_sec | ||
) |
Put T0 index vector between start ana end.
Put T0 index
start_sec | (Double) |
end_sec | (Double) |
vector<UInt4> |
UInt4 T0TreatToolsBase::readOrgEvent | ( | string | filename | ) |
Load original event data.
This reads original event data from DAQ system to count events from head of file to T0 event and store counts, Pulse ID and its Instrument clock.
filename | the file name of event data from DAQ |
0 | succeeded in reading file |
1 | failed in reading file |
UInt4 T0TreatToolsBase::readT0IndexEvent | ( | string | filename | ) |
Read T0 index file.
Read T0 index file produced by makeT0Index
filename | the file name of event data for T0 index. |
0 | succeeded in reading file |
1 | failed in readinf file |
UInt4 T0TreatToolsBase::saveT0IndexEvent | ( | string | filename | ) |
Make T0 index file.
This reads Event Data (RAW), make T0 index and save as file.
filename | the file name of event data for T0 index. |
0 | succeeded in saving file |
1 | failed in saving file |