Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Computing
cbmroot
Commits
fd976143
Commit
fd976143
authored
1 year ago
by
Sergei Zharko
Browse files
Options
Downloads
Patches
Plain Diff
[BugFix]: replace of TFile::FindObjectAny with TFile::Get in the QA-Checker framework
parent
cd645e08
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1636
[BugFix]: replace of TFile::FindObjectAny with TFile::Get in the QA-Checker framework
Pipeline
#27014
passed
1 year ago
Stage: build
Stage: package
Stage: verify
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/qa/checker/CbmQaCheckerFileHandler.cxx
+1
-14
1 addition, 14 deletions
core/qa/checker/CbmQaCheckerFileHandler.cxx
core/qa/checker/CbmQaCheckerFileHandler.h
+0
-7
0 additions, 7 deletions
core/qa/checker/CbmQaCheckerFileHandler.h
with
1 addition
and
21 deletions
core/qa/checker/CbmQaCheckerFileHandler.cxx
+
1
−
14
View file @
fd976143
...
@@ -101,7 +101,7 @@ void FileHandler::Process(Option_t* opt)
...
@@ -101,7 +101,7 @@ void FileHandler::Process(Option_t* opt)
bool
skipObj
=
false
;
bool
skipObj
=
false
;
for
(
int
iVer
=
0
;
iVer
<
nVersions
;
++
iVer
)
{
for
(
int
iVer
=
0
;
iVer
<
nVersions
;
++
iVer
)
{
auto
*
pInputFile
=
static_cast
<
TFile
*>
(
fpInputFiles
->
At
(
iVer
));
auto
*
pInputFile
=
static_cast
<
TFile
*>
(
fpInputFiles
->
At
(
iVer
));
vpObjects
[
iVer
]
=
ReadObjectFromFile
(
pInputFile
,
fpObjDB
->
GetObject
(
fFileID
,
iObj
));
vpObjects
[
iVer
]
=
pInputFile
->
Get
<
TNamed
>
(
fpObjDB
->
GetObject
(
fFileID
,
iObj
)
.
c_str
()
);
if
(
!
vpObjects
[
iVer
])
{
if
(
!
vpObjects
[
iVer
])
{
LOG
(
warn
)
<<
"FileHandler: object "
<<
fpObjDB
->
GetObject
(
fFileID
,
iObj
)
<<
" is undefined for version "
LOG
(
warn
)
<<
"FileHandler: object "
<<
fpObjDB
->
GetObject
(
fFileID
,
iObj
)
<<
" is undefined for version "
<<
fpObjDB
->
GetVersionLabel
(
iVer
)
<<
". This object will be skipped"
;
<<
fpObjDB
->
GetVersionLabel
(
iVer
)
<<
". This object will be skipped"
;
...
@@ -180,16 +180,3 @@ void FileHandler::Process(Option_t* opt)
...
@@ -180,16 +180,3 @@ void FileHandler::Process(Option_t* opt)
}
// iObj
}
// iObj
}
}
// ---------------------------------------------------------------------------------------------------------------------
//
TNamed
*
FileHandler
::
ReadObjectFromFile
(
TFile
*
pFile
,
const
std
::
string
&
path
)
const
{
int
iPosSlash
=
path
.
find_last_of
(
'/'
)
+
1
;
std
::
string
baseName
=
path
.
substr
(
iPosSlash
,
path
.
size
());
std
::
string
pathName
=
path
.
substr
(
0
,
iPosSlash
);
if
(
pathName
.
size
()
>
0
)
{
pFile
->
cd
(
pathName
.
c_str
());
}
return
dynamic_cast
<
TNamed
*>
(
pFile
->
FindObjectAny
(
baseName
.
c_str
()));
}
This diff is collapsed.
Click to expand it.
core/qa/checker/CbmQaCheckerFileHandler.h
+
0
−
7
View file @
fd976143
...
@@ -71,13 +71,6 @@ namespace cbm::qa::checker
...
@@ -71,13 +71,6 @@ namespace cbm::qa::checker
/// @return Pointer to created TDirectory object
/// @return Pointer to created TDirectory object
TDirectory
*
CreateNestedDirectory
(
const
std
::
string
&
path
);
TDirectory
*
CreateNestedDirectory
(
const
std
::
string
&
path
);
/// @brief Iteratively reads object from file by the provided full path to the object
/// @param pFile Pointer to TFile instance
/// @param path Full path to the object inside the file
/// @return A pointer to TNamed object
TNamed
*
ReadObjectFromFile
(
TFile
*
pFile
,
const
std
::
string
&
path
)
const
;
int
fFileID
=
-
1
;
///< Index of file
int
fFileID
=
-
1
;
///< Index of file
int
fDatasetID
=
-
1
;
///< Index of dataset
int
fDatasetID
=
-
1
;
///< Index of dataset
...
...
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