IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue 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
Air Shower Physics
corsika
Commits
f478571e
Commit
f478571e
authored
6 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
removed debug output
parent
ccea80ae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/Particles/pdxml_reader.py
+0
-6
0 additions, 6 deletions
Framework/Particles/pdxml_reader.py
with
0 additions
and
6 deletions
Framework/Particles/pdxml_reader.py
+
0
−
6
View file @
f478571e
...
@@ -100,7 +100,6 @@ def c_identifier(name):
...
@@ -100,7 +100,6 @@ def c_identifier(name):
def
c_identifier_cammel
(
name
):
def
c_identifier_cammel
(
name
):
orig
=
name
orig
=
name
name
=
name
[
0
].
upper
()
+
name
[
1
:].
lower
()
# all lower case
name
=
name
[
0
].
upper
()
+
name
[
1
:].
lower
()
# all lower case
# name = "".join(c.upper() if i in indices else c for i, c in enumerate(s)) # first letter upper case
for
c
in
"
() /
"
:
# replace funny characters
for
c
in
"
() /
"
:
# replace funny characters
name
=
name
.
replace
(
c
,
"
_
"
)
name
=
name
.
replace
(
c
,
"
_
"
)
...
@@ -114,8 +113,6 @@ def c_identifier_cammel(name):
...
@@ -114,8 +113,6 @@ def c_identifier_cammel(name):
ibar
=
name
.
find
(
'
Bar
'
)
ibar
=
name
.
find
(
'
Bar
'
)
if
(
ibar
>
0
and
ibar
<
len
(
name
)
-
3
)
:
if
(
ibar
>
0
and
ibar
<
len
(
name
)
-
3
)
:
name
=
name
[:
ibar
]
+
name
[
ibar
+
3
:]
+
str
(
'
Bar
'
)
name
=
name
[:
ibar
]
+
name
[
ibar
+
3
:]
+
str
(
'
Bar
'
)
print
(
str
(
ibar
)
+
"
"
+
name
+
"
"
+
str
(
len
(
name
)))
# cleanup "_"s
# cleanup "_"s
while
True
:
while
True
:
...
@@ -144,9 +141,6 @@ def c_identifier_cammel(name):
...
@@ -144,9 +141,6 @@ def c_identifier_cammel(name):
else
:
else
:
name
=
name
[:
i
]
+
name
[
i
].
upper
()
name
=
name
[:
i
]
+
name
[
i
].
upper
()
print
(
"
generate C identifier for
'
{:s}
'
name=
'
{:s}
'"
.
format
(
orig
,
name
))
# check if name is valid C++ identifier
# check if name is valid C++ identifier
pattern
=
re
.
compile
(
r
'
^[a-zA-Z_][a-zA-Z_0-9]*$
'
)
pattern
=
re
.
compile
(
r
'
^[a-zA-Z_][a-zA-Z_0-9]*$
'
)
if
pattern
.
match
(
name
):
if
pattern
.
match
(
name
):
...
...
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