Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot_parameter
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
CbmSoft
cbmroot_parameter
Commits
c6054144
Commit
c6054144
authored
1 month ago
by
Pierre-Alain Loizeau
Browse files
Options
Downloads
Patches
Plain Diff
Add macro to print/dump alignment matrices in human readable text form
parent
8a605400
No related branches found
No related tags found
1 merge request
!239
Add macro to print/dump alignment matrices in human readable text form
Pipeline
#33698
passed
1 month ago
Stage: checkRepository
Stage: checkFormat
Stage: finalise
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
macro/print_alignment.C
+35
-0
35 additions, 0 deletions
macro/print_alignment.C
with
35 additions
and
0 deletions
macro/print_alignment.C
0 → 100644
+
35
−
0
View file @
c6054144
Bool_t
print_alignment
(
std
::
string
geoSetupTag
)
{
TString
srcDir
=
gSystem
->
Getenv
(
"VMCWORKDIR"
);
// top source directory
TString
alignmentMatrixFileName
=
srcDir
+
"/parameters/mcbm/AlignmentMatrices_"
+
geoSetupTag
+
".root"
;
if
(
alignmentMatrixFileName
.
Length
()
!=
0
)
{
std
::
cout
<<
"Reading alignment for file "
<<
alignmentMatrixFileName
<<
std
::
endl
;
// Define the basic structure which needs to be filled with information
// This structure is stored in the output file and later passed to the
// FairRoot framework to do the (miss)alignment
std
::
map
<
std
::
string
,
TGeoHMatrix
>*
matrices
{
nullptr
};
// read matrices from disk
std
::
cout
<<
"Filename: "
<<
alignmentMatrixFileName
<<
std
::
endl
;
TFile
*
misalignmentMatrixRootfile
=
new
TFile
(
alignmentMatrixFileName
,
"READ"
);
if
(
misalignmentMatrixRootfile
->
IsOpen
())
{
gDirectory
->
GetObject
(
"MisalignMatrices"
,
matrices
);
misalignmentMatrixRootfile
->
Close
();
for
(
auto
it
=
matrices
->
begin
();
it
!=
matrices
->
end
();
++
it
)
{
std
::
cout
<<
"==========================="
<<
std
::
endl
;
std
::
cout
<<
it
->
first
<<
std
::
endl
;
it
->
second
.
Print
();
std
::
cout
<<
"==========================="
<<
std
::
endl
;
}
}
else
{
std
::
cout
<<
"Could not open file "
<<
alignmentMatrixFileName
<<
"
\n
Exiting"
<<
std
::
endl
;
return
kFALSE
;
}
}
return
kTRUE
;
}
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