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
971ef74b
Commit
971ef74b
authored
7 years ago
by
Philippe Canal
Browse files
Options
Downloads
Patches
Plain Diff
Finish the addition of TBranchProxy::GetEntries
parent
6e9dc331
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
tree/treeplayer/inc/TBranchProxy.h
+46
-47
46 additions, 47 deletions
tree/treeplayer/inc/TBranchProxy.h
with
46 additions
and
47 deletions
tree/treeplayer/inc/TBranchProxy.h
+
46
−
47
View file @
971ef74b
...
...
@@ -496,18 +496,21 @@ namespace Internal {
template
<
class
T
,
int
d
=
0
>
struct
TArrayType
{
typedef
T
type_t
;
typedef
T
array_t
[
d
];
static
constexpr
int
gSize
=
d
;
};
//____________________________________________
// Helper class for proxy around multi dimension array
template
<
class
T
>
struct
TArrayType
<
T
,
0
>
{
typedef
T
type_t
;
typedef
T
array_t
;
static
constexpr
int
gSize
=
0
;
};
//____________________________________________
// Helper class for proxy around multi dimension array
template
<
class
T
,
int
d
>
struct
TMultiArrayType
{
typedef
typename
T
::
type_t
type_t
;
typedef
typename
T
::
array_t
array_t
[
d
];
static
constexpr
int
gSize
=
d
;
};
//____________________________________________
...
...
@@ -534,6 +537,10 @@ namespace Internal {
if
(
GetWhere
())
std
::
cout
<<
"value? "
<<
*
(
type_t
*
)
GetWhere
()
<<
std
::
endl
;
}
Int_t
GetEntries
()
override
{
return
T
::
gSize
;
}
const
array_t
&
At
(
UInt_t
i
)
{
static
array_t
default_val
;
if
(
!
Read
())
return
default_val
;
...
...
@@ -551,23 +558,21 @@ namespace Internal {
//_____________________________________________________________________________________
// Template of the Concrete Implementation of the branch proxy around TClonesArray of T
template
<
class
T
>
class
TClaImpProxy
:
public
Detail
::
TBranch
Proxy
{
class
TClaImpProxy
:
public
TCla
Proxy
{
public:
void
Print
()
override
{
TBranchProxy
::
Print
();
std
::
cout
<<
"fWhere "
<<
fWhere
<<
std
::
endl
;
if
(
fWhere
)
std
::
cout
<<
"value? "
<<
*
(
T
*
)
GetStart
()
<<
std
::
endl
;
}
// void Print() override {
// TClaProxy::Print();
// }
TClaImpProxy
()
:
T
Branch
Proxy
()
{};
TClaImpProxy
(
TBranchProxyDirector
*
director
,
const
char
*
name
)
:
T
Branch
Proxy
(
director
,
name
)
{};
TClaImpProxy
()
:
T
Cla
Proxy
()
{};
TClaImpProxy
(
TBranchProxyDirector
*
director
,
const
char
*
name
)
:
T
Cla
Proxy
(
director
,
name
)
{};
TClaImpProxy
(
TBranchProxyDirector
*
director
,
const
char
*
top
,
const
char
*
name
)
:
T
Branch
Proxy
(
director
,
top
,
name
)
{};
T
Cla
Proxy
(
director
,
top
,
name
)
{};
TClaImpProxy
(
TBranchProxyDirector
*
director
,
const
char
*
top
,
const
char
*
name
,
const
char
*
data
)
:
T
Branch
Proxy
(
director
,
top
,
name
,
data
)
{};
T
Cla
Proxy
(
director
,
top
,
name
,
data
)
{};
TClaImpProxy
(
TBranchProxyDirector
*
director
,
TBranchProxy
*
parent
,
const
char
*
name
,
const
char
*
top
=
0
,
const
char
*
mid
=
0
)
:
T
Branch
Proxy
(
director
,
parent
,
name
,
top
,
mid
)
{};
T
Cla
Proxy
(
director
,
parent
,
name
,
top
,
mid
)
{};
~
TClaImpProxy
()
override
{};
const
T
&
At
(
UInt_t
i
)
{
...
...
@@ -594,23 +599,21 @@ namespace Internal {
//_________________________________________________________________________________________
// Template of the Concrete Implementation of the branch proxy around an stl container of T
template
<
class
T
>
class
TStlImpProxy
:
public
Detail
::
TBranch
Proxy
{
class
TStlImpProxy
:
public
TStl
Proxy
{
public:
void
Print
()
override
{
TBranchProxy
::
Print
();
std
::
cout
<<
"fWhere "
<<
fWhere
<<
std
::
endl
;
if
(
fWhere
)
std
::
cout
<<
"value? "
<<
*
(
T
*
)
GetStart
()
<<
std
::
endl
;
}
// void Print() override {
// TBranchProxy::Print();
// }
TStlImpProxy
()
:
T
Branch
Proxy
()
{};
TStlImpProxy
(
TBranchProxyDirector
*
director
,
const
char
*
name
)
:
T
Branch
Proxy
(
director
,
name
)
{};
TStlImpProxy
()
:
T
Stl
Proxy
()
{};
TStlImpProxy
(
TBranchProxyDirector
*
director
,
const
char
*
name
)
:
T
Stl
Proxy
(
director
,
name
)
{};
TStlImpProxy
(
TBranchProxyDirector
*
director
,
const
char
*
top
,
const
char
*
name
)
:
T
Branch
Proxy
(
director
,
top
,
name
)
{};
T
Stl
Proxy
(
director
,
top
,
name
)
{};
TStlImpProxy
(
TBranchProxyDirector
*
director
,
const
char
*
top
,
const
char
*
name
,
const
char
*
data
)
:
T
Branch
Proxy
(
director
,
top
,
name
,
data
)
{};
TStlImpProxy
(
TBranchProxyDirector
*
director
,
TBranchProxy
*
parent
,
const
char
*
name
,
const
char
*
top
=
0
,
const
char
*
mid
=
0
)
:
T
Branch
Proxy
(
director
,
parent
,
name
,
top
,
mid
)
{};
T
Stl
Proxy
(
director
,
top
,
name
,
data
)
{};
TStlImpProxy
(
TBranchProxyDirector
*
director
,
Detail
::
TBranchProxy
*
parent
,
const
char
*
name
,
const
char
*
top
=
0
,
const
char
*
mid
=
0
)
:
T
Stl
Proxy
(
director
,
parent
,
name
,
top
,
mid
)
{};
~
TStlImpProxy
()
override
{};
const
T
&
At
(
UInt_t
i
)
{
...
...
@@ -636,25 +639,23 @@ namespace Internal {
//_________________________________________________________________________________________________
// Template of the Concrete Implementation of the branch proxy around an TClonesArray of array of T
template
<
class
T
>
class
TClaArrayProxy
:
public
Detail
::
TBranch
Proxy
{
class
TClaArrayProxy
:
public
TCla
Proxy
{
public:
typedef
typename
T
::
array_t
array_t
;
typedef
typename
T
::
type_t
type_t
;
void
Print
()
override
{
TBranchProxy
::
Print
();
std
::
cout
<<
"fWhere "
<<
fWhere
<<
std
::
endl
;
if
(
fWhere
)
std
::
cout
<<
"value? "
<<
*
(
type_t
*
)
GetStart
()
<<
std
::
endl
;
}
// void Print() override {
// TClaProxy::Print();
// }
TClaArrayProxy
()
:
T
Branch
Proxy
()
{}
TClaArrayProxy
(
TBranchProxyDirector
*
director
,
const
char
*
name
)
:
T
Branch
Proxy
(
director
,
name
)
{};
TClaArrayProxy
()
:
T
Cla
Proxy
()
{}
TClaArrayProxy
(
TBranchProxyDirector
*
director
,
const
char
*
name
)
:
T
Cla
Proxy
(
director
,
name
)
{};
TClaArrayProxy
(
TBranchProxyDirector
*
director
,
const
char
*
top
,
const
char
*
name
)
:
T
Branch
Proxy
(
director
,
top
,
name
)
{};
T
Cla
Proxy
(
director
,
top
,
name
)
{};
TClaArrayProxy
(
TBranchProxyDirector
*
director
,
const
char
*
top
,
const
char
*
name
,
const
char
*
data
)
:
T
Branch
Proxy
(
director
,
top
,
name
,
data
)
{};
TClaArrayProxy
(
TBranchProxyDirector
*
director
,
TBranchProxy
*
parent
,
const
char
*
name
,
const
char
*
top
=
0
,
const
char
*
mid
=
0
)
:
T
Branch
Proxy
(
director
,
parent
,
name
,
top
,
mid
)
{};
T
Cla
Proxy
(
director
,
top
,
name
,
data
)
{};
TClaArrayProxy
(
TBranchProxyDirector
*
director
,
Detail
::
TBranchProxy
*
parent
,
const
char
*
name
,
const
char
*
top
=
0
,
const
char
*
mid
=
0
)
:
T
Cla
Proxy
(
director
,
parent
,
name
,
top
,
mid
)
{};
~
TClaArrayProxy
()
override
{};
/* const */
array_t
*
At
(
UInt_t
i
)
{
...
...
@@ -673,25 +674,23 @@ namespace Internal {
//__________________________________________________________________________________________________
// Template of the Concrete Implementation of the branch proxy around an stl container of array of T
template
<
class
T
>
class
TStlArrayProxy
:
public
Detail
::
TBranch
Proxy
{
class
TStlArrayProxy
:
public
TStl
Proxy
{
public:
typedef
typename
T
::
array_t
array_t
;
typedef
typename
T
::
type_t
type_t
;
void
Print
()
override
{
TBranchProxy
::
Print
();
std
::
cout
<<
"fWhere "
<<
fWhere
<<
std
::
endl
;
if
(
fWhere
)
std
::
cout
<<
"value? "
<<
*
(
type_t
*
)
GetStart
()
<<
std
::
endl
;
}
// void Print() override {
// TBranchProxy::Print();
// }
TStlArrayProxy
()
:
T
Branch
Proxy
()
{}
TStlArrayProxy
(
TBranchProxyDirector
*
director
,
const
char
*
name
)
:
T
Branch
Proxy
(
director
,
name
)
{};
TStlArrayProxy
()
:
T
Stl
Proxy
()
{}
TStlArrayProxy
(
TBranchProxyDirector
*
director
,
const
char
*
name
)
:
T
Stl
Proxy
(
director
,
name
)
{};
TStlArrayProxy
(
TBranchProxyDirector
*
director
,
const
char
*
top
,
const
char
*
name
)
:
T
Branch
Proxy
(
director
,
top
,
name
)
{};
T
Stl
Proxy
(
director
,
top
,
name
)
{};
TStlArrayProxy
(
TBranchProxyDirector
*
director
,
const
char
*
top
,
const
char
*
name
,
const
char
*
data
)
:
T
Branch
Proxy
(
director
,
top
,
name
,
data
)
{};
TStlArrayProxy
(
TBranchProxyDirector
*
director
,
TBranchProxy
*
parent
,
const
char
*
name
,
const
char
*
top
=
0
,
const
char
*
mid
=
0
)
:
T
Branch
Proxy
(
director
,
parent
,
name
,
top
,
mid
)
{};
T
Stl
Proxy
(
director
,
top
,
name
,
data
)
{};
TStlArrayProxy
(
TBranchProxyDirector
*
director
,
Detail
::
TBranchProxy
*
parent
,
const
char
*
name
,
const
char
*
top
=
0
,
const
char
*
mid
=
0
)
:
T
Stl
Proxy
(
director
,
parent
,
name
,
top
,
mid
)
{};
~
TStlArrayProxy
()
override
{};
/* const */
array_t
*
At
(
UInt_t
i
)
{
...
...
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