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
98a27e68
Commit
98a27e68
authored
8 years ago
by
Jure Bericic
Committed by
Stephen A. Wood
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add missing includes. Use ROOT for string maipulation.
parent
30f7a787
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/THcTrigApp.cxx
+3
-1
3 additions, 1 deletion
src/THcTrigApp.cxx
src/THcTrigDet.cxx
+19
-14
19 additions, 14 deletions
src/THcTrigDet.cxx
with
22 additions
and
15 deletions
src/THcTrigApp.cxx
+
3
−
1
View file @
98a27e68
...
...
@@ -46,6 +46,8 @@ All the parameters read by this apparatus are prefixed with the returned string.
#include
"THcTrigApp.h"
#include
<algorithm>
#include
"TDatime.h"
#include
"THcGlobals.h"
...
...
@@ -59,7 +61,7 @@ THcTrigApp::THcTrigApp(const char* name, const char* description)
{
// Construct the kwPrefix here. Better place would be in `Setup` method.
string
kwPrefix
=
name
;
transform
(
kwPrefix
.
begin
(),
kwPrefix
.
end
(),
kwPrefix
.
begin
(),
::
tolower
);
std
::
transform
(
kwPrefix
.
begin
(),
kwPrefix
.
end
(),
kwPrefix
.
begin
(),
::
tolower
);
fKwPrefix
=
kwPrefix
;
}
...
...
This diff is collapsed.
Click to expand it.
src/THcTrigDet.cxx
+
19
−
14
View file @
98a27e68
...
...
@@ -58,7 +58,12 @@ Note: not yet finalized!
#include
"THcTrigDet.h"
#include
<algorithm>
#include
<iostream>
#include
<stdexcept>
#include
"TDatime.h"
#include
"TString.h"
#include
"THaApparatus.h"
#include
"THaEvData.h"
...
...
@@ -107,7 +112,7 @@ THaAnalysisObject::EStatus THcTrigDet::Init(const TDatime& date) {
// Fill in detector map.
string
EngineDID
=
string
(
GetApparatus
()
->
GetName
()).
substr
(
0
,
1
)
+
GetName
();
transform
(
EngineDID
.
begin
(),
EngineDID
.
end
(),
EngineDID
.
begin
(),
::
toupper
);
std
::
transform
(
EngineDID
.
begin
(),
EngineDID
.
end
(),
EngineDID
.
begin
(),
::
toupper
);
if
(
gHcDetectorMap
->
FillMap
(
fDetMap
,
EngineDID
.
c_str
())
<
0
)
{
static
const
char
*
const
here
=
"Init()"
;
Error
(
Here
(
here
),
"Error filling detectormap for %s."
,
EngineDID
.
c_str
());
...
...
@@ -153,7 +158,7 @@ Int_t THcTrigDet::Decode(const THaEvData& evData) {
void
THcTrigDet
::
Setup
(
const
char
*
name
,
const
char
*
description
)
{
// Prefix for parameters in `param` file.
string
kwPrefix
=
string
(
GetApparatus
()
->
GetName
())
+
"_"
+
name
;
transform
(
kwPrefix
.
begin
(),
kwPrefix
.
end
(),
kwPrefix
.
begin
(),
::
tolower
);
std
::
transform
(
kwPrefix
.
begin
(),
kwPrefix
.
end
(),
kwPrefix
.
begin
(),
::
tolower
);
fKwPrefix
=
kwPrefix
;
}
...
...
@@ -185,27 +190,27 @@ Int_t THcTrigDet::DefineVariables(THaAnalysisObject::EMode mode) {
std
::
vector
<
RVarDef
>
vars
;
// Push the variable names for ADC channels.
std
::
vector
<
std
::
s
tring
>
var
Nam
esAdc
(
fNumAdc
);
std
::
vector
<
std
::
s
tring
>
var
Titl
esAdc
(
fNumAdc
);
std
::
vector
<
TS
tring
>
var
Titl
esAdc
(
fNumAdc
);
std
::
vector
<
TS
tring
>
var
Nam
esAdc
(
fNumAdc
);
for
(
int
i
=
0
;
i
<
fNumAdc
;
++
i
)
{
varNamesAdc
.
at
(
i
)
=
"fAdcVals["
+
to_string
(
i
)
+
"]"
;
varNamesAdc
.
at
(
i
)
=
TString
::
Format
(
"fAdcVals[%d]"
,
i
)
;
varTitlesAdc
.
at
(
i
)
=
fAdcNames
.
at
(
i
)
+
"_adc"
;
vars
.
push_back
({
varTitlesAdc
.
at
(
i
).
c_str
(),
varTitlesAdc
.
at
(
i
).
c_str
(),
varNamesAdc
.
at
(
i
).
c_str
()
varTitlesAdc
.
at
(
i
).
Data
(),
varTitlesAdc
.
at
(
i
).
Data
(),
varNamesAdc
.
at
(
i
).
Data
()
});
}
// Push the variable names for TDC channels.
std
::
vector
<
std
::
s
tring
>
var
Nam
esTdc
(
fNumTdc
);
std
::
vector
<
std
::
s
tring
>
var
Titl
esTdc
(
fNumTdc
);
std
::
vector
<
TS
tring
>
var
Titl
esTdc
(
fNumTdc
);
std
::
vector
<
TS
tring
>
var
Nam
esTdc
(
fNumTdc
);
for
(
int
i
=
0
;
i
<
fNumTdc
;
++
i
)
{
varNamesTdc
.
at
(
i
)
=
"fTdcVals["
+
to_string
(
i
)
+
"]"
;
varNamesTdc
.
at
(
i
)
=
TString
::
Format
(
"fTdcVals[%d]"
,
i
)
;
varTitlesTdc
.
at
(
i
)
=
fTdcNames
.
at
(
i
)
+
"_tdc"
;
vars
.
push_back
({
varTitlesTdc
.
at
(
i
).
c_str
(),
varTitlesTdc
.
at
(
i
).
c_str
(),
varNamesTdc
.
at
(
i
).
c_str
()
varTitlesTdc
.
at
(
i
).
Data
(),
varTitlesTdc
.
at
(
i
).
Data
(),
varNamesTdc
.
at
(
i
).
Data
()
});
}
...
...
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