<commit_before>// Author: <NAME>, <NAME> CERN  12/2016

/*************************************************************************
 * 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.             *
 *************************************************************************/

/**
  \defgroup dataframe Data Frame
The ROOT Data Frame allows to analyse data stored in TTrees with a high level interface.
*/

#ifndef ROOT_TDATAFRAME
#define ROOT_TDATAFRAME

#include "ROOT/TActionResultProxy.hxx"
#include "ROOT/TDataFrameInterface.hxx"
#include "ROOT/TDFNodes.hxx"
#include "ROOT/TDFUtils.hxx"
#include "TChain.h"

#include <memory>
#include <iosfwd> // std::ostringstream
#include <stdexcept>
#include <string>
class TDirectory;
class TTree;

R__LOAD_LIBRARY(libTreePlayer)

namespace cling {
// TDataFrame pretty-printing
std::string printValue(ROOT::Experimental::TDataFrame *tdf);
}

namespace ROOT {
namespace Experimental {

class TDataFrame : public TDataFrameInterface<ROOT::Detail::TDataFrameImpl> {
private:
   std::shared_ptr<TTree> fTree;
   void InitTree(TTree &tree, bool ownsTree);

public:
   TDataFrame(const std::string &treeName, const std::string &filenameglob, const BranchNames_t &defaultBranches = {});
   ////////////////////////////////////////////////////////////////////////////
   /// \brief Build the dataframe
   /// \tparam FILENAMESCOLL The type of the file collection: only requirement: must have begin and end.
   /// \param[in] treeName Name of the tree contained in the directory
   /// \param[in] filenamescoll Collection of file names, for example a list of strings.
   /// \param[in] defaultBranches Collection of default branches.
   ///
   /// The default branches are looked at in case no branch is specified in the
   /// booking of actions or transformations.
   /// See ROOT::Experimental::TDataFrameInterface for the documentation of the
   /// methods available.
   template <
      typename FILENAMESCOLL,
      typename std::enable_if<ROOT::Internal::TDFTraitsUtils::TIsContainer<FILENAMESCOLL>::fgValue, int>::type = 0>
   TDataFrame(const std::string &treeName, const FILENAMESCOLL &filenamescoll,
              const BranchNames_t &defaultBranches = {});
   TDataFrame(const std::string &treeName, ::TDirectory *dirPtr, const BranchNames_t &defaultBranches = {});
   TDataFrame(TTree &tree, const BranchNames_t &defaultBranches = {});
};

template <typename FILENAMESCOLL,
          typename std::enable_if<ROOT::Internal::TDFTraitsUtils::TIsContainer<FILENAMESCOLL>::fgValue, int>::type>
TDataFrame::TDataFrame(const std::string &treeName, const FILENAMESCOLL &filenamescoll,
                       const BranchNames_t &defaultBranches)
   : TDataFrameInterface<ROOT::Detail::TDataFrameImpl>(
        std::make_shared<ROOT::Detail::TDataFrameImpl>(nullptr, defaultBranches))
{<commit_msg>[TDF] Remove unused members in TDataFrame.hxx<commit_after>// Author: <NAME>, <NAME> CERN  12/2016

/*************************************************************************
 * 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.             *
 *************************************************************************/

/**
  \defgroup dataframe Data Frame
The ROOT Data Frame allows to analyse data stored in TTrees with a high level interface.
*/

#ifndef ROOT_TDATAFRAME
#define ROOT_TDATAFRAME

#include "ROOT/TActionResultProxy.hxx"
#include "ROOT/TDataFrameInterface.hxx"
#include "ROOT/TDFNodes.hxx"
#include "ROOT/TDFUtils.hxx"
#include "TChain.h"

#include <memory>
#include <iosfwd> // std::ostringstream
#include <stdexcept>
#include <string>
class TDirectory;
class TTree;

R__LOAD_LIBRARY(libTreePlayer)

namespace cling {
// TDataFrame pretty-printing
std::string printValue(ROOT::Experimental::TDataFrame *tdf);
}

namespace ROOT {
namespace Experimental {

class TDataFrame : public TDataFrameInterface<ROOT::Detail::TDataFrameImpl> {
public:
   TDataFrame(const std::string &treeName, const std::string &filenameglob, const BranchNames_t &defaultBranches = {});
   ////////////////////////////////////////////////////////////////////////////
   /// \brief Build the dataframe
   /// \tparam FILENAMESCOLL The type of the file collection: only requirement: must have begin and end.
   /// \param[in] treeName Name of the tree contained in the directory
   /// \param[in] filenamescoll Collection of file names, for example a list of strings.
   /// \param[in] defaultBranches Collection of default branches.
   ///
   /// The default branches are looked at in case no branch is specified in the
   /// booking of actions or transformations.
   /// See ROOT::Experimental::TDataFrameInterface for the documentation of the
   /// methods available.
   template <
      typename FILENAMESCOLL,
      typename std::enable_if<ROOT::Internal::TDFTraitsUtils::TIsContainer<FILENAMESCOLL>::fgValue, int>::type = 0>
   TDataFrame(const std::string &treeName, const FILENAMESCOLL &filenamescoll,
              const BranchNames_t &defaultBranches = {});
   TDataFrame(const std::string &treeName, ::TDirectory *dirPtr, const BranchNames_t &defaultBranches = {});
   TDataFrame(TTree &tree, const BranchNames_t &defaultBranches = {});
};

template <typename FILENAMESCOLL,
          typename std::enable_if<ROOT::Internal::TDFTraitsUtils::TIsContainer<FILENAMESCOLL>::fgValue, int>::type>
TDataFrame::TDataFrame(const std::string &treeName, const FILENAMESCOLL &filenamescoll,
                       const BranchNames_t &defaultBranches)
   : TDataFrameInterface<ROOT::Detail::TDataFrameImpl>(
        std::make_shared<ROOT::Detail::TDataFrameImpl>(nullptr, defaultBranches))
{
{'fraction_non_alphanumeric': 0.17034293994525843, 'fraction_numerical': 0.004830140074062148, 'mean_word_length': 3.2431693989071038, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '237386', 'n_tokens_mistral': 1749, 'n_tokens_neox': 1653, 'n_words': 459}