<commit_before>// Author: <NAME>, <NAME>  03/2017

/*************************************************************************
 * Copyright (C) 1995-2016, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TDATAFRAME_INTERFACE
#define ROOT_TDATAFRAME_INTERFACE

#include "ROOT/TActionResultProxy.hxx"
#include "ROOT/TDFNodes.hxx"
#include "ROOT/TDFOperations.hxx"
#include "ROOT/TDFUtils.hxx"
#include "TClass.h"
#include "TH1.h" // For Histo actions
#include "TH2.h" // For Histo actions
#include "TH3.h" // For Histo actions
#include "TInterpreter.h"
#include "TProfile.h"   // For Histo actions
#include "TProfile2D.h" // For Histo actions
#include "TRegexp.h"

#include <initializer_list>
#include <memory>
#include <string>
#include <typeinfo>
#include <type_traits> // is_same, enable_if

namespace ROOT {

namespace Detail {
struct TDataFrameGuessedType {
};
}

namespace Internal {

// TODO move into TDFUtils, for now it would cause a circular dependency on TActionResultProxy
template <typename TDFNode, typename ActionType, typename BranchType, typename ActionResultType>
ROOT::Experimental::TActionResultProxy<ActionResultType> CallCreateAction(TDFNode *node, const BranchNames_t &bl,
                                                                          const std::shared_ptr<ActionResultType> &r,
                                                                          BranchType *)
{
   return node->template CreateAction<ActionType, BranchType, ActionResultType>(bl, r, nullptr);
}
} // namespace Internal

namespace Experimental {

// forward declarations
class TDataFrame;

/**
* \class ROOT::Experimental::TDataFrameInterface
* \ingroup dataframe
* \brief The public interface to the TDataFrame federation of classes: TDataFrameImpl, TDataFrameFilter,
* TDataFrameBranch
* \tparam T One of the TDataFrameImpl, TDataFrameFilter, TDataFrameBranch classes. The user never specifies this type
* manually.
*/
template <typename Proxied>
class TDataFrameInterface {
   friend std::string cling::printValue(ROOT::Experimental::TDataFrame *tdf); // For a nice printing at the prompt
   template <typename T>
   friend class TDataFrameInterface;
   template <typename TDFNode, typename ActionType, typename BranchType, typename ActionResultType><commit_msg>[TDF] Decide to leave CallCreateAction where it is<commit_after>// Author: <NAME>, <NAME>  03/2017

/*************************************************************************
 * Copyright (C) 1995-2016, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TDATAFRAME_INTERFACE
#define ROOT_TDATAFRAME_INTERFACE

#include "ROOT/TActionResultProxy.hxx"
#include "ROOT/TDFNodes.hxx"
#include "ROOT/TDFOperations.hxx"
#include "ROOT/TDFUtils.hxx"
#include "TClass.h"
#include "TH1.h" // For Histo actions
#include "TH2.h" // For Histo actions
#include "TH3.h" // For Histo actions
#include "TInterpreter.h"
#include "TProfile.h"   // For Histo actions
#include "TProfile2D.h" // For Histo actions
#include "TRegexp.h"

#include <initializer_list>
#include <memory>
#include <string>
#include <typeinfo>
#include <type_traits> // is_same, enable_if

namespace ROOT {

namespace Detail {
struct TDataFrameGuessedType {
};
}

namespace Internal {

template <typename TDFNode, typename ActionType, typename BranchType, typename ActionResultType>
ROOT::Experimental::TActionResultProxy<ActionResultType> CallCreateAction(TDFNode *node, const BranchNames_t &bl,
                                                                          const std::shared_ptr<ActionResultType> &r,
                                                                          BranchType *)
{
   return node->template CreateAction<ActionType, BranchType, ActionResultType>(bl, r, nullptr);
}
} // namespace Internal

namespace Experimental {

// forward declarations
class TDataFrame;

/**
* \class ROOT::Experimental::TDataFrameInterface
* \ingroup dataframe
* \brief The public interface to the TDataFrame federation of classes: TDataFrameImpl, TDataFrameFilter,
* TDataFrameBranch
* \tparam T One of the TDataFrameImpl, TDataFrameFilter, TDataFrameBranch classes. The user never specifies this type
* manually.
*/
template <typename Proxied>
class TDataFrameInterface {
   friend std::string cling::printValue(ROOT::Experimental::TDataFrame *tdf); // For a nice printing at the prompt
   template <typename T>
   friend class TDataFrameInterface;
   template <typename TDFNode, typename ActionType, typename BranchType, typename ActionResultType>
{'fraction_non_alphanumeric': 0.1427206725257929, 'fraction_numerical': 0.006878104700038212, 'mean_word_length': 3.0362374710871243, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2883781', 'n_tokens_mistral': 1405, 'n_tokens_neox': 1341, 'n_words': 396}