Skip to content

Commit

Permalink
readout metadata nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis committed May 6, 2024
1 parent c24ca49 commit f6ea433
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/TRestRawSignalRemoveChannelsProcess.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,8 @@ TRestEvent* TRestRawSignalRemoveChannelsProcess::ProcessEvent(TRestEvent* inputE
}

// Check if the channel type matches any specified for removal
if (!removeSignal) {
string channelType =
fInputSignalEvent->GetReadoutMetadata()->GetTypeForChannelDaqId(signal->GetSignalID());
if (!removeSignal && !fChannelTypes.empty()) {
string channelType = fReadoutMetadata->GetTypeForChannelDaqId(signal->GetSignalID());
if (find(fChannelTypes.begin(), fChannelTypes.end(), channelType) != fChannelTypes.end()) {
removeSignal = true;
}
Expand Down Expand Up @@ -217,6 +216,9 @@ void TRestRawSignalRemoveChannelsProcess::InitFromConfigFile() {
pos = 0;
while (!(removeChannelDefinition = GetKEYDefinition("removeChannels", pos)).empty()) {
TVector2 v = StringTo2DVector(GetFieldValue("range", removeChannelDefinition));
if (v.X() == -1 && v.Y() == -1) {
continue;
}
if (v.X() >= 0 && v.Y() >= 0 && v.Y() > v.X()) {
for (int n = (Int_t)v.X(); n <= (Int_t)v.Y(); n++) {
fChannelIds.push_back(n);
Expand Down

0 comments on commit f6ea433

Please sign in to comment.