Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Root
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
cxwx
Root
Commits
b0db8053
Commit
b0db8053
authored
6 years ago
by
Danilo Piparo
Browse files
Options
Downloads
Patches
Plain Diff
[DF][NFC] Add more comments to histo/profile models code and tests
parent
6f2686a3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tree/dataframe/src/RDFHistoModels.cxx
+5
-0
5 additions, 0 deletions
tree/dataframe/src/RDFHistoModels.cxx
tree/dataframe/test/dataframe_histomodels.cxx
+6
-0
6 additions, 0 deletions
tree/dataframe/test/dataframe_histomodels.cxx
with
11 additions
and
0 deletions
tree/dataframe/src/RDFHistoModels.cxx
+
5
−
0
View file @
b0db8053
...
...
@@ -313,6 +313,11 @@ TProfile2DModel::TProfile2DModel(const char *name, const char *title, int nbinsx
std
::
shared_ptr
<::
TProfile2D
>
TProfile2DModel
::
GetProfile
()
const
{
// In this method we decide how to build the profile based on the input given in the constructor of the model.
// There are 4 cases:
// 1. No custom binning for both the x and y axes: we return a profile with equally spaced binning
// 2./3. Custom binning only for x(y): we return a profile with custom binning for x(y) and equally spaced for y(x).
// 4. No custom binning: we return a profile with equally spaced bins on both axes
auto
xEdgesEmpty
=
fBinXEdges
.
empty
();
auto
yEdgesEmpty
=
fBinYEdges
.
empty
();
std
::
shared_ptr
<::
TProfile2D
>
prof
;
...
...
This diff is collapsed.
Click to expand it.
tree/dataframe/test/dataframe_histomodels.cxx
+
6
−
0
View file @
b0db8053
...
...
@@ -18,6 +18,12 @@ void CheckBins(const TAxis *axis, const COLL &v)
EXPECT_DOUBLE_EQ
(
axis
->
GetBinUpEdge
(
nBinsm1
),
(
double
)
v
[
nBinsm1
]);
}
/*
These tests help us checking that the binning of the final histograms/profiles is correct.
We test construction of models with full blown histos/profiles and also using constructors
that mimick the ones of those very classes.
*/
TEST
(
RDataFrameHistoModels
,
Histo1D
)
{
ROOT
::
RDataFrame
tdf
(
10
);
...
...
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