Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooAICRegistry.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooAICRegistry.h,v 1.11 2007/05/11 09:11:30 verkerke Exp $
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16#ifndef ROO_AIC_REGISTRY
17#define ROO_AIC_REGISTRY
18
19#include <array>
20#include <memory>
21#include <vector>
22
23class RooArgSet;
24
25/// Registry for analytical integration codes.
27
28public:
29 RooAICRegistry(std::size_t size = 10);
34
35 int store(const std::vector<int> &codeList, RooArgSet *set1 = nullptr, RooArgSet *set2 = nullptr,
36 RooArgSet *set3 = nullptr, RooArgSet *set4 = nullptr);
37
38 struct Output {
39 std::vector<int> const &codes;
40 std::array<RooArgSet*, 4> sets;
41 };
42
43 /// Retrieve the array of integer codes associated with the given master code,
44 /// together with the (up to four) RooArgSets associated with this master code.
46 {
47 Output out{.codes = _clArr[masterCode], .sets = {}};
48 for (std::size_t iArr = 0; iArr < 4; ++iArr) {
49 out.sets[iArr] = _asArr[iArr][masterCode].get();
50 }
51 return out;
52 }
53
54 /// Number of stored code lists.
55 std::size_t size() const { return _clArr.size(); }
56
57protected:
58 std::vector<std::vector<int>> _clArr; ///<! Array of array of code lists
59 std::array<std::vector<std::unique_ptr<RooArgSet>>, 4> _asArr; ///<! Array of RooArgSet pointers
60};
61
62#endif
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Registry for analytical integration codes.
int store(const std::vector< int > &codeList, RooArgSet *set1=nullptr, RooArgSet *set2=nullptr, RooArgSet *set3=nullptr, RooArgSet *set4=nullptr)
Store given arrays of integer codes, and up to four RooArgSets in the registry (each setX pointer may...
std::vector< std::vector< int > > _clArr
! Array of array of code lists
std::array< std::vector< std::unique_ptr< RooArgSet > >, 4 > _asArr
! Array of RooArgSet pointers
Output retrieve(int masterCode)
Retrieve the array of integer codes associated with the given master code, together with the (up to f...
RooAICRegistry(std::size_t size=10)
RooAICRegistry & operator=(const RooAICRegistry &other)
Copy assignment.
std::size_t size() const
Number of stored code lists.
RooAICRegistry & operator=(RooAICRegistry &&other)=default
RooAICRegistry(RooAICRegistry &&other)=default
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
std::array< RooArgSet *, 4 > sets
std::vector< int > const & codes