My Project
Public Member Functions
T0TreatToolsBase Class Reference

#include <T0TreatToolsBase.hh>

List of all members.

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.

Detailed Description

Tools for treating T0 event in eventdata

updated 130227: define BytesOfOrgEvent for readOrgEvent 100910: delete returnBytesOfEvent and define const BytesOfT0Event


Constructor & Destructor Documentation

T0TreatToolsBase::T0TreatToolsBase ( UInt4  bytes_of_org_event = 8)

Constructor.

Parameters:
bytes_of_org_eventsize of event to be read [bytes]

Member Function Documentation

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)

Parameters:
vector<Double>vector of year,month,day,hour,minute,second,sub-second
Return values:
(Double)instrument clock decoded from Instrument clock event
vector< Double > T0TreatToolsBase::convertInstClockToDateTime ( Double  inst_clock)

convert Instrument Clock (UTC) to Date Time (JST)

Parameters:
inst_clock(Double) instrument clock decoded from Instrument clock event
Return values:
vector<Double>vector of year,month,day,hour,minute,second,sub-second

put measuring period from instrument clock event

This returns vector with 12 params. If conversion is failed, size of returned vector is one.

Parameters:
None
Returns:
vector<Double> vector with 12 params for begin time and end time (year,month,day,hour,minute,second,sub-second) x 2
vector< UInt8 > T0TreatToolsBase::putPidRegion ( )

Put region of of PID.

Put first PID and last PID of T0

Return values:
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.

Parameters:
start_posiT0Index events before start_posi are skipped.
path_to_filepath to event data file
count_to_lastthe number of events from start_poti to last. Set 0 when read all events after start_posi.
Return values:
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

Return values:
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.

Parameters:
start_clockclock at beggining in required region
end_clockclock at last in reaquired region
Return values:
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.

Parameters:
start_pidpulse id at beggining in required region
end_pidpulse id at last in reaquired region
Return values:
vector<UInt4>vector size is 2.

Put PulseId.

Put all PulseIDs as vector

Return values:
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

Parameters:
start_sec(Double)
end_sec(Double)
Return values:
vector<UInt8>
vector< Double > T0TreatToolsBase::putVectorT0Clock ( )

Put T0 clock.

Put all T0 clocks as vector

Return values:
vector<double>

Put T0 index.

Put all T0 index as vector

Return values:
vector<UInt4>
vector< UInt4 > T0TreatToolsBase::putVectorT0IndexBySec ( Double  start_sec,
Double  end_sec 
)

Put T0 index vector between start ana end.

Put T0 index

Parameters:
start_sec(Double)
end_sec(Double)
Return values:
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.

Parameters:
filenamethe file name of event data from DAQ
Return values:
0succeeded in reading file
1failed in reading file
UInt4 T0TreatToolsBase::readT0IndexEvent ( string  filename)

Read T0 index file.

Read T0 index file produced by makeT0Index

Parameters:
filenamethe file name of event data for T0 index.
Return values:
0succeeded in reading file
1failed in readinf file
UInt4 T0TreatToolsBase::saveT0IndexEvent ( string  filename)

Make T0 index file.

This reads Event Data (RAW), make T0 index and save as file.

Parameters:
filenamethe file name of event data for T0 index.
Return values:
0succeeded in saving file
1failed in saving file

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