Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing defaults in CalorimeterHit.h #1434

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Recon/include/Recon/Event/CalorimeterHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CalorimeterHit {
/**
* Class destructor.
*/
virtual ~CalorimeterHit() {}
virtual ~CalorimeterHit() = default;

/**
* Clear the data in the object.
Expand Down Expand Up @@ -167,21 +167,21 @@ class CalorimeterHit {
float time_{0};

/** X Position of the hit */
float xpos_;
float xpos_{-9999.};

/** Y Position of the hit */
float ypos_;
float ypos_{-9999.};

/** Z Position of the hit */
float zpos_;
float zpos_{-9999.};

/** Is this a noise hit? */
bool isNoise_;
bool isNoise_{false};

/**
* The ROOT class definition.
*/
ClassDef(CalorimeterHit, 1);
ClassDef(CalorimeterHit, 2);
};
} // namespace ldmx

Expand Down
36 changes: 18 additions & 18 deletions Recon/src/Recon/Event/CalorimeterHit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
// STL
#include <iostream>

ClassImp(ldmx::CalorimeterHit)
ClassImp(ldmx::CalorimeterHit);

namespace ldmx {
void CalorimeterHit::Clear() {
id_ = 0;
amplitude_ = 0;
energy_ = 0;
time_ = 0;
xpos_ = 0;
ypos_ = 0;
zpos_ = 0;
isNoise_ = false;
}
namespace ldmx {
void CalorimeterHit::Clear() {
id_ = 0;
amplitude_ = 0;
energy_ = 0;
time_ = 0;
xpos_ = 0;
ypos_ = 0;
zpos_ = 0;
isNoise_ = false;
}

void CalorimeterHit::Print() const {
std::cout << "CalorimeterHit { "
<< "id: " << std::hex << id_ << std::dec
<< ", energy: " << energy_ << "MeV, time: " << time_
<< "ns, amplitude: " << amplitude_ << "}" << std::endl;
}
void CalorimeterHit::Print() const {
std::cout << "CalorimeterHit { "
<< "id: " << std::hex << id_ << std::dec << ", energy: " << energy_
<< "MeV, time: " << time_ << "ns, amplitude: " << amplitude_ << "}"
<< std::endl;
}
} // namespace ldmx
Loading