30 static bool isAlreadySetup =
false;
35 isAlreadySetup =
true;
58 return _factoryExpressions;
68bool registerImporter(
const std::string &key, std::unique_ptr<const Importer>
f,
bool topPriority)
71 vec.insert(topPriority ?
vec.begin() :
vec.end(), std::move(
f));
78 vec.insert(topPriority ?
vec.begin() :
vec.end(), std::move(
f));
86 for (
size_t i = element.second.size(); i > 0; --i) {
87 auto *imp = element.second[i - 1].get();
88 std::string
name(
typeid(*imp).name());
89 if (
name.find(needle) != std::string::npos) {
90 element.second.erase(element.second.begin() + i - 1);
102 for (
size_t i = element.second.size(); i > 0; --i) {
103 auto *imp = element.second[i - 1].get();
104 std::string
name(
typeid(*imp).name());
105 if (
name.find(needle) != std::string::npos) {
106 element.second.erase(element.second.begin() + i - 1);
117 for (
const auto &ePtr :
x.second) {
119 auto const &
e = *ePtr;
120 std::cout <<
x.first <<
"\t" <<
typeid(
e).
name() << std::endl;
127 for (
const auto &ePtr :
x.second) {
129 auto const &
e = *ePtr;
130 std::cout <<
x.first->GetName() <<
"\t" <<
typeid(
e).
name() << std::endl;
140 std::ifstream infile(fname);
141 if (!infile.is_open()) {
142 std::cerr <<
"unable to read file '" << fname <<
"'" << std::endl;
148 for (
const auto &cl :
n.children()) {
149 std::string key = cl.key();
150 if (!cl.has_child(
"class")) {
151 std::cerr <<
"error in file '" << fname <<
"' for entry '" << key <<
"': 'class' key is required!"
155 std::string classname(cl[
"class"].val());
158 std::cerr <<
"unable to find class " << classname <<
", skipping." << std::endl;
163 if (!cl.has_child(
"arguments")) {
164 std::cerr <<
"class " << classname <<
" seems to have no arguments attached, skipping" << std::endl;
167 for (
const auto &arg : cl[
"arguments"].children()) {
168 ex.arguments.push_back(arg.val());
170 factoryExpressions[key] =
ex;
184 std::cout << it.first;
185 std::cout <<
" " << it.second.tclass->GetName();
186 for (
auto v : it.second.arguments) {
187 std::cout <<
" " <<
v;
189 std::cout << std::endl;
202 std::ifstream infile(fname);
203 if (!infile.is_open()) {
204 std::cerr <<
"unable to read file '" << fname <<
"'" << std::endl;
210 for (
const auto &cl :
n.children()) {
211 std::string classname = cl.key();
214 std::cerr <<
"unable to find class " << classname <<
", skipping." << std::endl;
218 auto *
type = cl.find(
"type");
219 auto *proxies = cl.find(
"proxies");
221 std::cerr <<
"class " << classname <<
"has not type key set, skipping" << std::endl;
225 std::cerr <<
"class " << classname <<
"has no proxies identified, skipping" << std::endl;
229 for (
const auto &k : proxies->children()) {
230 ex.proxies[k.key()] = k.val();
246 std::cout << it.first->GetName() <<
": " << it.second.type;
247 for (
const auto &kv : it.second.proxies) {
248 std::cout <<
" " << kv.first <<
"=" << kv.second;
250 std::cout << std::endl;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
static std::unique_ptr< JSONTree > create()
TClass instances represent classes, structs and namespaces in the ROOT type system.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
static const TString & GetEtcDir()
Get the sysconfig directory in the installation. Static utility function.
static bool registerImporter(const std::string &key, bool topPriority=true)
void loadFactoryExpressions(const std::string &fname)
std::map< const std::string, ImportExpression > ImportExpressionMap
std::map< TClass const *, ExportKeys > ExportKeysMap
ImportExpressionMap & importExpressions()
void loadExportKeys(const std::string &fname)
static bool registerExporter(const TClass *key, bool topPriority=true)
void clearFactoryExpressions()
int removeImporters(const std::string &needle)
int removeExporters(const std::string &needle)
std::map< TClass const *, std::vector< std::unique_ptr< const Exporter > > > ExportMap
std::map< const std::string, std::vector< std::unique_ptr< const Importer > > > ImportMap
void printFactoryExpressions()
ExportKeysMap & exportKeys()
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...