Logo ROOT  
Reference Guide
RColumnModel.hxx
Go to the documentation of this file.
1/// \file ROOT/RColumnModel.hxx
2/// \ingroup NTuple ROOT7
3/// \author Jakob Blomer <jblomer@cern.ch>
4/// \date 2018-10-09
5/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6/// is welcome!
7
8/*************************************************************************
9 * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
10 * All rights reserved. *
11 * *
12 * For the licensing terms see $ROOTSYS/LICENSE. *
13 * For the list of contributors see $ROOTSYS/README/CREDITS. *
14 *************************************************************************/
15
16#ifndef ROOT7_RColumnModel
17#define ROOT7_RColumnModel
18
19#include <ROOT/RStringView.hxx>
20
21#include <string>
22
23namespace ROOT {
24namespace Experimental {
25
26// clang-format off
27/**
28\class ROOT::Experimental::EColumnType
29\ingroup NTuple
30\brief The available trivial, native content types of a column
31
32More complex types, such as classes, get translated into columns of such simple types by the RField.
33New types need to be accounted for in RColumnElementBase::Generate() and RColumnElementBase::GetBitsOnStorage(), too.
34When changed, remember to update
35 - RColumnElement::Generate()
36 - RColumnElement::GetBitsOnStorage()
37 - RColumnElement::GetTypeName()
38 - RColumnElement template specializations / packing & unpacking
39 - If necessary, endianess handling for the packing + unit test in ntuple_endian
40 - RNTupleSerializer::[Des|S]erializeColumnType
41*/
42// clang-format on
43enum class EColumnType {
44 kUnknown = 0,
45 // type for root columns of (nested) collections; 32bit integers that count relative to the current cluster
46 kIndex,
47 // 64 bit column that uses the lower 32bits as kIndex and the higher 32bits as a dispatch tag; used, e.g.,
48 // in order to serialize std::variant
49 kSwitch,
50 kByte,
51 kChar,
52 kBit,
53 kReal64,
55 kReal32,
56 kReal16,
57 kInt64,
58 kInt32,
59 kInt16,
60 kInt8,
61 kMax,
62};
63
64// clang-format off
65/**
66\class ROOT::Experimental::RColumnModel
67\ingroup NTuple
68\brief Holds the static meta-data of an RNTuple column
69*/
70// clang-format on
72private:
75
76public:
79 RColumnModel(EColumnType type, bool isSorted) : fType(type), fIsSorted(isSorted) {}
80
81 EColumnType GetType() const { return fType; }
82 bool GetIsSorted() const { return fIsSorted; }
83
84 bool operator ==(const RColumnModel &other) const {
85 return (fType == other.fType) && (fIsSorted == other.fIsSorted);
86 }
87 bool operator!=(const RColumnModel &other) const { return !(other == *this); }
88};
89
90} // namespace Experimental
91} // namespace ROOT
92
93#endif
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
@ kUnknown
Definition: TStructNode.h:19
Holds the static meta-data of an RNTuple column.
bool operator!=(const RColumnModel &other) const
RColumnModel(EColumnType type, bool isSorted)
bool operator==(const RColumnModel &other) const
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.