Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
RJittedAction.hxx
Go to the documentation of this file.
1 // Author: Enrico Guiraud, Danilo Piparo CERN 09/2018
2 
3 /*************************************************************************
4  * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 #ifndef ROOT_RJITTEDACTION
12 #define ROOT_RJITTEDACTION
13 
14 #include "ROOT/RDF/RActionBase.hxx"
16 #include "RtypesCore.h"
17 
18 #include <memory>
19 
20 class TTreeReader;
21 
22 namespace ROOT {
23 namespace Internal {
24 namespace RDF {
25 
26 // fwd decl
27 namespace GraphDrawing {
28 class GraphNode;
29 } // ns GraphDrawing
30 
31 class RJittedAction : public RActionBase {
32 private:
33  std::unique_ptr<RActionBase> fConcreteAction;
34 
35 public:
36  RJittedAction(RLoopManager &lm);
37  ~RJittedAction() { fLoopManager->Deregister(this); }
38 
39  void SetAction(std::unique_ptr<RActionBase> a) { fConcreteAction = std::move(a); }
40 
41  void Run(unsigned int slot, Long64_t entry) final;
42  void Initialize() final;
43  void InitSlot(TTreeReader *r, unsigned int slot) final;
44  void TriggerChildrenCount() final;
45  void FinalizeSlot(unsigned int) final;
46  void Finalize() final;
47  void *PartialUpdate(unsigned int slot) final;
48  bool HasRun() const final;
49  void SetHasRun() final;
50  void ClearValueReaders(unsigned int slot) final;
51 
52  std::shared_ptr<GraphDrawing::GraphNode> GetGraph();
53 };
54 
55 } // ns RDF
56 } // ns Internal
57 } // ns ROOT
58 
59 #endif // ROOT_RJITTEDACTION