Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 <string_view>
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; offsets are relative to the current cluster
48 // 96 bit column that is a pair of a kIndex64 and a 32bit dispatch tag to a column ID;
49 // used to serialize std::variant.
50 kSwitch,
51 kByte,
52 kChar,
53 kBit,
54 kReal64,
55 kReal32,
56 kReal16,
57 kInt64,
58 kUInt64,
59 kInt32,
60 kUInt32,
61 kInt16,
62 kUInt16,
63 kInt8,
64 kUInt8,
75 kMax,
76};
77
78// clang-format off
79/**
80\class ROOT::Experimental::RColumnModel
81\ingroup NTuple
82\brief Holds the static meta-data of an RNTuple column
83*/
84// clang-format on
86private:
89
90public:
94 {
95 }
96 RColumnModel(EColumnType type, bool isSorted) : fType(type), fIsSorted(isSorted) {}
97
98 EColumnType GetType() const { return fType; }
99 bool GetIsSorted() const { return fIsSorted; }
100
101 bool operator ==(const RColumnModel &other) const {
102 return (fType == other.fType) && (fIsSorted == other.fIsSorted);
103 }
104 bool operator!=(const RColumnModel &other) const { return !(other == *this); }
105};
106
107} // namespace Experimental
108} // namespace ROOT
109
110#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
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
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...