Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CAFCore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
atlas-caf
CAFCore
Commits
e3c30751
There was a problem fetching the pipeline mini graph.
Commit
e3c30751
authored
6 years ago
by
Carsten Burgard
Browse files
Options
Downloads
Patches
Plain Diff
added some error catching
parent
b33b6311
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!283
Master
,
!212
Resolve "ActionPrintSystematicsImpact not very user-friendly"
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SFramework/Root/ActionPrintSystematicsImpact.cxx
+14
-17
14 additions, 17 deletions
SFramework/Root/ActionPrintSystematicsImpact.cxx
SFramework/Root/ActionTransferSystematics.cxx
+2
-3
2 additions, 3 deletions
SFramework/Root/ActionTransferSystematics.cxx
with
16 additions
and
20 deletions
SFramework/Root/ActionPrintSystematicsImpact.cxx
+
14
−
17
View file @
e3c30751
...
...
@@ -43,19 +43,21 @@ namespace TSBaseActions {
TQFolder
*
model
=
models
()
->
getFolder
(
config
->
GetName
());
if
(
!
model
){
manager
->
error
(
TString
::
Format
(
"no such model available: '%s'"
,
config
->
GetName
()));
models
()
->
print
();
return
false
;
}
manager
->
info
(
TString
::
Format
(
"printing for model '%s'"
,
model
->
GetName
()));
TQFolder
textReplacements
(
"replacements"
);
for
(
const
auto
&
s
:
config
->
getTagVString
(
"textReplacements"
)){
for
(
const
auto
&
s
:
config
->
getTagVString
(
"textReplacements"
)){
textReplacements
.
importFromTextFile
(
s
);
}
bool
showYields
=
config
->
getTagBoolDefault
(
"showYields"
,
false
);
bool
showDiff
=
config
->
getTagBoolDefault
(
"showDifference"
,
true
);
bool
useTitles
=
config
->
getTagBoolDefault
(
"useTitles"
,
false
);
bool
useTitles
=
config
->
getTagBoolDefault
(
"useTitles"
,
false
);
std
::
map
<
std
::
pair
<
const
std
::
string
,
const
std
::
string
>
,
std
::
map
<
const
std
::
string
,
TQFolder
*
>
>
systematics
;
std
::
map
<
const
std
::
string
,
std
::
string
>
sampleTitles
;
std
::
map
<
const
std
::
string
,
std
::
string
>
sampleTitles
;
std
::
vector
<
std
::
string
>
channelList
;
std
::
vector
<
std
::
string
>
sampleList
;
std
::
vector
<
std
::
string
>
systematicList
;
...
...
@@ -87,10 +89,10 @@ namespace TSBaseActions {
if
(
!
sample
)
continue
;
TString
samplename
(
sample
->
GetName
());
if
(
!
TQStringUtils
::
removeLeadingText
(
samplename
,
"Sample."
))
continue
;
if
(
matchAny
(
samplename
,
sampleBlacklist
)
||
!
matchAny
(
samplename
,
sampleFilter
))
continue
;
std
::
string
samplenamestr
(
samplename
.
Data
());
std
::
string
sampletitle
=
sample
->
getTagStandardStringDefault
(
"style.title"
,
""
);
sampleTitles
[
samplenamestr
]
=
sampletitle
;
if
(
matchAny
(
samplename
,
sampleBlacklist
)
||
!
matchAny
(
samplename
,
sampleFilter
))
continue
;
std
::
string
samplenamestr
(
samplename
.
Data
());
std
::
string
sampletitle
=
sample
->
getTagStandardStringDefault
(
"style.title"
,
""
);
sampleTitles
[
samplenamestr
]
=
sampletitle
;
if
(
!
in
(
sampleList
,
samplename
.
Data
()))
{
sampleList
.
push_back
(
samplename
.
Data
());
sampleNorm
.
push_back
(
sample
->
getTagDoubleDefault
(
".integral.nominal"
,
0.
));
...
...
@@ -166,16 +168,11 @@ namespace TSBaseActions {
jOffset
++
;
continue
;
//this entry doesn't exist (we skipped it before)
}
if
(
useTitles
){
table
->
setEntry
(
0
,
j
+
1
-
jOffset
,
sampleTitles
[
sampleList
[
j
]]);
}
else
{
table
->
setEntry
(
0
,
j
+
1
-
jOffset
,
textReplace
(
TString
(
sampleList
[
j
].
data
()),
textReplacements
));
}
TString
collabel
=
useTitles
?
sampleTitles
[
sampleList
[
j
]]
:
textReplace
(
TString
(
sampleList
[
j
].
data
()),
textReplacements
);
table
->
setEntry
(
0
,
j
+
1
-
jOffset
,
collabel
);
for
(
size_t
k
=
0
;
k
<
nSysts
;
++
k
){
//if (j==0) { //on first iteration over all syst, create row label
table
->
setEntry
(
k
+
1
,
0
,
textReplace
(
TString
(
systematicList
[
k
].
data
()),
textReplacements
));
//}
TString
rowlabel
=
textReplace
(
TString
(
systematicList
[
k
].
data
()),
textReplacements
);
table
->
setEntry
(
k
+
1
,
0
,
rowlabel
);
TQFolder
*
syst
=
systematics
[
coordinate
][
systematicList
[
k
]];
if
(
!
syst
){
if
(
verbose
)
...
...
This diff is collapsed.
Click to expand it.
SFramework/Root/ActionTransferSystematics.cxx
+
2
−
3
View file @
e3c30751
...
...
@@ -26,6 +26,7 @@ namespace TSBaseActions {
TQFolder
*
model
=
models
()
->
getFolder
(
config
->
GetName
());
if
(
!
model
){
manager
->
error
(
TString
::
Format
(
"no such model available: '%s'"
,
config
->
GetName
()));
return
false
;
}
TQFolderIterator
transfers
=
config
->
getListOfFolders
(
"?"
);
...
...
@@ -205,9 +206,7 @@ namespace TSBaseActions {
}
}
return
(
i
>
0
);
}
}
//no valid mode was selected
manager
->
error
(
"Failed to perform, no valid mode was selected!"
);
return
false
;
...
...
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