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
b9e95a69
Commit
b9e95a69
authored
6 years ago
by
hallc-online
Committed by
Mark K Jones
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Updated THcBCMCurrent to include BCM4C to avoid conflict with .param no longer containing BCM17
parent
4a7af64c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/THcBCMCurrent.cxx
+12
-12
12 additions, 12 deletions
src/THcBCMCurrent.cxx
src/THcBCMCurrent.h
+4
-4
4 additions, 4 deletions
src/THcBCMCurrent.h
with
16 additions
and
16 deletions
src/THcBCMCurrent.cxx
+
12
−
12
View file @
b9e95a69
...
@@ -34,7 +34,7 @@ THcBCMCurrent::THcBCMCurrent(const char* name,
...
@@ -34,7 +34,7 @@ THcBCMCurrent::THcBCMCurrent(const char* name,
fBCM2avg
=
0
;
fBCM2avg
=
0
;
fBCM4aavg
=
0
;
fBCM4aavg
=
0
;
fBCM4bavg
=
0
;
fBCM4bavg
=
0
;
fBCM
17
avg
=
0
;
fBCM
4c
avg
=
0
;
}
}
//__________________________________________________
//__________________________________________________
...
@@ -48,7 +48,7 @@ THcBCMCurrent::~THcBCMCurrent()
...
@@ -48,7 +48,7 @@ THcBCMCurrent::~THcBCMCurrent()
delete
[]
fiBCM2
;
fiBCM2
=
NULL
;
delete
[]
fiBCM2
;
fiBCM2
=
NULL
;
delete
[]
fiBCM4a
;
fiBCM4a
=
NULL
;
delete
[]
fiBCM4a
;
fiBCM4a
=
NULL
;
delete
[]
fiBCM4b
;
fiBCM4b
=
NULL
;
delete
[]
fiBCM4b
;
fiBCM4b
=
NULL
;
delete
[]
fiBCM
17
;
fiBCM
17
=
NULL
;
delete
[]
fiBCM
4c
;
fiBCM
4c
=
NULL
;
delete
[]
fEvtNum
;
fEvtNum
=
NULL
;
delete
[]
fEvtNum
;
fEvtNum
=
NULL
;
}
}
...
@@ -83,7 +83,7 @@ Int_t THcBCMCurrent::ReadDatabase( const TDatime& date )
...
@@ -83,7 +83,7 @@ Int_t THcBCMCurrent::ReadDatabase( const TDatime& date )
fiBCM2
=
new
Double_t
[
fNscaler
];
fiBCM2
=
new
Double_t
[
fNscaler
];
fiBCM4a
=
new
Double_t
[
fNscaler
];
fiBCM4a
=
new
Double_t
[
fNscaler
];
fiBCM4b
=
new
Double_t
[
fNscaler
];
fiBCM4b
=
new
Double_t
[
fNscaler
];
fiBCM
17
=
new
Double_t
[
fNscaler
];
fiBCM
4c
=
new
Double_t
[
fNscaler
];
fEvtNum
=
new
Int_t
[
fNscaler
];
fEvtNum
=
new
Int_t
[
fNscaler
];
...
@@ -92,7 +92,7 @@ Int_t THcBCMCurrent::ReadDatabase( const TDatime& date )
...
@@ -92,7 +92,7 @@ Int_t THcBCMCurrent::ReadDatabase( const TDatime& date )
{
"scal_read_bcm2_current"
,
fiBCM2
,
kDouble
,
(
UInt_t
)
fNscaler
},
{
"scal_read_bcm2_current"
,
fiBCM2
,
kDouble
,
(
UInt_t
)
fNscaler
},
{
"scal_read_bcm4a_current"
,
fiBCM4a
,
kDouble
,
(
UInt_t
)
fNscaler
},
{
"scal_read_bcm4a_current"
,
fiBCM4a
,
kDouble
,
(
UInt_t
)
fNscaler
},
{
"scal_read_bcm4b_current"
,
fiBCM4b
,
kDouble
,
(
UInt_t
)
fNscaler
},
{
"scal_read_bcm4b_current"
,
fiBCM4b
,
kDouble
,
(
UInt_t
)
fNscaler
},
{
"scal_read_bcm
17
_current"
,
fiBCM
17
,
kDouble
,
(
UInt_t
)
fNscaler
},
{
"scal_read_bcm
4c
_current"
,
fiBCM
4c
,
kDouble
,
(
UInt_t
)
fNscaler
},
{
"scal_read_event"
,
fEvtNum
,
kInt
,
(
UInt_t
)
fNscaler
},
{
"scal_read_event"
,
fEvtNum
,
kInt
,
(
UInt_t
)
fNscaler
},
{
0
}
{
0
}
};
};
...
@@ -106,7 +106,7 @@ Int_t THcBCMCurrent::ReadDatabase( const TDatime& date )
...
@@ -106,7 +106,7 @@ Int_t THcBCMCurrent::ReadDatabase( const TDatime& date )
binfo
.
bcm2_current
=
fiBCM2
[
i
];
binfo
.
bcm2_current
=
fiBCM2
[
i
];
binfo
.
bcm4a_current
=
fiBCM4a
[
i
];
binfo
.
bcm4a_current
=
fiBCM4a
[
i
];
binfo
.
bcm4b_current
=
fiBCM4b
[
i
];
binfo
.
bcm4b_current
=
fiBCM4b
[
i
];
binfo
.
bcm
17
_current
=
fiBCM
17
[
i
];
binfo
.
bcm
4c
_current
=
fiBCM
4c
[
i
];
BCMInfoMap
.
insert
(
std
::
make_pair
(
fEvtNum
[
i
],
binfo
)
);
BCMInfoMap
.
insert
(
std
::
make_pair
(
fEvtNum
[
i
],
binfo
)
);
}
}
...
@@ -129,7 +129,7 @@ Int_t THcBCMCurrent::DefineVariables( EMode mode )
...
@@ -129,7 +129,7 @@ Int_t THcBCMCurrent::DefineVariables( EMode mode )
{
"bcm2.AvgCurrent"
,
"BCM2 average beam current"
,
"fBCM2avg"
},
{
"bcm2.AvgCurrent"
,
"BCM2 average beam current"
,
"fBCM2avg"
},
{
"bcm4a.AvgCurrent"
,
"BCM4a average beam current"
,
"fBCM4aavg"
},
{
"bcm4a.AvgCurrent"
,
"BCM4a average beam current"
,
"fBCM4aavg"
},
{
"bcm4b.AvgCurrent"
,
"BCM4b average beam current"
,
"fBCM4bavg"
},
{
"bcm4b.AvgCurrent"
,
"BCM4b average beam current"
,
"fBCM4bavg"
},
{
"bcm
17
.AvgCurrent"
,
"BCM
17
average beam current"
,
"fBCM
17
avg"
},
{
"bcm
4c
.AvgCurrent"
,
"BCM
4c
average beam current"
,
"fBCM
4c
avg"
},
{
0
}
{
0
}
};
};
...
@@ -155,7 +155,7 @@ Int_t THcBCMCurrent::Process( const THaEvData& evdata )
...
@@ -155,7 +155,7 @@ Int_t THcBCMCurrent::Process( const THaEvData& evdata )
fBCM2avg
=
0
;
fBCM2avg
=
0
;
fBCM4aavg
=
0
;
fBCM4aavg
=
0
;
fBCM4bavg
=
0
;
fBCM4bavg
=
0
;
fBCM
17
avg
=
0
;
fBCM
4c
avg
=
0
;
}
}
else
else
{
{
...
@@ -163,7 +163,7 @@ Int_t THcBCMCurrent::Process( const THaEvData& evdata )
...
@@ -163,7 +163,7 @@ Int_t THcBCMCurrent::Process( const THaEvData& evdata )
fBCM2avg
=
binfo
.
bcm2_current
;
fBCM2avg
=
binfo
.
bcm2_current
;
fBCM4aavg
=
binfo
.
bcm4a_current
;
fBCM4aavg
=
binfo
.
bcm4a_current
;
fBCM4bavg
=
binfo
.
bcm4b_current
;
fBCM4bavg
=
binfo
.
bcm4b_current
;
fBCM
17
avg
=
binfo
.
bcm
17
_current
;
fBCM
4c
avg
=
binfo
.
bcm
4c
_current
;
}
}
switch
(
fBCMIndex
)
switch
(
fBCMIndex
)
...
@@ -180,8 +180,8 @@ Int_t THcBCMCurrent::Process( const THaEvData& evdata )
...
@@ -180,8 +180,8 @@ Int_t THcBCMCurrent::Process( const THaEvData& evdata )
case
BCM4B
:
case
BCM4B
:
fBCMflag
=
(
fBCM4bavg
<
fThreshold
)
?
0
:
1
;
fBCMflag
=
(
fBCM4bavg
<
fThreshold
)
?
0
:
1
;
break
;
break
;
case
BCM
17
:
case
BCM
4C
:
fBCMflag
=
(
fBCM
17
avg
<
fThreshold
)
?
0
:
1
;
fBCMflag
=
(
fBCM
4c
avg
<
fThreshold
)
?
0
:
1
;
break
;
break
;
default:
default:
fBCMflag
=
0
;
fBCMflag
=
0
;
...
@@ -205,7 +205,7 @@ Int_t THcBCMCurrent::GetAvgCurrent( Int_t fevn, BCMInfo &bcminfo )
...
@@ -205,7 +205,7 @@ Int_t THcBCMCurrent::GetAvgCurrent( Int_t fevn, BCMInfo &bcminfo )
bcminfo
.
bcm2_current
=
it
->
second
.
bcm2_current
;
bcminfo
.
bcm2_current
=
it
->
second
.
bcm2_current
;
bcminfo
.
bcm4a_current
=
it
->
second
.
bcm4a_current
;
bcminfo
.
bcm4a_current
=
it
->
second
.
bcm4a_current
;
bcminfo
.
bcm4b_current
=
it
->
second
.
bcm4b_current
;
bcminfo
.
bcm4b_current
=
it
->
second
.
bcm4b_current
;
bcminfo
.
bcm
17
_current
=
it
->
second
.
bcm
17
_current
;
bcminfo
.
bcm
4c
_current
=
it
->
second
.
bcm
4c
_current
;
return
kOK
;
return
kOK
;
}
}
...
@@ -218,7 +218,7 @@ Int_t THcBCMCurrent::GetAvgCurrent( Int_t fevn, BCMInfo &bcminfo )
...
@@ -218,7 +218,7 @@ Int_t THcBCMCurrent::GetAvgCurrent( Int_t fevn, BCMInfo &bcminfo )
bcminfo
.
bcm2_current
=
next
->
second
.
bcm2_current
;
bcminfo
.
bcm2_current
=
next
->
second
.
bcm2_current
;
bcminfo
.
bcm4a_current
=
next
->
second
.
bcm4a_current
;
bcminfo
.
bcm4a_current
=
next
->
second
.
bcm4a_current
;
bcminfo
.
bcm4b_current
=
next
->
second
.
bcm4b_current
;
bcminfo
.
bcm4b_current
=
next
->
second
.
bcm4b_current
;
bcminfo
.
bcm
17
_current
=
next
->
second
.
bcm
17
_current
;
bcminfo
.
bcm
4c
_current
=
next
->
second
.
bcm
4c
_current
;
return
kOK
;
return
kOK
;
}
}
return
kOK
+
1
;
return
kOK
+
1
;
...
...
This diff is collapsed.
Click to expand it.
src/THcBCMCurrent.h
+
4
−
4
View file @
b9e95a69
...
@@ -19,7 +19,7 @@ class THcBCMCurrent : public THaPhysicsModule {
...
@@ -19,7 +19,7 @@ class THcBCMCurrent : public THaPhysicsModule {
virtual
EStatus
Init
(
const
TDatime
&
date
);
virtual
EStatus
Init
(
const
TDatime
&
date
);
virtual
Int_t
Process
(
const
THaEvData
&
);
virtual
Int_t
Process
(
const
THaEvData
&
);
enum
BCMopt
{
BCM1
,
BCM2
,
UNSER
,
BCM4A
,
BCM4B
,
BCM
17
};
enum
BCMopt
{
BCM1
,
BCM2
,
UNSER
,
BCM4A
,
BCM4B
,
BCM
4C
};
private
:
private
:
...
@@ -30,7 +30,7 @@ class THcBCMCurrent : public THaPhysicsModule {
...
@@ -30,7 +30,7 @@ class THcBCMCurrent : public THaPhysicsModule {
Double_t
*
fiBCM2
;
Double_t
*
fiBCM2
;
Double_t
*
fiBCM4a
;
Double_t
*
fiBCM4a
;
Double_t
*
fiBCM4b
;
Double_t
*
fiBCM4b
;
Double_t
*
fiBCM
17
;
Double_t
*
fiBCM
4c
;
Int_t
*
fEvtNum
;
Int_t
*
fEvtNum
;
Int_t
fBCMflag
;
Int_t
fBCMflag
;
...
@@ -39,14 +39,14 @@ class THcBCMCurrent : public THaPhysicsModule {
...
@@ -39,14 +39,14 @@ class THcBCMCurrent : public THaPhysicsModule {
Double_t
fBCM2avg
;
Double_t
fBCM2avg
;
Double_t
fBCM4aavg
;
Double_t
fBCM4aavg
;
Double_t
fBCM4bavg
;
Double_t
fBCM4bavg
;
Double_t
fBCM
17
avg
;
Double_t
fBCM
4c
avg
;
struct
BCMInfo
{
struct
BCMInfo
{
Double_t
bcm1_current
;
Double_t
bcm1_current
;
Double_t
bcm2_current
;
Double_t
bcm2_current
;
Double_t
bcm4a_current
;
Double_t
bcm4a_current
;
Double_t
bcm4b_current
;
Double_t
bcm4b_current
;
Double_t
bcm
17
_current
;
Double_t
bcm
4c
_current
;
};
};
std
::
map
<
Int_t
,
BCMInfo
>
BCMInfoMap
;
std
::
map
<
Int_t
,
BCMInfo
>
BCMInfoMap
;
...
...
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