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
89300e04
Commit
89300e04
authored
4 years ago
by
Philippe Canal
Browse files
Options
Downloads
Patches
Plain Diff
stressEntryList detect if entryList content is completely unexpected
parent
74221da1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/stressEntryList.cxx
+18
-0
18 additions, 0 deletions
test/stressEntryList.cxx
with
18 additions
and
0 deletions
test/stressEntryList.cxx
+
18
−
0
View file @
89300e04
...
@@ -76,6 +76,14 @@ Bool_t Test1(bool fixedCut)
...
@@ -76,6 +76,14 @@ Bool_t Test1(bool fixedCut)
smallchain
->
Draw
(
">>elist_small"
,
cut
,
"entrylist"
);
smallchain
->
Draw
(
">>elist_small"
,
cut
,
"entrylist"
);
TEntryList
*
elist_small
=
(
TEntryList
*
)
gDirectory
->
Get
(
"elist_small"
);
TEntryList
*
elist_small
=
(
TEntryList
*
)
gDirectory
->
Get
(
"elist_small"
);
if
(
fixedCut
&&
elist_small
->
GetN
()
!=
0
)
{
printf
(
"Test1: Cut
\"
Entry$ >= %lld
\"
found entries in the small chain
\n
"
,
smallchain
->
GetEntries
());
return
false
;
}
else
if
(
!
fixedCut
&&
elist_small
->
GetN
()
==
0
)
{
printf
(
"Test1: Cut
\"
x<0 && y>0
\"
found no entries in the small chain
\n
"
);
return
false
;
}
//check if the entry list contains correct entries
//check if the entry list contains correct entries
Int_t
range
=
100
;
Int_t
range
=
100
;
TH1F
*
hx
=
new
TH1F
(
"hx"
,
"hx"
,
range
,
-
range
,
range
);
TH1F
*
hx
=
new
TH1F
(
"hx"
,
"hx"
,
range
,
-
range
,
range
);
...
@@ -111,6 +119,16 @@ Bool_t Test1(bool fixedCut)
...
@@ -111,6 +119,16 @@ Bool_t Test1(bool fixedCut)
//make an entry list for a big chain
//make an entry list for a big chain
bigchain
->
Draw
(
">>elist_big"
,
cut
,
"entrylist"
);
bigchain
->
Draw
(
">>elist_big"
,
cut
,
"entrylist"
);
TEntryList
*
elist_big
=
(
TEntryList
*
)
gDirectory
->
Get
(
"elist_big"
);
TEntryList
*
elist_big
=
(
TEntryList
*
)
gDirectory
->
Get
(
"elist_big"
);
if
(
fixedCut
&&
elist_big
->
GetN
()
!=
smallchain
->
GetEntries
())
{
printf
(
"Test1: Cut
\"
Entry$ >= %lld
\"
did not find the right number of entries in the big chain (expected %lld got %lld
\n
"
,
smallchain
->
GetEntries
(),
smallchain
->
GetEntries
(),
elist_big
->
GetN
());
return
false
;
}
else
if
(
!
fixedCut
&&
elist_big
->
GetN
()
==
0
)
{
printf
(
"Test1: Cut
\"
x<0 && y>0
\"
found no entries in the big chain
\n
"
);
return
false
;
}
//make a small entry list by extracting the lists, corresponding to the trees in
//make a small entry list by extracting the lists, corresponding to the trees in
//the small chain, from the big entry list
//the small chain, from the big entry list
TEntryList
*
list_extracted
=
new
TEntryList
(
"list_extracted"
,
"list_extracted"
);
TEntryList
*
list_extracted
=
new
TEntryList
(
"list_extracted"
,
"list_extracted"
);
...
...
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