Skip to content

Commit 8383e90

Browse files
authored
Update SBNDPTBDecoder_module.cc
Reverting changes and correcting metadata check so the old files (version 1) should be able to be run on with decoder
1 parent b65c1a0 commit 8383e90

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

sbndcode/Decoders/PTB/SBNDPTBDecoder_module.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,13 @@ void SBNDPTBDecoder::_process_PTB_AUX(const artdaq::Fragment& frag, ptbsv_t &sou
198198
if (ctbfrag.Trigger(iword)->IsHLT())
199199
{
200200

201-
if (*(frag.metadata<int>()) == 2){ //If data is taken with 192b PTB words
201+
if ( frag.hasMetadata() == true ){ //If data is past version 2. Make sure to use the right sbndaq-artdaq-core versioning
202202
tstruct.prev_timestamp = ctbfrag.PTBWord(iword)->prevTS;
203203
tstruct.gate_counter = ctbfrag.Trigger(iword)->gate_counter;
204204
}
205-
else if (*(frag.metadata<int>()) != 2){ //If data is taken with 128b PTB words
206-
tstruct.prev_timestamp = -1;
207-
tstruct.gate_counter = -1;
205+
else if ( frag.hasMetadata() == false ){ //If data is taken with 128b PTB words
206+
tstruct.prev_timestamp = 0;
207+
tstruct.gate_counter = 0;
208208
}
209209

210210

0 commit comments

Comments
 (0)