Skip to content

Commit

Permalink
Add missing defaults in CalorimeterHit.h
Browse files Browse the repository at this point in the history
  • Loading branch information
tvami committed Sep 4, 2024
1 parent 30e0b80 commit 39967f4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
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

0 comments on commit 39967f4

Please sign in to comment.