File tree 5 files changed +9
-7
lines changed
5 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 17
17
#include " TString.h"
18
18
19
19
#include < algorithm> // std::transform
20
+ #include < cassert>
20
21
#include < string>
21
22
#include < typeinfo>
22
23
#include < vector>
@@ -130,7 +131,12 @@ public:
130
131
// / Slots numbers are used to simplify parallel execution: RDataFrame guarantees that different threads will always
131
132
// / pass different slot values when calling methods concurrently.
132
133
// clang-format on
133
- virtual void SetNSlots (unsigned int nSlots) = 0;
134
+ virtual void SetNSlots (unsigned int nSlots)
135
+ {
136
+ assert (fNSlots == 0 );
137
+ assert (nSlots > 0 );
138
+ fNSlots = nSlots;
139
+ };
134
140
135
141
// / \brief Returns the number of files from which the dataset is constructed
136
142
virtual std::size_t GetNFiles () const { return 0 ; }
Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ public:
173
173
return true ;
174
174
}
175
175
176
- void SetNSlots (unsigned int nSlots)
176
+ void SetNSlots (unsigned int nSlots) final
177
177
{
178
178
fNSlots = nSlots;
179
179
const auto nCols = fColNames .size ();
Original file line number Diff line number Diff line change @@ -48,8 +48,6 @@ public:
48
48
RArraysDS &operator =(RArraysDS &&) = delete ;
49
49
~RArraysDS () final = default ;
50
50
51
- void SetNSlots (unsigned int ) final { }
52
-
53
51
const std::vector<std::string> &GetColumnNames () const final { return fColumnNames ; }
54
52
55
53
bool HasColumn (std::string_view name) const final
Original file line number Diff line number Diff line change @@ -45,8 +45,7 @@ public:
45
45
auto entryRanges (std::move (fEntryRanges )); // empty fEntryRanges
46
46
return entryRanges;
47
47
};
48
- bool SetEntry (unsigned int , ULong64_t) final { return true ;};
49
- void SetNSlots (unsigned int ) final {};
48
+ bool SetEntry (unsigned int , ULong64_t) final { return true ; };
50
49
std::string GetLabel () final {
51
50
return " NonCopiableColumnDS" ;
52
51
}
Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ public:
22
22
RStreamingDS &operator =(RStreamingDS &&) = delete ;
23
23
~RStreamingDS () final = default ;
24
24
25
- void SetNSlots (unsigned int nSlots) final { fNSlots = nSlots; }
26
25
const std::vector<std::string> &GetColumnNames () const final { return fColumnNames ; }
27
26
bool HasColumn (std::string_view name) const final { return std::string (name) == " ans" ? true : false ; }
28
27
std::string GetTypeName (std::string_view) const final { return " int" ; }
You can’t perform that action at this time.
0 commit comments