Skip to content

Commit

Permalink
Remove candidate tag column from EventND output type (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienDoerner authored Oct 1, 2023
1 parent f009258 commit d091d2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/module/Output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@ void Output::setOutputType(OutputType outputtype) {
set(CurrentEnergyColumn, true);
set1D(true);
} else if (outputtype == Event1D) {
// D, ID, E, ID0, E0, tag
// D, ID, E, ID0, E0
set(TrajectoryLengthColumn, true);
set(CurrentIdColumn, true);
set(CurrentEnergyColumn, true);
set(SourceIdColumn, true);
set(SourceEnergyColumn, true);
set(CandidateTagColumn, true);
set1D(true);
} else if (outputtype == Trajectory3D) {
// D, ID, E, X, Y, Z, Px, Py, Pz
Expand All @@ -60,7 +59,7 @@ void Output::setOutputType(OutputType outputtype) {
set(CurrentDirectionColumn, true);
set1D(false);
} else if (outputtype == Event3D) {
// D, ID, E, X, Y, Z, Px, Py, Pz, ID0, E0, X0, Y0, Z0, P0x, P0y, P0z, tag
// D, ID, E, X, Y, Z, Px, Py, Pz, ID0, E0, X0, Y0, Z0, P0x, P0y, P0z
set(TrajectoryLengthColumn, true);
set(CurrentIdColumn, true);
set(CurrentEnergyColumn, true);
Expand All @@ -70,7 +69,6 @@ void Output::setOutputType(OutputType outputtype) {
set(SourceEnergyColumn, true);
set(SourcePositionColumn, true);
set(SourceDirectionColumn, true);
set(CandidateTagColumn, true);
set1D(false);
} else if (outputtype == Everything) {
enableAll();
Expand Down
5 changes: 3 additions & 2 deletions test/testOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ TEST(TextOutput, printHeader_Event1D) {
output.process(&c);
std::string captured = testing::internal::GetCapturedStdout();

EXPECT_EQ(captured.substr(0, captured.find("\n")), "#\tD\tID\tE\tID0\tE0\ttag");
EXPECT_EQ(captured.substr(0, captured.find("\n")), "#\tD\tID\tE\tID0\tE0");
}

TEST(TextOutput, printHeader_Trajectory3D) {
Expand All @@ -89,7 +89,7 @@ TEST(TextOutput, printHeader_Event3D) {

EXPECT_EQ(
captured.substr(0, captured.find("\n")),
"#\tD\tID\tE\tX\tY\tZ\tPx\tPy\tPz\tID0\tE0\tX0\tY0\tZ0\tP0x\tP0y\tP0z\ttag");
"#\tD\tID\tE\tX\tY\tZ\tPx\tPy\tPz\tID0\tE0\tX0\tY0\tZ0\tP0x\tP0y\tP0z");
}

TEST(TextOutput, printHeader_Custom) {
Expand All @@ -99,6 +99,7 @@ TEST(TextOutput, printHeader_Custom) {
output.enable(Output::SerialNumberColumn);
output.disable(Output::TrajectoryLengthColumn);
output.set(Output::RedshiftColumn, false);
output.enable(Output::CandidateTagColumn);

::testing::internal::CaptureStdout();
output.process(&c);
Expand Down

0 comments on commit d091d2c

Please sign in to comment.