Skip to content

Commit

Permalink
Use const pointer.
Browse files Browse the repository at this point in the history
  • Loading branch information
hqucms committed Oct 14, 2024
1 parent 3311e12 commit 59538a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions SimDataFormats/GeneratorProducts/interface/HepMC3Product.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ namespace edm {
public:
HepMC3Product() : isVtxGenApplied_(false), isVtxBoostApplied_(false), isPBoostApplied_(false) {}

explicit HepMC3Product(HepMC3::GenEvent *evt);
explicit HepMC3Product(const HepMC3::GenEvent *evt);
~HepMC3Product();

void addHepMCData(HepMC3::GenEvent *evt);
void addHepMCData(const HepMC3::GenEvent *evt);

void applyVtxGen(HepMC3::FourVector const *vtxShift) { applyVtxGen(*vtxShift); }
void applyVtxGen(HepMC3::FourVector const &vtxShift);
Expand Down
4 changes: 2 additions & 2 deletions SimDataFormats/GeneratorProducts/src/HepMC3Product.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
using namespace edm;
using namespace std;

HepMC3Product::HepMC3Product(HepMC3::GenEvent* evt)
HepMC3Product::HepMC3Product(const HepMC3::GenEvent* evt)
: isVtxGenApplied_(false), isVtxBoostApplied_(false), isPBoostApplied_(false) {
addHepMCData(evt);
}

HepMC3Product::~HepMC3Product() = default;

void HepMC3Product::addHepMCData(HepMC3::GenEvent* evt) { evt->write_data(evt_); }
void HepMC3Product::addHepMCData(const HepMC3::GenEvent* evt) { evt->write_data(evt_); }

void HepMC3Product::applyVtxGen(HepMC3::FourVector const& vtxShift) {
//std::cout<< " applyVtxGen called " << isVtxGenApplied_ << endl;
Expand Down

0 comments on commit 59538a3

Please sign in to comment.