This tutorial shows how to implement a custom action. As an example, we build a helper for filling THns.
 
template <typename T, unsigned int NDIM>
public:
 
private:
   std::vector<std::shared_ptr<THn_t>> 
fHistos; 
 
public:
   THnHelper(std::string_view 
name, std::string_view title, std::array<int, NDIM> nbins, std::array<double, NDIM> 
xmins,
 
             std::array<double, NDIM> 
xmax)
   {
         fHistos.emplace_back(std::make_shared<THn_t>(std::string(
name).c_str(), std::string(title).c_str(),
 
         (void)i;
      }
   }
   std::shared_ptr<THn_t> GetResultPtr()
 const { 
return fHistos[0]; }
   {
      
      std::array<
double, 
sizeof...(ColumnTypes)> 
valuesArr{
static_cast<double>(values)...};
   }
   {
      }
   }
 
   std::string GetActionName(){
      return "THnHelper";
   }
};
 
{
   
 
   
   
   auto dd = 
d.Define(
"x0", 
genD).Define(
"x1", 
genD).Define(
"x2", 
genF).Define(
"x3", 
genI);
 
 
   
   
 
                   "A THn with 4 dimensions",        
                   {4, 4, 8, 2},                     
                   {-10., -10, -4., -6.},            
                   {10., 10, 5., 7.}};               
 
   
 
}
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Int_t Exec(const char *cmd, ESlaves list, Bool_t plusMaster)
Long64_t Finalize(Int_t query=-1, Bool_t force=kFALSE)
R__EXTERN TRandom * gRandom
Base class for action helpers, see RInterface::Book() for more information.
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
void EnableImplicitMT(UInt_t numthreads=0)
Enable ROOT's implicit multi-threading for all objects and methods that provide an internal paralleli...
Bool_t IsImplicitMTEnabled()
Returns true if the implicit multi-threading in ROOT is enabled.
UInt_t GetThreadPoolSize()
Returns the size of ROOT's thread pool.
TSeq< unsigned int > TSeqU
void Initialize(Bool_t useTMVAStyle=kTRUE)
 
THnT<float> (*0x81c0450): "myThN" "A THn with 4 dimensions"
  4 dimensions, 128 entries in 1440 filled bins