Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CEPCSW_OTE_development
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yudian2002@sjtu.edu.cn
CEPCSW_OTE_development
Commits
d0b5b6d5
Commit
d0b5b6d5
authored
4 years ago
by
lintao@ihep.ac.cn
Browse files
Options
Downloads
Patches
Plain Diff
Fix #153: avoid to use the assign operator of MCParticleCollection.
parent
85bdbe5d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Generator/src/GenEvent.cpp
+5
-4
5 additions, 4 deletions
Generator/src/GenEvent.cpp
Generator/src/GenEvent.h
+3
-2
3 additions, 2 deletions
Generator/src/GenEvent.h
with
8 additions
and
6 deletions
Generator/src/GenEvent.cpp
+
5
−
4
View file @
d0b5b6d5
#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
(){
...
...
This diff is collapsed.
Click to expand it.
Generator/src/GenEvent.h
+
3
−
2
View file @
d0b5b6d5
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment