public void RunNestedConcat() { const int numberOfIter = 10; var rootFile1 = TestUtils.CreateFileOfInt(numberOfIter); var proxyFile1 = TestUtils.GenerateROOTProxy(rootFile1, "dude"); ntuple._gProxyFile = proxyFile1.FullName; var q1 = new SimpleTTreeExecutorQueriable<TestNtupe>(new[] { rootFile1 }, "dude", typeof(ntuple)); var rootFile2 = TestUtils.CreateFileOfVectorDouble(numberOfIter); var proxyFile2 = TestUtils.GenerateROOTProxy(rootFile2, "dude"); ntuple2._gProxyFile = proxyFile2.FullName; var q2 = new SimpleTTreeExecutorQueriable<TestNtupeArrD>(new[] { rootFile2 }, "dude", typeof(ntuple2)); var dude = q2.SelectMany(e => e.myvectorofdouble).Select(i => (int)1).Concat(q1.Select(eb => (int)1)).Count(); Assert.AreEqual(numberOfIter * 10 + numberOfIter, dude); }
public void RunSimpleConcatTwoSourceAsFilesDifferentQueries() { const int numberOfIter = 10; var rootFile1 = TestUtils.CreateFileOfInt(numberOfIter); var proxyFile1 = TestUtils.GenerateROOTProxy(rootFile1, "dude"); ntuple._gProxyFile = proxyFile1.FullName; var q1 = new SimpleTTreeExecutorQueriable<TestNtupe>(new[] { rootFile1 }, "dude", typeof(ntuple)); var rootFile2 = TestUtils.CreateFileOfVectorDouble(numberOfIter); var proxyFile2 = TestUtils.GenerateROOTProxy(rootFile2, "dude"); ntuple2._gProxyFile = proxyFile2.FullName; var q2 = new SimpleTTreeExecutorQueriable<TestNtupeArrD>(new[] { rootFile2 }, "dude", typeof(ntuple2)); var dude = q2.SelectMany(e => e.myvectorofdouble).Select(i => (int)1).Concat(q1.Select(e => (int)1)).AsTTree(); foreach (var f in dude) { Console.WriteLine(f.FullName); } Assert.AreEqual(2, dude.Length); Assert.AreNotEqual(dude[0].Name, dude[1].Name); }