Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CEPCSW
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
maxt@ihep.ac.cn
CEPCSW
Commits
c9647705
Commit
c9647705
authored
2 years ago
by
lintao@ihep.ac.cn
Browse files
Options
Downloads
Patches
Plain Diff
WIP: clean GenAlgo.
parent
f5124078
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Generator/src/GenAlgo.cpp
+4
-35
4 additions, 35 deletions
Generator/src/GenAlgo.cpp
Generator/src/GenAlgo.h
+0
-6
0 additions, 6 deletions
Generator/src/GenAlgo.h
with
4 additions
and
41 deletions
Generator/src/GenAlgo.cpp
+
4
−
35
View file @
c9647705
...
@@ -13,14 +13,7 @@
...
@@ -13,14 +13,7 @@
#include
"IGenTool.h"
#include
"IGenTool.h"
#include
"GenEvent.h"
#include
"GenEvent.h"
// #include "StdHepRdr.h"
// #include "HepevtRdr.h"// not correct still
// #include "SLCIORdr.h"
// #include "HepMCRdr.h"
// #include "GenPrinter.h"
// #include "GenWriter.h"
using
namespace
std
;
DECLARE_COMPONENT
(
GenAlgo
)
DECLARE_COMPONENT
(
GenAlgo
)
...
@@ -42,25 +35,6 @@ GenAlgo::initialize() {
...
@@ -42,25 +35,6 @@ GenAlgo::initialize() {
m_genTools
.
push_back
(
gtname
);
m_genTools
.
push_back
(
gtname
);
}
}
// cout << "initialize start" << endl;
// string generatorName = m_input_file.value();
// string outputName = m_output_file.value();
// string format = m_input_format.value();
// IGenTool* gen_reader;
// if(format=="stdhep") gen_reader = new StdHepRdr(generatorName);
// else if(format=="slcio") gen_reader = new SLCIORdr(generatorName);
// else if(format=="hepmc") gen_reader = new HepMCRdr(generatorName);
// else{cout << "Error : unsupport format for generator input file" << endl; return StatusCode::FAILURE; }
// //IGenTool* gen_reader = new HepevtRdr(generatorName);
// m_genTools.push_back(gen_reader);
// if(m_print.value()) {
// IGenTool* gen_printer = new GenPrinter(generatorName);
// m_genTools.push_back(gen_printer);
// }
//IGenTool* gen_writer = new GenWriter (outputName);
//m_genTools.push_back(gen_writer);
// cout << "initialize done" << endl;
return
StatusCode
::
SUCCESS
;
return
StatusCode
::
SUCCESS
;
}
}
...
@@ -74,16 +48,16 @@ GenAlgo::execute() {
...
@@ -74,16 +48,16 @@ GenAlgo::execute() {
for
(
auto
gentool
:
m_genTools
)
{
for
(
auto
gentool
:
m_genTools
)
{
if
(
gentool
->
mutate
(
m_event
))
{}
if
(
gentool
->
mutate
(
m_event
))
{}
else
{
else
{
cout
<<
"Have read all events, stop now."
<<
end
l
;
warning
()
<<
"Have read all events, stop now."
<<
end
msg
;
auto
ep
=
serviceLocator
()
->
as
<
IEventProcessor
>
();
auto
ep
=
serviceLocator
()
->
as
<
IEventProcessor
>
();
if
(
!
ep
)
{
if
(
!
ep
)
{
error
()
<<
"Cannot get IEventProcessor"
<<
endmsg
;
error
()
<<
"Cannot get IEventProcessor"
<<
endmsg
;
return
StatusCode
::
FAILURE
;
return
StatusCode
::
FAILURE
;
}
}
ep
->
stopRun
();
ep
->
stopRun
();
return
StatusCode
::
SUCCESS
;
return
StatusCode
::
SUCCESS
;
}
}
}
}
return
StatusCode
::
SUCCESS
;
return
StatusCode
::
SUCCESS
;
...
@@ -92,10 +66,5 @@ GenAlgo::execute() {
...
@@ -92,10 +66,5 @@ GenAlgo::execute() {
StatusCode
StatusCode
GenAlgo
::
finalize
()
{
GenAlgo
::
finalize
()
{
// cout << "finalize" << endl;
// for(auto gentool: m_genTools) {
// if (gentool->finish()) {}
// else {cout << "finish Failed" << endl; return StatusCode::FAILURE; }
// }
return
StatusCode
::
SUCCESS
;
return
StatusCode
::
SUCCESS
;
}
}
This diff is collapsed.
Click to expand it.
Generator/src/GenAlgo.h
+
0
−
6
View file @
c9647705
...
@@ -12,12 +12,6 @@
...
@@ -12,12 +12,6 @@
#include
"GenEvent.h"
#include
"GenEvent.h"
class
IGenTool
;
class
IGenTool
;
namespace
plcio
{
class
MCParticleCollection
;
}
using
namespace
std
;
class
GenAlgo
:
public
GaudiAlgorithm
{
class
GenAlgo
:
public
GaudiAlgorithm
{
...
...
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