Skip to content

Commit

Permalink
Drop old TOF compressor
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf committed Oct 30, 2023
1 parent a314235 commit 654fa61
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 288 deletions.
1 change: 0 additions & 1 deletion Detectors/TOF/compression/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
o2_add_library(TOFCompression
SOURCES src/Compressor.cxx
src/CompressorTask.cxx
src/CompressorTaskOld.cxx
PUBLIC_LINK_LIBRARIES O2::TOFBase O2::Framework O2::Headers O2::DataFormatsTOF
O2::DetectorsRaw
)
Expand Down

This file was deleted.

216 changes: 0 additions & 216 deletions Detectors/TOF/compression/src/CompressorTaskOld.cxx

This file was deleted.

28 changes: 7 additions & 21 deletions Detectors/TOF/compression/src/tof-compressor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
/// @brief Basic DPL workflow for TOF raw data compression

#include "TOFCompression/CompressorTask.h"
#include "TOFCompression/CompressorTaskOld.h"
#include "Framework/WorkflowSpec.h"
#include "Framework/ConfigParamSpec.h"
#include "Framework/ConcreteDataMatcher.h"
Expand Down Expand Up @@ -62,6 +61,9 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
auto paranoid = cfgc.options().get<bool>("tof-compressor-paranoid");
auto ignoreStf = cfgc.options().get<bool>("ignore-dist-stf");
auto old = cfgc.options().get<bool>("old");
if (old) {
LOGP(error, "--old option is not actually supported, using the new version");
}
auto payloadLim = cfgc.options().get<long>("payload-limit");

std::vector<OutputSpec> outputs;
Expand All @@ -70,32 +72,16 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
AlgorithmSpec algoSpec;
if (rdhVersion == o2::raw::RDHUtils::getVersion<o2::header::RAWDataHeader>()) {
if (!verbose && !paranoid) {
if (old) {
algoSpec = AlgorithmSpec{adaptFromTask<o2::tof::CompressorTaskOld<o2::header::RAWDataHeader, false, false>>(payloadLim)};
} else {
algoSpec = AlgorithmSpec{adaptFromTask<o2::tof::CompressorTask<o2::header::RAWDataHeader, false, false>>(payloadLim)};
}
algoSpec = AlgorithmSpec{adaptFromTask<o2::tof::CompressorTask<o2::header::RAWDataHeader, false, false>>(payloadLim)};
}
if (!verbose && paranoid) {
if (old) {
algoSpec = AlgorithmSpec{adaptFromTask<o2::tof::CompressorTaskOld<o2::header::RAWDataHeader, false, true>>(payloadLim)};
} else {
algoSpec = AlgorithmSpec{adaptFromTask<o2::tof::CompressorTask<o2::header::RAWDataHeader, false, true>>(payloadLim)};
}
algoSpec = AlgorithmSpec{adaptFromTask<o2::tof::CompressorTask<o2::header::RAWDataHeader, false, true>>(payloadLim)};
}
if (verbose && !paranoid) {
if (old) {
algoSpec = AlgorithmSpec{adaptFromTask<o2::tof::CompressorTaskOld<o2::header::RAWDataHeader, true, false>>(payloadLim)};
} else {
algoSpec = AlgorithmSpec{adaptFromTask<o2::tof::CompressorTask<o2::header::RAWDataHeader, true, false>>(payloadLim)};
}
algoSpec = AlgorithmSpec{adaptFromTask<o2::tof::CompressorTask<o2::header::RAWDataHeader, true, false>>(payloadLim)};
}
if (verbose && paranoid) {
if (old) {
algoSpec = AlgorithmSpec{adaptFromTask<o2::tof::CompressorTaskOld<o2::header::RAWDataHeader, true, true>>(payloadLim)};
} else {
algoSpec = AlgorithmSpec{adaptFromTask<o2::tof::CompressorTask<o2::header::RAWDataHeader, true, true>>(payloadLim)};
}
algoSpec = AlgorithmSpec{adaptFromTask<o2::tof::CompressorTask<o2::header::RAWDataHeader, true, true>>(payloadLim)};
}
}

Expand Down

0 comments on commit 654fa61

Please sign in to comment.