Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CLHEP
CLHEP
Commits
0bffcd91
Commit
0bffcd91
authored
May 18, 2004
by
Lynn Garren
Browse files
fixing listPythiaNames test
parent
6b1dc2cf
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
HepPDT/src/getPythiaid.cc
View file @
0bffcd91
// $Id: getPythiaid.cc,v 1.1.4.
1
2004/0
4/21 23:06:33
garren Exp $
// $Id: getPythiaid.cc,v 1.1.4.
2
2004/0
5/18 23:38:07
garren Exp $
// ----------------------------------------------------------------------
//
// getPythiaid.cc
...
...
@@ -22,9 +22,16 @@ namespace HepPDT {
bool
getPythiaid
(
int
&
id
,
const
std
::
string
&
pdline
)
{
int
sl
=
pdline
.
length
();
std
::
string
firstc
=
pdline
.
substr
(
0
,
1
);
id
=
0
;
if
(
sl
>
30
&&
firstc
==
" "
){
// line is too short
if
(
sl
<
30
)
return
false
;
// now check for various comments to avoid problems with Solaris
std
::
string
stars
=
pdline
.
substr
(
1
,
2
);
std
::
string
kfline
=
pdline
.
substr
(
0
,
10
);
if
(
stars
==
"**"
||
kfline
==
" KF"
)
return
false
;
// try to read the kf number
std
::
string
firstc
=
pdline
.
substr
(
0
,
1
);
if
(
firstc
==
" "
){
std
::
istringstream
var1
(
pdline
.
substr
(
0
,
10
).
c_str
()
);
var1
>>
id
;
// if var1 is blank, id is not changed
return
true
;
...
...
HepPDT/src/listPythiaTranslation.cc
View file @
0bffcd91
// $Id: listPythiaTranslation.cc,v 1.1.4.
1
2004/0
4/21 23:06:33
garren Exp $
// $Id: listPythiaTranslation.cc,v 1.1.4.
2
2004/0
5/18 23:38:07
garren Exp $
// ----------------------------------------------------------------------
//
// listPythiaTranslation.cc
...
...
@@ -68,8 +68,9 @@ ParticleTranslation getPythiaAntiParticle( int & anti,
std
::
string
&
aname
,
ParticleTranslation
&
pt
)
{
std
::
string
mc
=
std
::
string
(
"Pythia"
);
ParticleID
pid
(
translatePythiatoPDT
(
anti
)
);
return
ParticleTranslation
(
pid
,
anti
,
aname
,
mc
);
int
ap
=
-
pt
.
oid
();
ParticleID
pid
(
translatePythiatoPDT
(
ap
)
);
return
ParticleTranslation
(
pid
,
ap
,
aname
,
mc
);
}
bool
listPythiaTranslation
(
std
::
istream
&
pdfile
,
std
::
ostream
&
os
)
...
...
HepPDT/test/listPythiaNames.output
View file @
0bffcd91
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment