Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Peter Sherwood
athena
Commits
217197f7
Commit
217197f7
authored
4 years ago
by
Attila Krasznahorkay
Browse files
Options
Downloads
Patches
Plain Diff
Made GoodRunsLists build as part of AthAnalysis.
parent
4c64c06b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
DataQuality/GoodRunsLists/CMakeLists.txt
+3
-6
3 additions, 6 deletions
DataQuality/GoodRunsLists/CMakeLists.txt
DataQuality/GoodRunsLists/src/GoodRunsListSelectorTool.cxx
+17
-21
17 additions, 21 deletions
DataQuality/GoodRunsLists/src/GoodRunsListSelectorTool.cxx
with
20 additions
and
27 deletions
DataQuality/GoodRunsLists/CMakeLists.txt
+
3
−
6
View file @
217197f7
...
@@ -15,12 +15,9 @@ atlas_add_root_dictionary( GoodRunsListsLib
...
@@ -15,12 +15,9 @@ atlas_add_root_dictionary( GoodRunsListsLib
GoodRunsLists/DQHelperFunctions.h Root/LinkDef.h
GoodRunsLists/DQHelperFunctions.h Root/LinkDef.h
EXTERNAL_PACKAGES LibXml2 ROOT
)
EXTERNAL_PACKAGES LibXml2 ROOT
)
if
(
NOT XAOD_STANDALONE
)
set
(
extra_libs DerivationFrameworkInterfaces
)
if
(
XAOD_ANALYSIS
)
if
(
XAOD_STANDALONE
)
set
(
extra_libs
)
set
(
extra_libs
)
else
()
set
(
extra_libs DerivationFrameworkInterfaces
)
endif
()
endif
()
endif
()
atlas_add_library
(
GoodRunsListsLib
atlas_add_library
(
GoodRunsListsLib
...
...
This diff is collapsed.
Click to expand it.
DataQuality/GoodRunsLists/src/GoodRunsListSelectorTool.cxx
+
17
−
21
View file @
217197f7
#ifndef XAOD_ANALYSIS
/*
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
*/
...
@@ -24,7 +22,7 @@
...
@@ -24,7 +22,7 @@
using
namespace
std
;
using
namespace
std
;
GoodRunsListSelectorTool
::
GoodRunsListSelectorTool
(
const
std
::
string
&
type
,
const
std
::
string
&
name
,
const
IInterface
*
parent
)
GoodRunsListSelectorTool
::
GoodRunsListSelectorTool
(
const
std
::
string
&
type
,
const
std
::
string
&
name
,
const
IInterface
*
parent
)
:
AthAlgTool
(
type
,
name
,
parent
)
:
AthAlgTool
(
type
,
name
,
parent
)
,
m_reader
(
0
)
,
m_reader
(
0
)
,
m_boolop
(
0
)
,
m_boolop
(
0
)
...
@@ -66,7 +64,7 @@ GoodRunsListSelectorTool::~GoodRunsListSelectorTool()
...
@@ -66,7 +64,7 @@ GoodRunsListSelectorTool::~GoodRunsListSelectorTool()
}
}
StatusCode
StatusCode
GoodRunsListSelectorTool
::
queryInterface
(
const
InterfaceID
&
riid
,
void
**
ppvIf
)
GoodRunsListSelectorTool
::
queryInterface
(
const
InterfaceID
&
riid
,
void
**
ppvIf
)
{
{
if
(
riid
==
IGoodRunsListSelectorTool
::
interfaceID
()
)
{
if
(
riid
==
IGoodRunsListSelectorTool
::
interfaceID
()
)
{
...
@@ -126,7 +124,7 @@ GoodRunsListSelectorTool::initialize()
...
@@ -126,7 +124,7 @@ GoodRunsListSelectorTool::initialize()
/// start reading xml files
/// start reading xml files
if
(
!
m_goodrunslistVec
.
empty
()
)
{
if
(
!
m_goodrunslistVec
.
empty
()
)
{
m_reader
->
Reset
();
m_reader
->
Reset
();
for
(
itr
=
m_goodrunslistVec
.
begin
();
itr
!=
m_goodrunslistVec
.
end
()
&&
!
m_usecool
;
++
itr
)
{
for
(
itr
=
m_goodrunslistVec
.
begin
();
itr
!=
m_goodrunslistVec
.
end
()
&&
!
m_usecool
;
++
itr
)
{
//const char* fname;
//const char* fname;
std
::
string
fname
;
std
::
string
fname
;
if
(
itr
->
find
(
"/"
)
==
0
||
itr
->
find
(
"$"
)
==
0
||
itr
->
find
(
"."
)
==
0
||
itr
->
find
(
":"
)
!=
string
::
npos
)
{
if
(
itr
->
find
(
"/"
)
==
0
||
itr
->
find
(
"$"
)
==
0
||
itr
->
find
(
"."
)
==
0
||
itr
->
find
(
":"
)
!=
string
::
npos
)
{
...
@@ -163,8 +161,8 @@ GoodRunsListSelectorTool::initialize()
...
@@ -163,8 +161,8 @@ GoodRunsListSelectorTool::initialize()
}
}
bool
bool
GoodRunsListSelectorTool
::
passEvent
(
const
EventIDBase
&
pEvent
)
GoodRunsListSelectorTool
::
passEvent
(
const
EventIDBase
&
pEvent
)
{
{
ATH_MSG_DEBUG
(
"passEvent() "
);
ATH_MSG_DEBUG
(
"passEvent() "
);
...
@@ -224,7 +222,7 @@ GoodRunsListSelectorTool::passThisRunLB( const std::vector<std::string>& grlname
...
@@ -224,7 +222,7 @@ GoodRunsListSelectorTool::passThisRunLB( const std::vector<std::string>& grlname
if
(
m_passthrough
)
{
if
(
m_passthrough
)
{
ATH_MSG_DEBUG
(
"passThisRunLB() :: Pass through mode."
);
ATH_MSG_DEBUG
(
"passThisRunLB() :: Pass through mode."
);
pass
=
true
;
pass
=
true
;
}
}
/// decide from XML files
/// decide from XML files
else
{
else
{
pass
=
this
->
passRunLB
(
runNumber
,
lumiBlockNr
,
grlnameVec
,
brlnameVec
);
pass
=
this
->
passRunLB
(
runNumber
,
lumiBlockNr
,
grlnameVec
,
brlnameVec
);
...
@@ -245,9 +243,9 @@ GoodRunsListSelectorTool::passRunLB( int runNumber, int lumiBlockNr,
...
@@ -245,9 +243,9 @@ GoodRunsListSelectorTool::passRunLB( int runNumber, int lumiBlockNr,
if
(
m_passthrough
)
{
if
(
m_passthrough
)
{
ATH_MSG_DEBUG
(
"passRunLB() :: Pass through mode."
);
ATH_MSG_DEBUG
(
"passRunLB() :: Pass through mode."
);
return
true
;
return
true
;
}
}
/// decision based on merged blackrunslist
/// decision based on merged blackrunslist
if
(
m_rejectanybrl
&&
m_eventselectormode
)
{
if
(
m_rejectanybrl
&&
m_eventselectormode
)
{
if
(
m_brlcollection
->
HasRunLumiBlock
(
runNumber
,
lumiBlockNr
)
)
{
if
(
m_brlcollection
->
HasRunLumiBlock
(
runNumber
,
lumiBlockNr
)
)
{
ATH_MSG_DEBUG
(
"passRunLB() :: Event rejected by (_any_ of) merged black runs list."
);
ATH_MSG_DEBUG
(
"passRunLB() :: Event rejected by (_any_ of) merged black runs list."
);
...
@@ -261,7 +259,7 @@ GoodRunsListSelectorTool::passRunLB( int runNumber, int lumiBlockNr,
...
@@ -261,7 +259,7 @@ GoodRunsListSelectorTool::passRunLB( int runNumber, int lumiBlockNr,
brlitr
=
m_brlcollection
->
find
(
brlnameVec
[
i
]);
brlitr
=
m_brlcollection
->
find
(
brlnameVec
[
i
]);
if
(
brlitr
!=
m_brlcollection
->
end
())
if
(
brlitr
!=
m_brlcollection
->
end
())
reject
=
brlitr
->
HasRunLumiBlock
(
runNumber
,
lumiBlockNr
);
reject
=
brlitr
->
HasRunLumiBlock
(
runNumber
,
lumiBlockNr
);
}
}
if
(
reject
)
{
if
(
reject
)
{
ATH_MSG_DEBUG
(
"passRunLB() :: Event rejected by specific black runs list."
);
ATH_MSG_DEBUG
(
"passRunLB() :: Event rejected by specific black runs list."
);
return
false
;
return
false
;
...
@@ -276,23 +274,23 @@ GoodRunsListSelectorTool::passRunLB( int runNumber, int lumiBlockNr,
...
@@ -276,23 +274,23 @@ GoodRunsListSelectorTool::passRunLB( int runNumber, int lumiBlockNr,
grlitr
=
m_grlcollection
->
find
(
grlnameVec
[
i
]);
grlitr
=
m_grlcollection
->
find
(
grlnameVec
[
i
]);
if
(
grlitr
!=
m_grlcollection
->
end
())
if
(
grlitr
!=
m_grlcollection
->
end
())
pass
=
grlitr
->
HasRunLumiBlock
(
runNumber
,
lumiBlockNr
);
pass
=
grlitr
->
HasRunLumiBlock
(
runNumber
,
lumiBlockNr
);
}
}
if
(
pass
)
{
if
(
pass
)
{
ATH_MSG_DEBUG
(
"passRunLB() :: Event accepted by specific good runs list."
);
ATH_MSG_DEBUG
(
"passRunLB() :: Event accepted by specific good runs list."
);
return
true
;
return
true
;
}
}
/// decision based on merged goodrunslist
/// decision based on merged goodrunslist
}
else
if
(
m_grlcollection
->
HasRunLumiBlock
(
runNumber
,
lumiBlockNr
))
{
}
else
if
(
m_grlcollection
->
HasRunLumiBlock
(
runNumber
,
lumiBlockNr
))
{
ATH_MSG_DEBUG
(
"passRunLB() :: Event accepted by (_any_ of) merged good runs list."
);
ATH_MSG_DEBUG
(
"passRunLB() :: Event accepted by (_any_ of) merged good runs list."
);
return
true
;
return
true
;
}
}
ATH_MSG_DEBUG
(
"passRunLB() :: Event rejected, not in (any) good runs list."
);
ATH_MSG_DEBUG
(
"passRunLB() :: Event rejected, not in (any) good runs list."
);
return
false
;
return
false
;
}
}
StatusCode
StatusCode
GoodRunsListSelectorTool
::
finalize
()
GoodRunsListSelectorTool
::
finalize
()
{
{
ATH_MSG_DEBUG
(
"finalize() "
);
ATH_MSG_DEBUG
(
"finalize() "
);
...
@@ -305,7 +303,7 @@ GoodRunsListSelectorTool::fileExists(const char* fileName)
...
@@ -305,7 +303,7 @@ GoodRunsListSelectorTool::fileExists(const char* fileName)
{
{
struct
stat
info
;
struct
stat
info
;
int
ret
=
-
1
;
int
ret
=
-
1
;
//get the file attributes
//get the file attributes
ret
=
stat
(
fileName
,
&
info
);
ret
=
stat
(
fileName
,
&
info
);
...
@@ -313,7 +311,7 @@ GoodRunsListSelectorTool::fileExists(const char* fileName)
...
@@ -313,7 +311,7 @@ GoodRunsListSelectorTool::fileExists(const char* fileName)
/// stat() is able to get the file attributes, so the file obviously exists
/// stat() is able to get the file attributes, so the file obviously exists
/// if filesize==0 assume the copying failed.
/// if filesize==0 assume the copying failed.
//if (info.st_size == 0) return false;
//if (info.st_size == 0) return false;
//else
//else
return
true
;
return
true
;
}
else
{
}
else
{
/// stat() is not able to get the file attributes, so the file obviously does not exist.
/// stat() is not able to get the file attributes, so the file obviously does not exist.
...
@@ -322,7 +320,7 @@ GoodRunsListSelectorTool::fileExists(const char* fileName)
...
@@ -322,7 +320,7 @@ GoodRunsListSelectorTool::fileExists(const char* fileName)
}
}
bool
bool
GoodRunsListSelectorTool
::
registerGRLSelector
(
const
std
::
string
&
name
,
const
std
::
vector
<
std
::
string
>&
grlnameVec
,
const
std
::
vector
<
std
::
string
>&
brlnameVec
)
GoodRunsListSelectorTool
::
registerGRLSelector
(
const
std
::
string
&
name
,
const
std
::
vector
<
std
::
string
>&
grlnameVec
,
const
std
::
vector
<
std
::
string
>&
brlnameVec
)
{
{
if
(
m_registry
.
find
(
name
)
!=
m_registry
.
end
())
{
if
(
m_registry
.
find
(
name
)
!=
m_registry
.
end
())
{
...
@@ -358,5 +356,3 @@ GoodRunsListSelectorTool::registerGRLSelector(const std::string& name, const std
...
@@ -358,5 +356,3 @@ GoodRunsListSelectorTool::registerGRLSelector(const std::string& name, const std
m_registry
[
name
]
=
vvPair
(
grlnameVec
,
brlnameVec
);
m_registry
[
name
]
=
vvPair
(
grlnameVec
,
brlnameVec
);
return
true
;
return
true
;
}
}
#endif // XAOD_ANALYSIS
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