Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
old_cbmroot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vikas Singhal
old_cbmroot
Commits
bc211f36
Commit
bc211f36
authored
Feb 11, 2021
by
Administrator
Committed by
Florian Uhlig
Mar 29, 2021
Browse files
Options
Downloads
Patches
Plain Diff
littrack: Add gFile + gDirectory protection
parent
672a44d9
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
reco/littrack/cbm/qa/clustering/CbmLitClusteringQa.cxx
+8
-2
8 additions, 2 deletions
reco/littrack/cbm/qa/clustering/CbmLitClusteringQa.cxx
reco/littrack/clustering/CbmMuchClustering.cxx
+9
-2
9 additions, 2 deletions
reco/littrack/clustering/CbmMuchClustering.cxx
with
17 additions
and
4 deletions
reco/littrack/cbm/qa/clustering/CbmLitClusteringQa.cxx
+
8
−
2
View file @
bc211f36
...
@@ -152,12 +152,18 @@ void CbmLitClusteringQa::Finish() {
...
@@ -152,12 +152,18 @@ void CbmLitClusteringQa::Finish() {
void
CbmLitClusteringQa
::
InitMuchGeoScheme
(
const
string
&
digiFileName
)
{
void
CbmLitClusteringQa
::
InitMuchGeoScheme
(
const
string
&
digiFileName
)
{
if
(
fDet
.
GetDet
(
ECbmModuleId
::
kMuch
)
&&
fMuchDigiFileName
!=
""
)
{
if
(
fDet
.
GetDet
(
ECbmModuleId
::
kMuch
)
&&
fMuchDigiFileName
!=
""
)
{
TFile
*
oldfile
=
gFile
;
/// Save old global file and folder pointer to avoid messing with FairRoot
TFile
*
oldFile
=
gFile
;
TDirectory
*
oldDir
=
gDirectory
;
TFile
*
file
=
new
TFile
(
digiFileName
.
c_str
());
TFile
*
file
=
new
TFile
(
digiFileName
.
c_str
());
TObjArray
*
stations
=
(
TObjArray
*
)
file
->
Get
(
"stations"
);
TObjArray
*
stations
=
(
TObjArray
*
)
file
->
Get
(
"stations"
);
file
->
Close
();
file
->
Close
();
file
->
Delete
();
file
->
Delete
();
gFile
=
oldfile
;
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile
=
oldFile
;
gDirectory
=
oldDir
;
CbmMuchGeoScheme
::
Instance
()
->
Init
(
stations
,
0
);
CbmMuchGeoScheme
::
Instance
()
->
Init
(
stations
,
0
);
}
}
}
}
...
...
...
...
This diff is collapsed.
Click to expand it.
reco/littrack/clustering/CbmMuchClustering.cxx
+
9
−
2
View file @
bc211f36
...
@@ -74,12 +74,19 @@ InitStatus CbmMuchClustering::Init() {
...
@@ -74,12 +74,19 @@ InitStatus CbmMuchClustering::Init() {
std
::
cout
<<
"CbmMuchClustering::Init"
<<
std
::
endl
;
std
::
cout
<<
"CbmMuchClustering::Init"
<<
std
::
endl
;
// Initialize GeoScheme
// Initialize GeoScheme
TFile
*
oldfile
=
gFile
;
/// Save old global file and folder pointer to avoid messing with FairRoot
TFile
*
oldFile
=
gFile
;
TDirectory
*
oldDir
=
gDirectory
;
TFile
*
file
=
new
TFile
(
fDigiFile
);
TFile
*
file
=
new
TFile
(
fDigiFile
);
TObjArray
*
stations
=
(
TObjArray
*
)
file
->
Get
(
"stations"
);
TObjArray
*
stations
=
(
TObjArray
*
)
file
->
Get
(
"stations"
);
file
->
Close
();
file
->
Close
();
file
->
Delete
();
file
->
Delete
();
gFile
=
oldfile
;
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile
=
oldFile
;
gDirectory
=
oldDir
;
fScheme
->
Init
(
stations
,
0
);
fScheme
->
Init
(
stations
,
0
);
// Initialize arrays of objects
// Initialize arrays of objects
ReadDataBranches
();
ReadDataBranches
();
...
...
...
...
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
sign in
to comment