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
6df41298
Commit
6df41298
authored
3 years ago
by
Carsten Burgard
Browse files
Options
Downloads
Patches
Plain Diff
added histosys transfers
parent
09bb9890
No related branches found
Branches containing commit
No related tags found
1 merge request
!664
analysis developments
Pipeline
#2369707
failed
3 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SFramework/Root/ActionTransferSystematics.cxx
+48
-39
48 additions, 39 deletions
SFramework/Root/ActionTransferSystematics.cxx
with
48 additions
and
39 deletions
SFramework/Root/ActionTransferSystematics.cxx
+
48
−
39
View file @
6df41298
...
...
@@ -78,8 +78,8 @@ namespace TSBaseActions {
TString
cleanup
(
TString
input
)
const
{
TQStringUtils
::
removeLeadingText
(
input
,
"Sample."
);
TQStringUtils
::
removeLeadingText
(
input
,
"Channel."
);
TQStringUtils
::
removeLeadingText
(
input
,
"OverallSys."
);
TQStringUtils
::
removeLeadingText
(
input
,
"HistoSys."
);
//
TQStringUtils::removeLeadingText(input,"OverallSys.");
//
TQStringUtils::removeLeadingText(input,"HistoSys.");
return
input
;
}
...
...
@@ -151,7 +151,7 @@ namespace TSBaseActions {
TString
mode
=
config
->
getTagStringDefault
(
"mode"
,
"sample"
);
std
::
vector
<
TString
>
exceptRegions
=
config
->
getTagVString
(
"except.Channels"
);
std
::
vector
<
TString
>
exceptSamples
=
config
->
getTagVString
(
"except.Samples"
);
std
::
vector
<
TString
>
exceptSystematics
=
config
->
getTagVString
(
"except
.OverallSys
"
);
std
::
vector
<
TString
>
exceptSystematics
=
config
->
getTagVString
(
"except"
);
manager
->
info
(
TString
::
Format
(
"performing transfer '%s'"
,
config
->
GetName
()));
...
...
@@ -169,10 +169,17 @@ namespace TSBaseActions {
}
TString
mark
;
bool
marked
=
config
->
getTagString
(
"selectTag.OverallSys"
,
mark
);
bool
marked
=
config
->
getTagString
(
"selectTag"
,
mark
);
std
::
vector
<
TString
>
sysTypes
=
config
->
getTagVString
(
"types"
);
if
(
sysTypes
.
size
()
==
0
){
sysTypes
.
push_back
(
"OverallSys"
);
if
(
mode
.
Contains
(
"sample"
)){
sysTypes
.
push_back
(
"HistoSys"
);
}
}
if
(
mode
.
Contains
(
"sample"
,
TString
::
kIgnoreCase
))
{
TString
sourceSample
;
if
(
!
config
->
getTagString
(
"source"
,
sourceSample
)){
manager
->
error
(
TString
::
Format
(
"missing required 'source' information on transfer '%s'"
,
config
->
GetName
()));
...
...
@@ -204,14 +211,14 @@ namespace TSBaseActions {
if
(
TQStringUtils
::
matches
(
sample
->
GetName
(),
"Sample."
+
sourceSample
))
continue
;
if
(
verbose
)
manager
->
info
(
TString
::
Format
(
"
\t
for sample '%s'"
,
sample
->
GetName
()));
sample
->
deleteObject
(
".Dropped!"
);
for
(
const
auto
&
systType
:
{
TString
(
"OverallSys."
),
TString
(
"ShapeSys."
)})
{
for
(
const
auto
&
systType
:
sysTypes
)
{
std
::
vector
<
TQFolder
*>
remove
;
{
TQFolderIterator
oldsystematics
(
sample
->
getListOfFolders
(
systType
+
"*"
),
true
);
TQFolderIterator
oldsystematics
(
sample
->
getListOfFolders
(
systType
+
"
.
*"
),
true
);
while
(
oldsystematics
.
hasNext
()){
TQFolder
*
systematic
=
oldsystematics
.
readNext
();
if
(
!
systematic
)
continue
;
if
(
matchesAny
(
systematic
,
exceptSystematics
,
systType
)
||
!
matchesAny
(
systematic
,
targetSystematics
,
systType
))
continue
;
if
(
matchesAny
(
systematic
,
exceptSystematics
,
systType
+
"."
)
||
!
matchesAny
(
systematic
,
targetSystematics
,
systType
+
"."
))
continue
;
if
(
marked
&&
!
systematic
->
getTagBoolDefault
(
mark
,
false
))
continue
;
if
(
verbose
)
manager
->
info
(
TString
::
Format
(
"
\t\t
removing '%s'"
,
systematic
->
GetName
()));
remove
.
push_back
(
systematic
);
...
...
@@ -277,37 +284,39 @@ namespace TSBaseActions {
if
(
matchesAny
(
sample
,
exceptSamples
,
"Sample."
))
continue
;
if
(
verbose
)
manager
->
info
(
TString
::
Format
(
"
\t
for sample '%s'"
,
sample
->
GetName
()));
sample
->
deleteObject
(
".Dropped!"
);
std
::
vector
<
TQFolder
*>
remove
;
{
TQFolderIterator
oldsystematics
(
sample
->
getListOfFolders
(
"OverallSys.*"
),
true
);
while
(
oldsystematics
.
hasNext
()){
TQFolder
*
systematic
=
oldsystematics
.
readNext
();
if
(
!
systematic
)
continue
;
if
(
matchesAny
(
region
,
exceptSystematics
,
"OverallSys."
))
continue
;
if
(
marked
&&
!
systematic
->
getTagBoolDefault
(
mark
,
false
))
continue
;
if
(
!
matchesAny
(
systematic
,
targetSystematics
,
"OverallSys."
))
continue
;
if
(
verbose
)
manager
->
info
(
TString
::
Format
(
"
\t\t
removing '%s'"
,
systematic
->
GetName
()));
remove
.
push_back
(
systematic
);
for
(
const
auto
&
systType
:
sysTypes
){
std
::
vector
<
TQFolder
*>
remove
;
{
TQFolderIterator
oldsystematics
(
sample
->
getListOfFolders
(
systType
+
".*"
),
true
);
while
(
oldsystematics
.
hasNext
()){
TQFolder
*
systematic
=
oldsystematics
.
readNext
();
if
(
!
systematic
)
continue
;
if
(
matchesAny
(
region
,
exceptSystematics
,
systType
+
"."
))
continue
;
if
(
marked
&&
!
systematic
->
getTagBoolDefault
(
mark
,
false
))
continue
;
if
(
!
matchesAny
(
systematic
,
targetSystematics
,
systType
+
"."
))
continue
;
if
(
verbose
)
manager
->
info
(
TString
::
Format
(
"
\t\t
removing '%s'"
,
systematic
->
GetName
()));
remove
.
push_back
(
systematic
);
}
}
}
for
(
auto
systematic
:
remove
){
systematic
->
detachFromBase
()
;
delete
systematic
;
}
{
TQFolderIterator
newsystematics
(
source
->
getListOfFolders
(
TQFolder
::
concatPaths
(
sample
->
getName
(),
"OverallSys.*"
)),
true
);
while
(
newsystematics
.
has
Next
()
){
TQFolder
*
systematic
=
newsystematics
.
readNext
()
;
if
(
!
systematic
)
continue
;
if
(
ma
tchesAny
(
region
,
exceptSystematics
,
"OverallSys."
))
continue
;
if
(
ma
rked
&&
!
systematic
->
getTagBoolDefault
(
mark
,
false
))
continue
;
if
(
!
matchesAny
(
systematic
,
targetSystematics
,
"OverallSys."
))
continue
;
if
(
verbose
)
manager
->
info
(
TString
::
Format
(
"
\t\t
copying '%s'"
,
systematic
->
GetName
())
);
TQFolder
*
copy
=
systematic
->
copy
()
;
i
++
;
sample
->
addFolder
(
copy
);
copy
->
setTagString
(
"transferred"
,
source
->
GetName
());
addToLog
(
log
,
cleanup
(
systematic
->
GetName
()),
sourceChannel
,
cleanup
(
region
->
GetName
()));
for
(
auto
systematic
:
remove
){
systematic
->
detachFromBase
();
delete
systematic
;
}
{
TQFolderIterator
newsystematics
(
source
->
getListOfFolders
(
TQFolder
::
concatPaths
(
sample
->
getName
(),
systType
+
".*"
)),
true
);
while
(
newsystematics
.
hasNext
()){
TQFolder
*
systematic
=
newsystematics
.
read
Next
()
;
if
(
!
systematic
)
continue
;
if
(
matchesAny
(
region
,
exceptSystematics
,
systType
+
"."
)
)
continue
;
if
(
ma
rked
&&
!
systematic
->
getTagBoolDefault
(
mark
,
false
))
continue
;
if
(
!
ma
tchesAny
(
systematic
,
targetSystematics
,
systType
+
"."
))
continue
;
if
(
verbose
)
manager
->
info
(
TString
::
Format
(
"
\t\t
copying '%s'"
,
systematic
->
GetName
()))
;
TQFolder
*
copy
=
systematic
->
copy
(
);
i
++
;
sample
->
addFolder
(
copy
)
;
copy
->
setTagString
(
"transferred"
,
source
->
GetName
()
);
addToLog
(
log
,
cleanup
(
systematic
->
GetName
()),
sourceChannel
,
cleanup
(
region
->
GetName
()));
}
}
}
}
...
...
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