Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hcana
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
1
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
f92e222a
Commit
f92e222a
authored
8 years ago
by
Jure Bericic
Browse files
Options
Downloads
Patches
Plain Diff
Added some checks on PSE125.
parent
6472be2d
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/THcConfigEvtHandler.cxx
+8
-0
8 additions, 0 deletions
src/THcConfigEvtHandler.cxx
src/THcConfigEvtHandler.h
+1
-0
1 addition, 0 deletions
src/THcConfigEvtHandler.h
src/THcHitList.cxx
+1
-1
1 addition, 1 deletion
src/THcHitList.cxx
src/THcRawAdcHit.cxx
+7
-0
7 additions, 0 deletions
src/THcRawAdcHit.cxx
with
17 additions
and
1 deletion
src/THcConfigEvtHandler.cxx
+
8
−
0
View file @
f92e222a
...
@@ -193,6 +193,14 @@ void THcConfigEvtHandler::PrintConfig()
...
@@ -193,6 +193,14 @@ void THcConfigEvtHandler::PrintConfig()
it
++
;
it
++
;
}
}
}
}
Int_t
THcConfigEvtHandler
::
IsPresent
(
Int_t
crate
)
{
if
(
CrateInfoMap
.
find
(
crate
)
!=
CrateInfoMap
.
end
())
{
CrateInfo_t
*
cinfo
=
CrateInfoMap
[
crate
];
return
cinfo
->
FADC250
.
present
;
}
return
(
0
);
}
Int_t
THcConfigEvtHandler
::
GetNSA
(
Int_t
crate
)
{
Int_t
THcConfigEvtHandler
::
GetNSA
(
Int_t
crate
)
{
if
(
CrateInfoMap
.
find
(
crate
)
!=
CrateInfoMap
.
end
())
{
if
(
CrateInfoMap
.
find
(
crate
)
!=
CrateInfoMap
.
end
())
{
CrateInfo_t
*
cinfo
=
CrateInfoMap
[
crate
];
CrateInfo_t
*
cinfo
=
CrateInfoMap
[
crate
];
...
...
This diff is collapsed.
Click to expand it.
src/THcConfigEvtHandler.h
+
1
−
0
View file @
f92e222a
...
@@ -25,6 +25,7 @@ public:
...
@@ -25,6 +25,7 @@ public:
virtual
Int_t
Analyze
(
THaEvData
*
evdata
);
virtual
Int_t
Analyze
(
THaEvData
*
evdata
);
virtual
void
AddEventType
(
Int_t
evtype
);
virtual
void
AddEventType
(
Int_t
evtype
);
virtual
void
PrintConfig
();
virtual
void
PrintConfig
();
virtual
Int_t
IsPresent
(
Int_t
crate
);
virtual
Int_t
GetNSA
(
Int_t
crate
);
virtual
Int_t
GetNSA
(
Int_t
crate
);
virtual
Int_t
GetNSB
(
Int_t
crate
);
virtual
Int_t
GetNSB
(
Int_t
crate
);
virtual
Int_t
GetNPED
(
Int_t
crate
);
virtual
Int_t
GetNPED
(
Int_t
crate
);
...
...
This diff is collapsed.
Click to expand it.
src/THcHitList.cxx
+
1
−
1
View file @
f92e222a
...
@@ -223,7 +223,7 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata ) {
...
@@ -223,7 +223,7 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata ) {
}
}
}
else
{
// This is a Flash ADC
}
else
{
// This is a Flash ADC
if
(
fPSE125
)
{
// Set F250 parameters.
if
(
fPSE125
&&
fPSE125
->
IsPresent
(
d
->
crate
)
)
{
// Set F250 parameters.
rawhit
->
SetF250Params
(
rawhit
->
SetF250Params
(
fPSE125
->
GetNSA
(
d
->
crate
),
fPSE125
->
GetNSA
(
d
->
crate
),
fPSE125
->
GetNSB
(
d
->
crate
),
fPSE125
->
GetNSB
(
d
->
crate
),
...
...
This diff is collapsed.
Click to expand it.
src/THcRawAdcHit.cxx
+
7
−
0
View file @
f92e222a
...
@@ -459,6 +459,13 @@ Double_t THcRawAdcHit::GetSampleInt() const {
...
@@ -459,6 +459,13 @@ Double_t THcRawAdcHit::GetSampleInt() const {
void
THcRawAdcHit
::
SetF250Params
(
Int_t
NSA
,
Int_t
NSB
,
Int_t
NPED
)
{
void
THcRawAdcHit
::
SetF250Params
(
Int_t
NSA
,
Int_t
NSB
,
Int_t
NPED
)
{
if
(
NSA
<
0
||
NSB
<
0
||
NPED
<
0
)
{
TString
msg
=
TString
::
Format
(
"`THcRawAdcHit::SetF250Params`: One of the params is negative! NSA = %d NSB = %d NPED = %d"
,
NSA
,
NSB
,
NPED
);
throw
std
::
invalid_argument
(
msg
.
Data
());
}
fNPedestalSamples
=
NPED
;
fNPedestalSamples
=
NPED
;
fNPeakSamples
=
NSA
+
NSB
;
fNPeakSamples
=
NSA
+
NSB
;
fPeakPedestalRatio
=
1.0
*
fNPeakSamples
/
fNPedestalSamples
;
fPeakPedestalRatio
=
1.0
*
fNPeakSamples
/
fNPedestalSamples
;
...
...
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