Skip to content

Commit

Permalink
Merge pull request #185 from pinkenburg/tpcspeedup
Browse files Browse the repository at this point in the history
replace push_back by resize(), fill()
  • Loading branch information
pinkenburg authored Aug 29, 2024
2 parents c63f4d0 + 6462368 commit 57e40ad
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions newbasic/oncsSub_idtpcfeev4.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,8 @@ int oncsSub_idtpcfeev4::tpc_decode ()

// for (int i = 0 ; i < data_size ; i++)
// First fill 65000 for all time samples
for (int i = 0 ; i < 1024 ; i++)
{
sw->waveform.push_back(65000);
}

sw->waveform.resize(1024);
fill(sw->waveform.begin(), sw->waveform.end(), 65000);
// Format is (N sample) (start time), (1st sample)... (Nth sample)
//for (int i = 0 ; i < header[0]-5 ; i++)
while(data_size_counter>0)
Expand Down

0 comments on commit 57e40ad

Please sign in to comment.