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
b039f744
Commit
b039f744
authored
12 years ago
by
Stephen A. Wood
Browse files
Options
Downloads
Patches
Plain Diff
Retrieve a few variables in THcDriftChamber with DBRequest/LoadValues
parent
bd67b2c1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/THcDriftChamber.cxx
+17
-24
17 additions, 24 deletions
src/THcDriftChamber.cxx
with
17 additions
and
24 deletions
src/THcDriftChamber.cxx
+
17
−
24
View file @
b039f744
...
@@ -60,18 +60,15 @@ void THcDriftChamber::Setup(const char* name, const char* description)
...
@@ -60,18 +60,15 @@ void THcDriftChamber::Setup(const char* name, const char* description)
prefix
[
0
]
=
tolower
(
app
->
GetName
()[
0
]);
prefix
[
0
]
=
tolower
(
app
->
GetName
()[
0
]);
prefix
[
1
]
=
'\0'
;
prefix
[
1
]
=
'\0'
;
strcpy
(
parname
,
prefix
);
DBRequest
list
[]
=
{
strcat
(
parname
,
name
);
// Append "dc"
{
"dc_num_planes"
,
&
fNPlanes
,
kInt
},
Int_t
plen
=
strlen
(
parname
);
{
"dc_num_chambers"
,
&
fNChambers
,
kDouble
},
cout
<<
"parname="
<<
parname
<<
endl
;
{
0
}
};
// Get number of planes and number wires for each plane
gHcParms
->
LoadParmValues
((
DBRequest
*
)
&
list
,
prefix
);
strcat
(
parname
,
"_num_planes"
);
fNPlanes
=
*
(
Int_t
*
)
gHcParms
->
Find
(
parname
)
->
GetValuePointer
();
cout
<<
"Drift Chambers: "
<<
fNPlanes
<<
" planes in "
<<
fNChambers
<<
" chambers"
<<
endl
;
parname
[
plen
]
=
'\0'
;
strcat
(
parname
,
"_num_chambers"
);
fNChambers
=
*
(
Int_t
*
)
gHcParms
->
Find
(
parname
)
->
GetValuePointer
();
fPlaneNames
=
new
char
*
[
fNPlanes
];
fPlaneNames
=
new
char
*
[
fNPlanes
];
...
@@ -172,22 +169,18 @@ Int_t THcDriftChamber::ReadDatabase( const TDatime& date )
...
@@ -172,22 +169,18 @@ Int_t THcDriftChamber::ReadDatabase( const TDatime& date )
prefix
[
1
]
=
'\0'
;
prefix
[
1
]
=
'\0'
;
strcpy
(
parname
,
prefix
);
strcat
(
parname
,
"dc"
);
Int_t
plen
=
strlen
(
parname
);
// Get number of planes and number wires for each plane
strcat
(
parname
,
"_num_planes"
);
fNPlanes
=
*
(
Int_t
*
)
gHcParms
->
Find
(
parname
)
->
GetValuePointer
();
parname
[
plen
]
=
'\0'
;
strcat
(
parname
,
"_nrwire"
);
fNWires
=
new
Int_t
[
fNPlanes
];
fNWires
=
new
Int_t
[
fNPlanes
];
Int_t
*
p
=
(
Int_t
*
)
gHcParms
->
Find
(
parname
)
->
GetValuePointer
();
DBRequest
list
[]
=
{
{
"dc_nrwire"
,
fNWires
,
kInt
,
fNPlanes
},
{
0
}
};
gHcParms
->
LoadParmValues
((
DBRequest
*
)
&
list
,
prefix
);
cout
<<
"Plane counts:"
;
for
(
Int_t
i
=
0
;
i
<
fNPlanes
;
i
++
)
{
for
(
Int_t
i
=
0
;
i
<
fNPlanes
;
i
++
)
{
fNWires
[
i
]
=
p
[
i
];
cout
<<
" "
<<
fNWires
[
i
];
}
}
cout
<<
endl
;
fIsInit
=
true
;
fIsInit
=
true
;
...
...
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