Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RDFDescription.cxx
Go to the documentation of this file.
1// Author: Ivan Kabadzhov, Enrico Guiraud CERN 01/2022
2
3/*************************************************************************
4 * Copyright (C) 1995-2022, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
12#include <iostream>
13
14namespace ROOT {
15namespace RDF {
16
17RDFDescription::RDFDescription(const std::string &briefDescription, const std::string &fullDescription)
18 : fBriefDescription(briefDescription), fFullDescription(fullDescription){};
19
20RDFDescription::RDFDescription(const std::string &briefDescription, const std::string &fullDescription,
21 unsigned int filecount)
22 : fBriefDescription(briefDescription), fFullDescription(fullDescription), fFileCount(filecount){};
23
24std::string RDFDescription::AsString(bool shortFormat /*= false*/) const
25{
26 if (shortFormat)
27 return fBriefDescription;
28 else
29 return fBriefDescription + "\n\n" + fFullDescription;
30}
31
32void RDFDescription::Print(bool shortFormat /*= false*/) const
33{
34 std::cout << AsString(shortFormat);
35}
36
37std::ostream &operator<<(std::ostream &os, const RDFDescription &description)
38{
39 os << description.AsString();
40 return os;
41}
42
43} // namespace RDF
44} // namespace ROOT
45
46namespace cling {
47//////////////////////////////////////////////////////////////////////////
48/// Print an RDFDescription at the prompt
49std::string printValue(ROOT::RDF::RDFDescription *td)
50{
51 return td->AsString();
52}
53
54} // namespace cling
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
Definition TBuffer.h:399
A DFDescription contains useful information about a given RDataFrame computation graph.
RDFDescription(const std::string &briefDescription, const std::string &fullDescription)
std::string AsString(bool shortFormat=false) const
void Print(bool shortFormat=false) const
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.