ClassData.h, fine_time = -1 as default
This commit is contained in:
parent
e79f93e9ab
commit
540f967d70
14
ClassData.h
14
ClassData.h
|
@ -311,7 +311,7 @@ inline void Data::ClearData(){
|
||||||
if( ch >= numInputCh) break;
|
if( ch >= numInputCh) break;
|
||||||
for( int j = 0; j < dataSize; j++){
|
for( int j = 0; j < dataSize; j++){
|
||||||
Timestamp[ch][j] = 0;
|
Timestamp[ch][j] = 0;
|
||||||
fineTime[ch][j] = 0;
|
fineTime[ch][j] = -1;
|
||||||
Energy[ch][j] = 0;
|
Energy[ch][j] = 0;
|
||||||
Energy2[ch][j] = 0;
|
Energy2[ch][j] = 0;
|
||||||
Waveform1[ch][j].clear();
|
Waveform1[ch][j].clear();
|
||||||
|
@ -897,7 +897,11 @@ inline int Data::DecodePHADualChannelBlock(unsigned int ChannelMask, bool fastDe
|
||||||
|
|
||||||
Energy[channel][DataIndex[channel]] = energy;
|
Energy[channel][DataIndex[channel]] = energy;
|
||||||
Timestamp[channel][DataIndex[channel]] = timeStamp * tick2ns;
|
Timestamp[channel][DataIndex[channel]] = timeStamp * tick2ns;
|
||||||
if(extra2Option == 2 ) fineTime[channel][DataIndex[channel]] = (extra2 & 0x03FF ) * tick2ns; // in ps, the tick2ns is a conversion factor
|
if(extra2Option == 2 ) {
|
||||||
|
fineTime[channel][DataIndex[channel]] = (extra2 & 0x03FF ) * tick2ns; // in ps, the tick2ns is a conversion factor
|
||||||
|
}else{
|
||||||
|
fineTime[channel][DataIndex[channel]] = -1;
|
||||||
|
}
|
||||||
PileUp[channel][DataIndex[channel]] = pileUp;
|
PileUp[channel][DataIndex[channel]] = pileUp;
|
||||||
NumEventsDecoded[channel] ++;
|
NumEventsDecoded[channel] ++;
|
||||||
|
|
||||||
|
@ -1100,7 +1104,11 @@ inline int Data::DecodePSDDualChannelBlock(unsigned int ChannelMask, bool fastDe
|
||||||
Energy2[channel][DataIndex[channel]] = Qshort;
|
Energy2[channel][DataIndex[channel]] = Qshort;
|
||||||
Energy[channel][DataIndex[channel]] = Qlong;
|
Energy[channel][DataIndex[channel]] = Qlong;
|
||||||
Timestamp[channel][DataIndex[channel]] = timeStamp * tick2ns;
|
Timestamp[channel][DataIndex[channel]] = timeStamp * tick2ns;
|
||||||
if( extraOption == 2 ) fineTime[channel][DataIndex[channel]] = (extra & 0x3FF) * tick2ns; //in ps, tick2ns is justa conversion factor
|
if( extraOption == 2 ) {
|
||||||
|
fineTime[channel][DataIndex[channel]] = (extra & 0x3FF) * tick2ns; //in ps, tick2ns is justa conversion factor
|
||||||
|
}else{
|
||||||
|
fineTime[channel][DataIndex[channel]] = -1; //in ps, tick2ns is justa conversion factor
|
||||||
|
}
|
||||||
|
|
||||||
NumEventsDecoded[channel] ++;
|
NumEventsDecoded[channel] ++;
|
||||||
if( !pileup){
|
if( !pileup){
|
||||||
|
|
|
@ -183,7 +183,6 @@ int Digitizer::OpenDigitizer(int boardID, int portID, bool program, bool verbose
|
||||||
/// change address 0xEF08 (5 bits), this will reflected in the 2nd word of the Board Agg. header.
|
/// change address 0xEF08 (5 bits), this will reflected in the 2nd word of the Board Agg. header.
|
||||||
ret = CAEN_DGTZ_WriteRegister(handle, DPP::BoardID, (DPPType & 0xF));
|
ret = CAEN_DGTZ_WriteRegister(handle, DPP::BoardID, (DPPType & 0xF));
|
||||||
|
|
||||||
|
|
||||||
//TODO somehow the bdInfo does not work, use DPPType to set it
|
//TODO somehow the bdInfo does not work, use DPPType to set it
|
||||||
uint32_t bdInfo = GetSettingFromMemory(DPP::BoardInfo_R);
|
uint32_t bdInfo = GetSettingFromMemory(DPP::BoardInfo_R);
|
||||||
uint32_t haha = ((bdInfo >> 8 ) & 0xFF);
|
uint32_t haha = ((bdInfo >> 8 ) & 0xFF);
|
||||||
|
@ -287,7 +286,6 @@ int Digitizer::CloseDigitizer(){
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Digitizer::SetRegChannelMask(uint32_t mask){
|
void Digitizer::SetRegChannelMask(uint32_t mask){
|
||||||
DebugPrint("%s", "Digitizer");
|
DebugPrint("%s", "Digitizer");
|
||||||
if( softwareDisable ) return;
|
if( softwareDisable ) return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user