Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hcana
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
jlab
hallc
analyzer_software
hcana
Commits
700faef4
Commit
700faef4
authored
10 years ago
by
Stephen A. Wood
Browse files
Options
Downloads
Patches
Plain Diff
Softlink make_cratemap.pl to avoid multiple copies.
parent
1f8daf63
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
hcal_calib/make_cratemap.pl
+1
-70
1 addition, 70 deletions
hcal_calib/make_cratemap.pl
hcal_calib/make_cratemap.pl
+1
-70
1 addition, 70 deletions
hcal_calib/make_cratemap.pl
with
2 additions
and
140 deletions
hcal_calib/make_cratemap.pl
deleted
100755 → 0
+
1
−
70
View file @
1f8daf63
#!/usr/bin/perl
# Read a Hall C style MAP file and output a
# Hall A style crate map DB file.
#
# 22.03.2012 (saw)
%crates
=
();
$crate
=
0
;
$nsubadd
=
0
;
$bsub
=
0
;
$modtype
=
0
;
$slot
=
0
;
while
(
<>
)
{
$line
=
chomp
;
if
(
$line
=
/^\s*ROC=\s*(\d*)/i
)
{
$i
++
;
$crate
=
$
1
;
if
(
not
$crates
{
$crate
})
{
$slotlist
=
{};
$crates
{
$crate
}
=
$slotlist
;
}
$modtype
=
0
;
$slot
=
0
;
}
elsif
(
$line
=
/^\s*nsubadd=\s*(\d*)/i
)
{
$nsubadd
=
$
1
;
$modtype
=
0
;
}
elsif
(
$line
=
/^\s*bsub=\s*(\d*)/i
)
{
$bsub
=
$
1
;
$modtype
=
0
;
}
elsif
(
$line
=
/^\s*slot=\s*(\d*)/i
)
{
$slot
=
$
1
;
$modtype
=
0
;
}
elsif
(
$line
=
/^\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)/
)
{
if
(
$modtype
==
0
)
{
# Slot not yet registered
if
(
$nsubadd
==
96
)
{
$modtype
=
1877
;
}
elsif
(
$nsubadd
==
64
)
{
if
(
$bsub
==
16
)
{
$modtype
=
1875
;
}
elsif
(
$bsub
==
17
)
{
$modtype
=
1881
;
}
}
if
(
$modtype
==
0
)
{
print
"
Unknown module Crate
$crate
, Slot
$slot
\n
";
}
$crates
{
$crate
}{
$slot
}
=
$modtype
;
# print "$crate $slot $modtype\n";
}
}
}
print
"
# Hall C Crate map
\n
";
foreach
$crate
(
sort
{
$a
<=>
$b
}
keys
%crates
)
{
print
"
==== Crate
$crate
type fastbus
\n
";
print
"
# slot model clear header mask nchan ndata
\n
";
foreach
$slot
(
sort
{
$a
<=>
$b
}
keys
%
{
$crates
{
$crate
}})
{
$modtype
=
$crates
{
$crate
}{
$slot
};
if
(
$modtype
==
1877
)
{
$ndata
=
256
;
}
else
{
$ndata
=
64
;
}
printf
"
%2d %d 1 0x0 0x0 %3d %d
\n
"
,
$slot
,
$modtype
,
$nsubadd
,
$ndata
;
}
}
This diff is collapsed.
Click to expand it.
hcal_calib/make_cratemap.pl
0 → 120000
+
1
−
70
View file @
700faef4
..
/examples/ma
ke_cratemap
.
pl
\ No newline at end of file
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