Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fastNLO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
qcd-public
fastNLO
Commits
5ab27f25
Commit
5ab27f25
authored
4 months ago
by
Daniel Britzger
Browse files
Options
Downloads
Patches
Plain Diff
fix NULL when accessing instances of read_steer
parent
30c50aba
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
v2.6/toolkit/fastnlotoolkit/include/fastnlotk/read_steer.h
+4
-0
4 additions, 0 deletions
v2.6/toolkit/fastnlotoolkit/include/fastnlotk/read_steer.h
with
4 additions
and
0 deletions
v2.6/toolkit/fastnlotoolkit/include/fastnlotk/read_steer.h
+
4
−
0
View file @
5ab27f25
...
@@ -597,15 +597,19 @@ public:
...
@@ -597,15 +597,19 @@ public:
return
read_steer
::
Steering
(
steerID
)
->
getstcol
(
label
,
column
);
}
return
read_steer
::
Steering
(
steerID
)
->
getstcol
(
label
,
column
);
}
// check existence of value
// check existence of value
static
bool
getexist
(
const
std
::
string
&
label
,
std
::
string
steerID
=
read_steer
::
stdID
){
static
bool
getexist
(
const
std
::
string
&
label
,
std
::
string
steerID
=
read_steer
::
stdID
){
if
(
read_steer
::
instances
==
NULL
)
read_steer
::
instances
=
new
std
::
map
<
string
,
read_steer
*>
();
if
(
read_steer
::
instances
->
count
(
steerID
)
==
0
)
return
false
;
if
(
read_steer
::
instances
->
count
(
steerID
)
==
0
)
return
false
;
return
read_steer
::
Steering
(
steerID
)
->
exist
(
label
);}
return
read_steer
::
Steering
(
steerID
)
->
exist
(
label
);}
static
bool
getarrayexist
(
const
std
::
string
&
label
,
std
::
string
steerID
=
read_steer
::
stdID
){
static
bool
getarrayexist
(
const
std
::
string
&
label
,
std
::
string
steerID
=
read_steer
::
stdID
){
if
(
read_steer
::
instances
==
NULL
)
read_steer
::
instances
=
new
std
::
map
<
string
,
read_steer
*>
();
if
(
read_steer
::
instances
->
count
(
steerID
)
==
0
)
return
false
;
if
(
read_steer
::
instances
->
count
(
steerID
)
==
0
)
return
false
;
return
read_steer
::
Steering
(
steerID
)
->
arrayexist
(
label
);}
return
read_steer
::
Steering
(
steerID
)
->
arrayexist
(
label
);}
static
bool
getarraycontainkey
(
const
std
::
string
&
key
,
const
std
::
string
&
label
,
std
::
string
steerID
=
read_steer
::
stdID
){
static
bool
getarraycontainkey
(
const
std
::
string
&
key
,
const
std
::
string
&
label
,
std
::
string
steerID
=
read_steer
::
stdID
){
if
(
read_steer
::
instances
==
NULL
)
read_steer
::
instances
=
new
std
::
map
<
string
,
read_steer
*>
();
if
(
read_steer
::
instances
->
count
(
steerID
)
==
0
)
return
false
;
if
(
read_steer
::
instances
->
count
(
steerID
)
==
0
)
return
false
;
return
read_steer
::
Steering
(
steerID
)
->
arraycontainkey
(
key
,
label
);}
return
read_steer
::
Steering
(
steerID
)
->
arraycontainkey
(
key
,
label
);}
static
void
arraypushback_steer
(
const
std
::
string
&
value
,
const
std
::
string
&
label
,
std
::
string
steerID
=
read_steer
::
stdID
){
static
void
arraypushback_steer
(
const
std
::
string
&
value
,
const
std
::
string
&
label
,
std
::
string
steerID
=
read_steer
::
stdID
){
if
(
read_steer
::
instances
==
NULL
)
read_steer
::
instances
=
new
std
::
map
<
string
,
read_steer
*>
();
if
(
read_steer
::
instances
->
count
(
steerID
)
==
0
)
return
;
if
(
read_steer
::
instances
->
count
(
steerID
)
==
0
)
return
;
read_steer
::
Steering
(
steerID
)
->
arraypushback
(
value
,
label
);}
read_steer
::
Steering
(
steerID
)
->
arraypushback
(
value
,
label
);}
// add values
// add values
...
...
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