11void cnt001_basictseq()
13 cout <<
"Loop on sequence of integers from 0 to 10" << endl;
14 for (
auto i :
TSeqI(10)) {
15 cout <<
"Element " << i << endl;
18 cout <<
"Loop on sequence of integers from 3 to 29 in steps of 6" << endl;
19 for (
auto i :
TSeqI(-5, 29, 6)) {
20 cout <<
"Element " << i << endl;
23 cout <<
"Loop backwards on sequence of integers from 50 to 30 in steps of 3" << endl;
24 for (
auto i :
TSeqI(50, 30, -3)) {
25 cout <<
"Element " << i << endl;
28 cout <<
"stl algorithm, for_each" << endl;
30 std::for_each(std::begin(ulSeq),std::end(ulSeq),[](
ULong_t i){cout <<
"For each: " << i <<endl;});
32 cout <<
"Random access: 3rd element is " << ulSeq[2] << endl;
34 cout <<
"Loop using MakeSeq" << endl;
35 for (
auto i :
MakeSeq(1000000000000UL, 1000000000003UL)) {
36 cout <<
"Element " << i << endl;
A pseudo container class which is a generator of indices.
Namespace for new ROOT classes and functions.