<commit_before>/// \file TDrawingOptsReader.cxx
/// \ingroup Gpad ROOT7
/// \author <NAME> <<EMAIL>>
/// \date 2017-09-26
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
/// is welcome!

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

#include "TDrawingOptsReader.hxx" // in src/

#include <ROOT/TColor.hxx>
#include <ROOT/TLogger.hxx>

#include <TROOT.h>
#include <TSystem.h>

using namespace ROOT::Experimental;
using namespace ROOT::Experimental::Internal;

namespace {
}

TDrawingOptsReader::Attrs_t TDrawingOptsReader::ReadDefaults()
{
   Attrs_t ret;
   TDrawingOptsReader reader(ret);
   reader.AddFromStyleFile(std::string(TROOT::GetEtcDir()) + "/system.rootstylerc");
   reader.AddFromStyleFile(std::string(gSystem->GetHomeDirectory()) + "/.rootstylerc");
   reader.AddFromStyleFile(".rootstylerc");
   return ret;
}

ROOT::Experimental::TColor TDrawingOptsReader::ParseColor(std::string_view /*attr*/, const TColor &/*deflt*/)
{
   // TODO: implement!
   return ROOT::Experimental::TColor::kBlack;
}

long long TDrawingOptsReader::ParseInt(std::string_view /*attr*/, long long /*deflt*/,
   std::vector<std::string_view> /*opts*/ /*= {}*/)<commit_msg>Silence "unused private member" by providing rudimentary ParseColor().<commit_after>/// \file TDrawingOptsReader.cxx
/// \ingroup Gpad ROOT7
/// \author <NAME> <<EMAIL>>
/// \date 2017-09-26
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
/// is welcome!

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

#include "TDrawingOptsReader.hxx" // in src/

#include <ROOT/TColor.hxx>
#include <ROOT/TLogger.hxx>

#include <TROOT.h>
#include <TSystem.h>

using namespace ROOT::Experimental;
using namespace ROOT::Experimental::Internal;

namespace {
}

TDrawingOptsReader::Attrs_t TDrawingOptsReader::ReadDefaults()
{
   Attrs_t ret;
   TDrawingOptsReader reader(ret);
   reader.AddFromStyleFile(std::string(TROOT::GetEtcDir()) + "/system.rootstylerc");
   reader.AddFromStyleFile(std::string(gSystem->GetHomeDirectory()) + "/.rootstylerc");
   reader.AddFromStyleFile(".rootstylerc");
   return ret;
}

ROOT::Experimental::TColor TDrawingOptsReader::ParseColor(std::string_view attr, const TColor &deflt)
{
   auto iAttr = fAttrs.find(std::string(attr);
   if (iAttr == fAttrs.end())
      return deflt;
   return ROOT::Experimental::TColor::kBlack;
}

long long TDrawingOptsReader::ParseInt(std::string_view /*attr*/, long long /*deflt*/,
   std::vector<std::string_view> /*opts*/ /*= {}*/)
{'fraction_non_alphanumeric': 0.2119148936170213, 'fraction_numerical': 0.010212765957446808, 'mean_word_length': 3.143360752056404, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 25, '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': '4879916', 'n_tokens_mistral': 1040, 'n_tokens_neox': 998, 'n_words': 223}