Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[TDF] Make constant shared_ptrs constant
  • Loading branch information
eguiraud committed Jun 22, 2017
commit 4c1a8cb31ebeaf2e77834901e9e529b8538f0239
12 changes: 6 additions & 6 deletions tree/treeplayer/inc/ROOT/TDFActionHelpers.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public:
};

class CountHelper {
std::shared_ptr<unsigned int> fResultCount;
const std::shared_ptr<unsigned int> fResultCount;
std::vector<Count_t> fCounts;

public:
Expand All @@ -71,7 +71,7 @@ class FillHelper {

std::vector<Buf_t> fBuffers;
std::vector<Buf_t> fWBuffers;
std::shared_ptr<Hist_t> fResultHist;
const std::shared_ptr<Hist_t> fResultHist;
unsigned int fNSlots;
unsigned int fBufSize;
Buf_t fMin;
Expand Down Expand Up @@ -318,7 +318,7 @@ public:
template <typename F, typename T>
class ReduceHelper {
F fReduceFun;
std::shared_ptr<T> fReduceRes;
const std::shared_ptr<T> fReduceRes;
std::vector<T> fReduceObjs;

public:
Expand All @@ -339,7 +339,7 @@ public:
};

class MinHelper {
std::shared_ptr<double> fResultMin;
const std::shared_ptr<double> fResultMin;
std::vector<double> fMins;

public:
Expand All @@ -365,7 +365,7 @@ extern template void MinHelper::Exec(unsigned int, const std::vector<int> &);
extern template void MinHelper::Exec(unsigned int, const std::vector<unsigned int> &);

class MaxHelper {
std::shared_ptr<double> fResultMax;
const std::shared_ptr<double> fResultMax;
std::vector<double> fMaxs;

public:
Expand All @@ -389,7 +389,7 @@ extern template void MaxHelper::Exec(unsigned int, const std::vector<int> &);
extern template void MaxHelper::Exec(unsigned int, const std::vector<unsigned int> &);

class MeanHelper {
std::shared_ptr<double> fResultMean;
const std::shared_ptr<double> fResultMean;
std::vector<Count_t> fCounts;
std::vector<double> fSums;

Expand Down
2 changes: 1 addition & 1 deletion tree/treeplayer/inc/ROOT/TDFInterface.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ protected:
{
}

std::shared_ptr<Proxied> fProxiedPtr;
const std::shared_ptr<Proxied> fProxiedPtr;
std::weak_ptr<TLoopManager> fImplWeakPtr;
};

Expand Down
4 changes: 2 additions & 2 deletions tree/treeplayer/inc/ROOT/TResultProxy.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ class TResultProxy {
template <typename W>
friend TResultProxy<W> TDFDetail::MakeResultProxy(const std::shared_ptr<W> &, const SPTLM_t &);

ShrdPtrBool_t fReadiness =
const ShrdPtrBool_t fReadiness =
std::make_shared<bool>(false); ///< State registered also in the TLoopManager until the event loop is executed
WPTLM_t fImplWeakPtr; ///< Points to the TLoopManager at the root of the functional graph
SPT_t fObjPtr; ///< Shared pointer encapsulating the wrapped result
const SPT_t fObjPtr; ///< Shared pointer encapsulating the wrapped result

/// Triggers the event loop in the TLoopManager instance to which it's associated via the fImplWeakPtr
void TriggerRun();
Expand Down