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
0b0dfd3a
Commit
0b0dfd3a
authored
5 years ago
by
Jakob Blomer
Committed by
Axel Naumann
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[forest] add possibility to print different types of information in RInputForest::GetInfo()
parent
d16f5b47
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/forest/v7/inc/ROOT/RForest.hxx
+9
-1
9 additions, 1 deletion
tree/forest/v7/inc/ROOT/RForest.hxx
tree/forest/v7/src/RForest.cxx
+15
-6
15 additions, 6 deletions
tree/forest/v7/src/RForest.cxx
with
24 additions
and
7 deletions
tree/forest/v7/inc/ROOT/RForest.hxx
+
9
−
1
View file @
0b0dfd3a
...
...
@@ -71,6 +71,14 @@ public:
}
// namespace Detail
/**
* Listing of the different options that can be returned by RInputForest::GetInfo()
*/
enum
class
EForestInfo
{
kSummary
,
// Forest name, description, number of entries
};
// clang-format off
/**
\class ROOT::Experimental::RInputForest
...
...
@@ -120,7 +128,7 @@ public:
ForestSize_t
GetNEntries
()
{
return
fNEntries
;
}
std
::
string
GetInfo
();
std
::
string
GetInfo
(
const
EForestInfo
what
=
EForestInfo
::
kSummary
);
/// Analogous to Fill(), fills the default entry of the model. Returns false at the end of the forest.
/// On I/O errors, raises an expection.
...
...
This diff is collapsed.
Click to expand it.
tree/forest/v7/src/RForest.cxx
+
15
−
6
View file @
0b0dfd3a
...
...
@@ -82,14 +82,23 @@ std::unique_ptr<ROOT::Experimental::RInputForest> ROOT::Experimental::RInputFore
return
std
::
make_unique
<
RInputForest
>
(
std
::
make_unique
<
Detail
::
RPageSourceRoot
>
(
forestName
,
storage
));
}
std
::
string
ROOT
::
Experimental
::
RInputForest
::
GetInfo
()
{
std
::
string
ROOT
::
Experimental
::
RInputForest
::
GetInfo
(
const
EForestInfo
what
)
{
std
::
ostringstream
os
;
auto
name
=
fSource
->
GetDescriptor
().
GetName
();
os
<<
"****************************** FOREST ******************************"
<<
std
::
endl
<<
"* Name: "
<<
name
<<
std
::
setw
(
57
-
name
.
length
())
<<
"*"
<<
std
::
endl
<<
"* Entries: "
<<
std
::
setw
(
10
)
<<
fNEntries
<<
std
::
setw
(
47
)
<<
"*"
<<
std
::
endl
<<
"********************************************************************"
<<
std
::
endl
;
return
os
.
str
();
switch
(
what
)
{
case
EForestInfo
::
kSummary
:
os
<<
"****************************** FOREST ******************************"
<<
std
::
endl
<<
"* Name: "
<<
name
<<
std
::
setw
(
57
-
name
.
length
())
<<
"*"
<<
std
::
endl
<<
"* Entries: "
<<
std
::
setw
(
10
)
<<
fNEntries
<<
std
::
setw
(
47
)
<<
"*"
<<
std
::
endl
<<
"********************************************************************"
<<
std
::
endl
;
return
os
.
str
();
default:
// Unhandled case, internal error
assert
(
false
);
}
// Never here
return
""
;
}
//------------------------------------------------------------------------------
...
...
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