Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gaudi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
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
Gaudi
Gaudi
Commits
0245026b
Commit
0245026b
authored
1 year ago
by
Marco Clemencic
Browse files
Options
Downloads
Patches
Plain Diff
Fire ContextIncident 'CONNECTED_NTUPLE_OUTPUT' when opening a ntuple file in RFileCnv
parent
4784576d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1478
Fire ContextIncident 'CONNECTED_NTUPLE_OUTPUT' when opening a ntuple file in RFileCnv
Pipeline
#5934609
passed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
RootHistCnv/src/RFileCnv.cpp
+10
-1
10 additions, 1 deletion
RootHistCnv/src/RFileCnv.cpp
RootHistCnv/src/RFileCnv.h
+4
-2
4 additions, 2 deletions
RootHistCnv/src/RFileCnv.h
with
14 additions
and
3 deletions
RootHistCnv/src/RFileCnv.cpp
+
10
−
1
View file @
0245026b
...
...
@@ -10,6 +10,7 @@
\***********************************************************************************/
// Include files
#include
"GaudiKernel/Bootstrap.h"
#include
"GaudiKernel/DataIncident.h"
#include
"GaudiKernel/IOpaqueAddress.h"
#include
"GaudiKernel/IRegistry.h"
#include
"GaudiKernel/ISvcLocator.h"
...
...
@@ -44,7 +45,14 @@ StatusCode RootHistCnv::RFileCnv::initialize() {
if
(
!
sc
)
return
sc
;
}
// initialise base class
return
RDirectoryCnv
::
initialize
();
return
RDirectoryCnv
::
initialize
().
andThen
(
[
&
]()
{
m_incSvc
=
service
(
"IncidentSvc"
);
if
(
!
m_incSvc
)
{
MsgStream
(
msgSvc
()
)
<<
MSG
::
ERROR
<<
"Cannot access IncidentSvc"
<<
endmsg
;
return
StatusCode
::
FAILURE
;
}
return
StatusCode
::
SUCCESS
;
}
);
}
//------------------------------------------------------------------------------
...
...
@@ -126,6 +134,7 @@ StatusCode RootHistCnv::RFileCnv::createObj( IOpaqueAddress* pAddress, DataObjec
regTFile
(
ooname
,
rfile
).
ignore
();
log
<<
MSG
::
DEBUG
<<
"creating ROOT file "
<<
fname
<<
endmsg
;
m_incSvc
->
fireIncident
(
ContextIncident
<
TFile
*>
(
fname
,
"CONNECTED_NTUPLE_OUTPUT"
,
rfile
)
);
ipar
[
0
]
=
(
unsigned
long
)
rfile
;
NTuple
::
File
*
pFile
=
new
NTuple
::
File
(
objType
(),
fname
,
oname
);
...
...
This diff is collapsed.
Click to expand it.
RootHistCnv/src/RFileCnv.h
+
4
−
2
View file @
0245026b
...
...
@@ -12,6 +12,7 @@
#define ROOTHISTCNV_RFILECNV_H 1
// Include files
#include
"GaudiKernel/IIncidentSvc.h"
#include
"GaudiKernel/NTuple.h"
#include
"RDirectoryCnv.h"
...
...
@@ -51,8 +52,9 @@ namespace RootHistCnv {
RFileCnv
(
ISvcLocator
*
svc
);
protected
:
TFile
*
rfile
{
nullptr
};
///< Pointer to ROOT file
std
::
string
m_compLevel
;
///< Compression setting, property RFileCnv.GlobalCompression
TFile
*
rfile
{
nullptr
};
///< Pointer to ROOT file
std
::
string
m_compLevel
;
///< Compression setting, property RFileCnv.GlobalCompression
SmartIF
<
IIncidentSvc
>
m_incSvc
;
};
}
// namespace RootHistCnv
#endif // RootHistCnv_RFileCNV_H
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