Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:35

0001 // Author: Enrico Guiraud, Danilo Piparo CERN  09/2018
0002 
0003 /*************************************************************************
0004  * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers.               *
0005  * All rights reserved.                                                  *
0006  *                                                                       *
0007  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0008  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0009  *************************************************************************/
0010 
0011 #ifndef ROOT_RRANGEBASE
0012 #define ROOT_RRANGEBASE
0013 
0014 #include "ROOT/RDF/RNodeBase.hxx"
0015 #include "RtypesCore.h"
0016 
0017 #include <unordered_map>
0018 
0019 namespace ROOT {
0020 namespace Internal {
0021 namespace RDF {
0022 namespace GraphDrawing {
0023 class GraphNode;
0024 }
0025 } // namespace RDF
0026 } // namespace Internal
0027 
0028 namespace Detail {
0029 namespace RDF {
0030 
0031 class RLoopManager;
0032 
0033 class RRangeBase : public RNodeBase {
0034 protected:
0035    unsigned int fStart;
0036    unsigned int fStop;
0037    unsigned int fStride;
0038    Long64_t fLastCheckedEntry{-1};
0039    bool fLastResult{true};
0040    ULong64_t fNProcessedEntries{0};
0041    bool fHasStopped{false};    ///< True if the end of the range has been reached
0042    const unsigned int fNSlots; ///< Number of thread slots used by this node, inherited from parent node.
0043    std::unordered_map<std::string, std::shared_ptr<RRangeBase>> fVariedRanges;
0044 
0045 public:
0046    RRangeBase(RLoopManager *implPtr, unsigned int start, unsigned int stop, unsigned int stride,
0047               const unsigned int nSlots, const std::vector<std::string> &prevVariations);
0048 
0049    RRangeBase &operator=(const RRangeBase &) = delete;
0050    ~RRangeBase() override;
0051 
0052    void InitNode();
0053 };
0054 
0055 } // ns RDF
0056 } // ns Detail
0057 } // namespace ROOT
0058 
0059 #endif // ROOT_RRANGEBASE