Project
Loading...
Searching...
No Matches
AnalysisHelpers.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
15
16#include <ROOT/RDataFrame.hxx>
17#include <ROOT/RArrowDS.hxx>
18
19using namespace ROOT::RDF;
20
21namespace o2
22{
23namespace analysis
24{
25
26ROOT::RDataFrame doSingleLoopOn(std::unique_ptr<framework::TableConsumer>& input)
27{
28 auto flat = std::make_unique<RArrowDS>(input->asArrowTable(), std::vector<std::string>{});
29 ROOT::RDataFrame rdf(std::move(flat));
30 return rdf;
31}
32
33ROOT::RDataFrame doSelfCombinationsWith(std::unique_ptr<framework::TableConsumer>& input, std::string name, std::string grouping)
34{
35 auto table = input->asArrowTable();
37 auto left = std::make_unique<RArrowDS>(table, std::vector<std::string>{});
38 auto right = std::make_unique<RArrowDS>(table, std::vector<std::string>{});
39 auto combined = std::make_unique<RCombinedDS>(std::move(left), std::move(right), std::make_unique<Index>(grouping, true, BlockCombinationRule::StrictlyUpper), name + "_", name + "bar_");
40
41 ROOT::RDataFrame rdf(std::move(combined));
42 return rdf;
43}
44
45} // namespace analysis
46} // namespace o2
GLuint const GLchar * name
Definition glcorearb.h:781
GLdouble GLdouble right
Definition glcorearb.h:4077
ROOT::RDataFrame doSelfCombinationsWith(std::unique_ptr< framework::TableConsumer > &input, std::string name="p", std::string grouping="eventID")
ROOT::RDataFrame doSingleLoopOn(std::unique_ptr< framework::TableConsumer > &input)
Do a single loop on all the entries of the input table.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...