Skip to content
Snippets Groups Projects
Unverified Commit d5407e5d authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn Committed by GitHub
Browse files

Merge pull request #154 from mirguest/master

Fix #153: avoid to use the assign operator of MCParticleCollection.
parents 85bdbe5d d0b5b6d5
No related branches found
No related tags found
No related merge requests found
#include "GenEvent.h"
#include "edm4hep/MCParticleCollection.h"//plico
using namespace std;
// using namespace std;
namespace MyHepMC{
......@@ -17,7 +17,7 @@ GenEvent::GenEvent(edm4hep::MCParticleCollection& mcCol)
}
GenEvent::~GenEvent(){}
void GenEvent::SetEventHeader(long event_id_, long run_id_, float time_, string det_name_){
void GenEvent::SetEventHeader(long event_id_, long run_id_, float time_, const std::string& det_name_){
m_event_id = event_id_;
m_run_id = run_id_;
m_time = time_;
......@@ -28,8 +28,9 @@ void GenEvent::SetMCCollection(edm4hep::MCParticleCollection vec_){
m_mc_vec = vec_;
}
*/
edm4hep::MCParticleCollection GenEvent::getMCVec(){
return m_mc_vec;
edm4hep::MCParticleCollection& GenEvent::getMCVec(){
return m_mc_vec;
}
long GenEvent::getID(){
......
......@@ -10,17 +10,18 @@ class GenEvent{
//GenEvent();
GenEvent(edm4hep::MCParticleCollection& mcCol);
~GenEvent();
void SetEventHeader(long event_id_, long run_id_, float time_, std::string det_name_);
void SetEventHeader(long event_id_, long run_id_, float time_, const std::string& det_name_);
//void SetMCCollection(edm4hep::MCParticleCollection vec_);
long getID();
long getRun();
long getTime();
void ReSet();
std::string getName();
edm4hep::MCParticleCollection getMCVec();
edm4hep::MCParticleCollection& getMCVec();
edm4hep::MCParticleCollection& m_mc_vec;
//edm4hep::MCParticleCollection m_mc_vec;
private:
long m_event_id;
long m_run_id;
float m_time;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment