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
2a317791
Commit
2a317791
authored
5 years ago
by
Chao Peng
Browse files
Options
Downloads
Patches
Plain Diff
add logger messages in helicity related classes and expose data in THcHelicityScaler
parent
1694ab37
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/THcHelicity.cxx
+8
-10
8 additions, 10 deletions
src/THcHelicity.cxx
src/THcHelicityReader.cxx
+4
-5
4 additions, 5 deletions
src/THcHelicityReader.cxx
src/THcHelicityScaler.h
+9
-0
9 additions, 0 deletions
src/THcHelicityScaler.h
with
21 additions
and
15 deletions
src/THcHelicity.cxx
+
8
−
10
View file @
2a317791
...
...
@@ -490,17 +490,15 @@ Int_t THcHelicity::Decode(const THaEvData& evdata) {
}
}
else
{
if
(
fNCycle
-
fFirstCycle
>
4
)
{
// Not at start of run. Reset
_logger
->
warn
(
"Lost quarted sync at cycle {}"
,
fNCycle
);
cout
<<
fQuartet
[
0
]
<<
" "
<<
fQuartet
[
1
]
<<
" "
<<
fQuartet
[
2
]
<<
" "
<<
fQuartet
[
3
]
<<
endl
;
_logger
->
warn
(
"Lost quartet sync at cycle {}: {} {} {} {}"
,
fNCycle
,
fQuartet
[
0
],
fQuartet
[
1
],
fQuartet
[
2
],
fQuartet
[
3
]);
fFirstCycle
+=
4
*
((
fNCycle
-
fFirstCycle
)
/
4
);
// Update, but don't change phase
}
fFoundQuartet
=
kFALSE
;
fNBits
=
0
;
_logger
->
info
(
"Searching for first of a quaret at cycle {}"
,
fFirstCycle
);
cout
<<
fQuartet
[
0
]
<<
" "
<<
fQuartet
[
1
]
<<
" "
<<
fQuartet
[
2
]
<<
" "
<<
fQuartet
[
3
]
<<
endl
;
_logger
->
info
(
"Searching for first of a quartet at cycle {}: {} {} {} {}"
,
fFirstCycle
,
fQuartet
[
0
],
fQuartet
[
1
],
fQuartet
[
2
],
fQuartet
[
3
]);
fFirstCycle
++
;
}
}
else
{
...
...
@@ -577,6 +575,7 @@ void THcHelicity::SetDebug(Int_t level) {
//_____________________________________________________________________________
void
THcHelicity
::
LoadHelicity
(
Int_t
reportedhelicity
,
Int_t
cyclecount
,
Int_t
missedcycles
)
{
// static const char* const here = "THcHelicity::LoadHelicity";
int
quartetphase
=
(
cyclecount
-
fFirstCycle
)
%
4
;
fnQrt
=
quartetphase
;
...
...
@@ -619,13 +618,12 @@ void THcHelicity::LoadHelicity(Int_t reportedhelicity, Int_t cyclecount, Int_t m
fNBits
=
0
;
fRingSeed_reported
=
0
;
}
else
if
(
fNBits
==
fMAXBIT
)
{
cout
<<
"Seed Found "
<<
bitset
<
32
>
(
fRingSeed_reported
)
<<
" at cycle "
<<
cyclecount
<<
" with first cycle "
<<
fFirstCycle
<<
endl
;
_logger
->
info
(
"Seed Found {:32b} at cycle {} with first cycle {}"
,
fRingSeed_reported
,
cyclecount
,
fFirstCycle
);
if
(
fglHelicityScaler
)
{
cout
<<
"Scaler Seed "
<<
bitset
<
32
>
(
fScalerSeed
)
<<
endl
;
_logger
->
info
(
"Scaler Seed {:32b}"
,
fScalerSeed
);
}
Int_t
backseed
=
GetSeed30
(
fRingSeed_reported
);
cout
<<
"Seed at cycle
"
<<
fFirstCycle
<<
" should be "
<<
hex
<<
backseed
<<
dec
<<
endl
;
_logger
->
info
(
"Seed at cycle
{} should be {:#x}"
,
fFirstCycle
,
backseed
)
;
// Create the "actual seed"
fRingSeed_actual
=
fRingSeed_reported
;
for
(
Int_t
i
=
0
;
i
<
fHelDelay
/
4
;
i
++
)
{
...
...
This diff is collapsed.
Click to expand it.
src/THcHelicityReader.cxx
+
4
−
5
View file @
2a317791
...
...
@@ -45,9 +45,10 @@ Int_t THcHelicityReader::ReadDatabase(const char* /*dbfilename*/, const char* /*
const
TDatime
&
/*date*/
,
int
/*debug_flag*/
)
{
// Eventually get these from the parameter file
const
static
char
*
const
here
=
"THcHelicityReader::ReadDatabase"
;
// SHMS settings see https://logbooks.jlab.org/entry/3614445
cout
<<
"THcHelicityReader
: Helicity information from ROC 2 (SHMS)"
<<
endl
;
_logger
->
info
(
"{}
: Helicity information from ROC 2 (SHMS)"
,
here
)
;
SetROCinfo
(
kHel
,
2
,
14
,
9
);
SetROCinfo
(
kHelm
,
2
,
14
,
8
);
SetROCinfo
(
kMPS
,
2
,
14
,
10
);
...
...
@@ -106,8 +107,7 @@ Int_t THcHelicityReader::ReadData(const THaEvData& evdata) {
// Check if ROC info is correct
if
(
!
evdata
.
GetModule
(
fROCinfo
[
kTime
].
roc
,
fROCinfo
[
kTime
].
slot
))
{
cout
<<
"THcHelicityReader: ROC 2 not found"
<<
endl
;
cout
<<
"Changing to ROC 1 (HMS)"
<<
endl
;
_logger
->
info
(
"{}: ROC 2 not found, changing to ROC 1 (HMS)"
,
here
);
SetROCinfo
(
kHel
,
1
,
18
,
9
);
SetROCinfo
(
kHelm
,
1
,
18
,
8
);
SetROCinfo
(
kMPS
,
1
,
18
,
10
);
...
...
@@ -122,8 +122,7 @@ Int_t THcHelicityReader::ReadData(const THaEvData& evdata) {
(
UInt_t
)
evdata
.
GetData
(
fROCinfo
[
kTime
].
roc
,
fROCinfo
[
kTime
].
slot
,
fROCinfo
[
kTime
].
index
,
0
);
// Check again if ROC info is correct
if
(
titime
==
0
&&
fTITime_last
==
0
)
{
cout
<<
"THcHelicityReader: ROC 2 not found"
<<
endl
;
cout
<<
"Changing to ROC 1 (HMS)"
<<
endl
;
_logger
->
info
(
"{}: ROC 2 not found, changing to ROC 1 (HMS)"
,
here
);
SetROCinfo
(
kHel
,
1
,
18
,
9
);
SetROCinfo
(
kHelm
,
1
,
18
,
8
);
SetROCinfo
(
kMPS
,
1
,
18
,
10
);
...
...
This diff is collapsed.
Click to expand it.
src/THcHelicityScaler.h
+
9
−
0
View file @
2a317791
...
...
@@ -49,6 +49,15 @@ public:
virtual
Int_t
GetReportedActual
()
{
return
fRingSeed_actual
;}
virtual
Bool_t
IsSeedGood
()
{
return
fNBits
>=
30
;}
const
std
::
vector
<
Double_t
>
&
GetScalerSums
()
const
{
return
fScalerSums
;
}
const
std
::
vector
<
Double_t
>
&
GetAsymmetry
()
const
{
return
fAsymmetry
;
}
const
std
::
vector
<
Double_t
>
&
GetAsymmetryError
()
const
{
return
fAsymmetryError
;
}
const
std
::
vector
<
Double_t
>
&
GetCharge
()
const
{
return
fCharge
;
}
const
std
::
vector
<
Double_t
>
&
GetChargeAsymmetry
()
const
{
return
fChargeAsymmetry
;
}
Double_t
GetTime
()
const
{
return
fTime
;
}
Double_t
GetTimeAsymmetry
()
const
{
return
fTimeAsymmetry
;
}
Double_t
GetTriggerAsymmetry
()
const
{
return
fTriggerAsymmetry
;
}
private
:
Int_t
RanBit30
(
Int_t
ranseed
);
...
...
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