diff --git a/DDCore/include/DD4hep/Handle.h b/DDCore/include/DD4hep/Handle.h index 4359b839e339112678551d991847f009ad1b9943..302bdd5d28faada594ed3ab49684de55bece9d25 100644 --- a/DDCore/include/DD4hep/Handle.h +++ b/DDCore/include/DD4hep/Handle.h @@ -10,6 +10,7 @@ #ifndef DD4HEP_ELEMENTS_H #define DD4HEP_ELEMENTS_H #include "DD4hep/config.h" +#include "DD4hep/Primitives.h" #include <string> #include <typeinfo> @@ -190,11 +191,6 @@ namespace DD4hep { typedef Handle<> Elt_t; typedef Handle<TNamed> Ref_t; - /// Helper to delete objects from heap and reset the pointer - template <typename T> inline void deletePtr(T*& p) { - if(p) delete p; - p = 0; - } /// Helper to delete objects from heap and reset the pointer template <typename T> inline void destroyObject(T*& p) { deletePtr(p); diff --git a/DDCore/include/DD4hep/Plugins.h b/DDCore/include/DD4hep/Plugins.h new file mode 100644 index 0000000000000000000000000000000000000000..2aa41e9cd2f6b59bf3af55b2edd7e62c69d31baf --- /dev/null +++ b/DDCore/include/DD4hep/Plugins.h @@ -0,0 +1,42 @@ +// $Id: Handle.h 570 2013-05-17 07:47:11Z markus.frank $ +//==================================================================== +// AIDA Detector description implementation for LCD +//-------------------------------------------------------------------- +// +// Author : M.Frank +// +//==================================================================== +#ifndef DD4HEP_PLUGINS_H +#define DD4HEP_PLUGINS_H + +// ROOT include files +#include "Reflex/PluginService.h" + +/* + * DD4hep namespace declaration + */ +namespace DD4hep { + + typedef ROOT::Reflex::PluginService PluginService; + + /** @class PluginDebug. PluginDebug.h DD4hep/PluginDebug.h + * + * Small helper class to adjust the plugin service debug level + * for a limited code scope. Automatically back-adjusts the debug + * level at object destruction. + * + * @author M.Frank + * @version 1.0 + */ + struct PluginDebug { + int m_debug; + /// Default constructor + PluginDebug(int dbg=2); + /// Default destructor + ~PluginDebug(); + /// Helper to check factory existence + std::string missingFactory(const std::string& name) const; + }; + +} /* End namespace DD4hep */ +#endif /* DD4HEP_PLUGINS_H */ diff --git a/DDCore/include/DD4hep/Primitives.h b/DDCore/include/DD4hep/Primitives.h index b3434df17bd69830746fe17d547e08e4fe9998ff..2ce61365d08c2ac77c0e4c8ae2bed941e392976a 100644 --- a/DDCore/include/DD4hep/Primitives.h +++ b/DDCore/include/DD4hep/Primitives.h @@ -17,6 +17,12 @@ namespace DD4hep { // Put here global basic type defintiions derived from primitive types of the DD4hep namespace typedef unsigned long long int VolumeID; + /// Helper to delete objects from heap and reset the pointer. Saves many many lines of code + template <typename T> inline void deletePtr(T*& p) { + if ( 0 != p ) delete p; + p = 0; + } + /* * Geometry namespace declaration */ diff --git a/DDCore/include/DD4hep/TGeoUnits.h b/DDCore/include/DD4hep/TGeoUnits.h new file mode 100644 index 0000000000000000000000000000000000000000..4795523644f52069b0317b87a44dd2fddbdce526 --- /dev/null +++ b/DDCore/include/DD4hep/TGeoUnits.h @@ -0,0 +1,379 @@ +// +// System of Units for Geant3 and TGeo/ROOT +// +// Taken from CLHEP with the following basic translations: +// +// Geant4 Geant3 +// ---------------------------------------------------------------- +// millimeter mm=1,cm=10 centimeter mm=0.1,cm=1 +// nanosecond s=1e9 second ns=1e-9,s=1 +// Mega electron Volt GeV=1e3 GeV GeV=1 +// radian rad=1 degree rad=180/pi +// +// +#ifndef DD4HEP_TGEOUNITS_H +#define DD4HEP_TGEOUNITS_H + +namespace tgeo { + + // + // Length [L] + // + static const double millimeter = 0.1; + static const double millimeter2 = millimeter*millimeter; + static const double millimeter3 = millimeter*millimeter*millimeter; + + static const double centimeter = 10.*millimeter; + static const double centimeter2 = centimeter*centimeter; + static const double centimeter3 = centimeter*centimeter*centimeter; + + static const double meter = 1000.*millimeter; + static const double meter2 = meter*meter; + static const double meter3 = meter*meter*meter; + + static const double kilometer = 1000.*meter; + static const double kilometer2 = kilometer*kilometer; + static const double kilometer3 = kilometer*kilometer*kilometer; + + static const double parsec = 3.0856775807e+16*meter; + + static const double micrometer = 1.e-6 *meter; + static const double nanometer = 1.e-9 *meter; + static const double angstrom = 1.e-10*meter; + static const double fermi = 1.e-15*meter; + + static const double barn = 1.e-28*meter2; + static const double millibarn = 1.e-3 *barn; + static const double microbarn = 1.e-6 *barn; + static const double nanobarn = 1.e-9 *barn; + static const double picobarn = 1.e-12*barn; + + // symbols + static const double nm = nanometer; + static const double um = micrometer; + + static const double mm = millimeter; + static const double mm2 = millimeter2; + static const double mm3 = millimeter3; + + static const double cm = centimeter; + static const double cm2 = centimeter2; + static const double cm3 = centimeter3; + + static const double m = meter; + static const double m2 = meter2; + static const double m3 = meter3; + + static const double km = kilometer; + static const double km2 = kilometer2; + static const double km3 = kilometer3; + + static const double pc = parsec; + + // + // Angle + // + static const double radian = 180./3.14159265358979323846; // => degree=1 + static const double milliradian = 1.e-3*radian; + static const double degree = 1.;//= (3.14159265358979323846/180.0)*radian; + + static const double steradian = 1.; + + // symbols + static const double rad = radian; + static const double mrad = milliradian; + static const double sr = steradian; + static const double deg = degree; + + // + // Time [T] + // + static const double nanosecond = 1.e-9; + static const double second = 1.e+9 *nanosecond; + static const double millisecond = 1.e-3 *second; + static const double microsecond = 1.e-6 *second; + static const double picosecond = 1.e-12*second; + + static const double hertz = 1./second; + static const double kilohertz = 1.e+3*hertz; + static const double megahertz = 1.e+6*hertz; + + // symbols + static const double ns = nanosecond; + static const double s = second; + static const double ms = millisecond; + + // + // Electric charge [Q] + // + static const double eplus = 1. ;// positron charge + static const double e_SI = 1.602176487e-19;// positron charge in coulomb + static const double coulomb = eplus/e_SI;// coulomb = 6.24150 e+18 * eplus + + // + // Energy [E] + // + static const double megaelectronvolt = 1.e-3; + static const double electronvolt = 1.e-6*megaelectronvolt; + static const double kiloelectronvolt = 1.e-3*megaelectronvolt; + static const double gigaelectronvolt = 1.e+3*megaelectronvolt; + static const double teraelectronvolt = 1.e+6*megaelectronvolt; + static const double petaelectronvolt = 1.e+9*megaelectronvolt; + + static const double joule = electronvolt/e_SI;// joule = 6.24150 e+12 * MeV + + // symbols + static const double MeV = megaelectronvolt; + static const double eV = electronvolt; + static const double keV = kiloelectronvolt; + static const double GeV = gigaelectronvolt; + static const double TeV = teraelectronvolt; + static const double PeV = petaelectronvolt; + + // + // Mass [E][T^2][L^-2] + // + static const double kilogram = joule*second*second/(meter*meter); + static const double gram = 1.e-3*kilogram; + static const double milligram = 1.e-3*gram; + + // symbols + static const double kg = kilogram; + static const double g = gram; + static const double mg = milligram; + + // + // Power [E][T^-1] + // + static const double watt = joule/second;// watt = 6.24150 e+3 * MeV/ns + + // + // Force [E][L^-1] + // + static const double newton = joule/meter;// newton = 6.24150 e+9 * MeV/mm + + // + // Pressure [E][L^-3] + // +#define pascal hep_pascal // a trick to avoid warnings + static const double hep_pascal = newton/m2; // pascal = 6.24150 e+3 * MeV/mm3 + static const double bar = 100000*pascal; // bar = 6.24150 e+8 * MeV/mm3 + static const double atmosphere = 101325*pascal; // atm = 6.32420 e+8 * MeV/mm3 + + // + // Electric current [Q][T^-1] + // + static const double ampere = coulomb/second; // ampere = 6.24150 e+9 * eplus/ns + static const double milliampere = 1.e-3*ampere; + static const double microampere = 1.e-6*ampere; + static const double nanoampere = 1.e-9*ampere; + + // + // Electric potential [E][Q^-1] + // + static const double megavolt = megaelectronvolt/eplus; + static const double kilovolt = 1.e-3*megavolt; + static const double volt = 1.e-6*megavolt; + + // + // Electric resistance [E][T][Q^-2] + // + static const double ohm = volt/ampere;// ohm = 1.60217e-16*(MeV/eplus)/(eplus/ns) + + // + // Electric capacitance [Q^2][E^-1] + // + static const double farad = coulomb/volt;// farad = 6.24150e+24 * eplus/Megavolt + static const double millifarad = 1.e-3*farad; + static const double microfarad = 1.e-6*farad; + static const double nanofarad = 1.e-9*farad; + static const double picofarad = 1.e-12*farad; + + // + // Magnetic Flux [T][E][Q^-1] + // + static const double weber = volt*second;// weber = 1000*megavolt*ns + + // + // Magnetic Field [T][E][Q^-1][L^-2] + // + static const double tesla = volt*second/meter2;// tesla =0.001*megavolt*ns/mm2 + + static const double gauss = 1.e-4*tesla; + static const double kilogauss = 1.e-1*tesla; + + // + // Inductance [T^2][E][Q^-2] + // + static const double henry = weber/ampere;// henry = 1.60217e-7*MeV*(ns/eplus)**2 + + // + // Temperature + // + static const double kelvin = 1.; + + // + // Amount of substance + // + static const double mole = 1.; + + // + // Activity [T^-1] + // + static const double becquerel = 1./second ; + static const double curie = 3.7e+10 * becquerel; + + // + // Absorbed dose [L^2][T^-2] + // + static const double gray = joule/kilogram ; + static const double kilogray = 1.e+3*gray; + static const double milligray = 1.e-3*gray; + static const double microgray = 1.e-6*gray; + + // + // Luminous intensity [I] + // + static const double candela = 1.; + + // + // Luminous flux [I] + // + static const double lumen = candela*steradian; + + // + // Illuminance [I][L^-2] + // + static const double lux = lumen/meter2; + + // + // Miscellaneous + // + static const double perCent = 0.01 ; + static const double perThousand = 0.001; + static const double perMillion = 0.000001; + + // -*- C++ -*- + // $Id:$ + // ---------------------------------------------------------------------- + // HEP coherent Physical Constants + // + // This file has been provided by Geant4 (simulation toolkit for HEP). + // + // The basic units are : + // millimeter + // nanosecond + // Mega electron Volt + // positon charge + // degree Kelvin + // amount of substance (mole) + // luminous intensity (candela) + // radian + // steradian + // + // Below is a non exhaustive list of Physical CONSTANTS, + // computed in the Internal HEP System Of Units. + // + // Most of them are extracted from the Particle Data Book : + // Phys. Rev. D volume 50 3-1 (1994) page 1233 + // + // ...with a meaningful (?) name ... + // + // You can add your own constants. + // + // Author: M.Maire + // + // History: + // + // 23.02.96 Created + // 26.03.96 Added constants for standard conditions of temperature + // and pressure; also added Gas threshold. + // 29.04.08 use PDG 2006 values + // 03.11.08 use PDG 2008 values + + static const double pi = 3.14159265358979323846; + static const double twopi = 2*pi; + static const double halfpi = pi/2; + static const double pi2 = pi*pi; + + // + // + // + static const double Avogadro = 6.02214179e+23/mole; + + // + // c = 299.792458 mm/ns + // c^2 = 898.7404 (mm/ns)^2 + // + static const double c_light = 2.99792458e+8 * m/s; + static const double c_squared = c_light * c_light; + + // + // h = 4.13566e-12 MeV*ns + // hbar = 6.58212e-13 MeV*ns + // hbarc = 197.32705e-12 MeV*mm + // + static const double h_Planck = 6.62606896e-34 * joule*s; + static const double hbar_Planck = h_Planck/twopi; + static const double hbarc = hbar_Planck * c_light; + static const double hbarc_squared = hbarc * hbarc; + + // + // + // + static const double electron_charge = - eplus; // see SystemOfUnits.h + static const double e_squared = eplus * eplus; + + // + // amu_c2 - atomic equivalent mass unit + // - AKA, unified atomic mass unit (u) + // amu - atomic mass unit + // + static const double electron_mass_c2 = 0.510998910 * MeV; + static const double proton_mass_c2 = 938.272013 * MeV; + static const double neutron_mass_c2 = 939.56536 * MeV; + static const double amu_c2 = 931.494028 * MeV; + static const double amu = amu_c2/c_squared; + + // + // permeability of free space mu0 = 2.01334e-16 Mev*(ns*eplus)^2/mm + // permittivity of free space epsil0 = 5.52636e+10 eplus^2/(MeV*mm) + // + static const double mu0 = 4*pi*1.e-7 * henry/m; + static const double epsilon0 = 1./(c_squared*mu0); + + // + // electromagnetic coupling = 1.43996e-12 MeV*mm/(eplus^2) + // + static const double elm_coupling = e_squared/(4*pi*epsilon0); + static const double fine_structure_const = elm_coupling/hbarc; + static const double classic_electr_radius = elm_coupling/electron_mass_c2; + static const double electron_Compton_length = hbarc/electron_mass_c2; + static const double Bohr_radius = electron_Compton_length/fine_structure_const; + + static const double alpha_rcl2 = fine_structure_const + *classic_electr_radius + *classic_electr_radius; + + static const double twopi_mc2_rcl2 = twopi*electron_mass_c2 + *classic_electr_radius + *classic_electr_radius; + // + // + // + static const double k_Boltzmann = 8.617343e-11 * MeV/kelvin; + + // + // + // + static const double STP_Temperature = 273.15*kelvin; + static const double STP_Pressure = 1.*atmosphere; + static const double kGasThreshold = 10.*mg/cm3; + + // + // + // + static const double universe_mean_density = 1.e-25*g/cm3; + +} +#endif /* DD4HEP_TGEOUNITS_H */ diff --git a/DDCore/include/XML/XMLElements.h b/DDCore/include/XML/XMLElements.h index e90aa38df15d982c67da8c9d2355c93b3623e887..f5ab817f7ecd8d66628c60d2be594bbadc9444f9 100644 --- a/DDCore/include/XML/XMLElements.h +++ b/DDCore/include/XML/XMLElements.h @@ -17,6 +17,7 @@ // Framework include files #include "XML/config.h" +#include "DD4hep/Primitives.h" #ifndef RAD_2_DEGREE #define RAD_2_DEGREE 57.295779513082320876798154814105 @@ -30,7 +31,6 @@ */ namespace DD4hep { - template<class T> void deletePtr(T*& p) { if(p) delete p; p=0; } namespace XML { typedef const XmlAttr* Attribute; diff --git a/DDCore/src/LCDDImp.cpp b/DDCore/src/LCDDImp.cpp index 8b3d74f07a646fd7b99d1867d75fd04119e68b93..49109a50bcefe6fac35726661865ebbaafa56f67 100644 --- a/DDCore/src/LCDDImp.cpp +++ b/DDCore/src/LCDDImp.cpp @@ -7,6 +7,7 @@ // //==================================================================== +#include "DD4hep/Plugins.h" #include "DD4hep/GeoHandler.h" #include "DD4hep/InstanceCount.h" #include "LCDDImp.h" @@ -22,7 +23,6 @@ #include "TGeoVolume.h" #include "TGeoShape.h" #include "TClass.h" -#include "Reflex/PluginService.h" #include "XML/DocumentHandler.h" #if DD4HEP_USE_PYROOT @@ -307,10 +307,12 @@ void LCDDImp::fromXML(const string& xmlfile, LCDDBuildType build_type) { try { LCDD* lcdd = this; string type = tag + "_XML_reader"; - long result = ROOT::Reflex::PluginService::Create<long>(type,lcdd,&xml_root); + long result = PluginService::Create<long>(type,lcdd,&xml_root); if ( 0 == result ) { + PluginDebug dbg; + PluginService::Create<long>(type,lcdd,&xml_root); throw runtime_error("Failed to locate plugin to interprete files of type" - " \""+tag+"\" - no factory:"+type); + " \""+tag+"\" - no factory:"+type+". "+dbg.missingFactory(type)); } result = *(long*)result; if ( result != 1 ) { @@ -341,9 +343,11 @@ void LCDDImp::dump() const { void LCDDImp::apply(const char* factory_type, int argc, char** argv) { string fac = factory_type; try { - long result = ROOT::Reflex::PluginService::Create<long>(fac,(LCDD*)this,argc,argv); + long result = PluginService::Create<long>(fac,(LCDD*)this,argc,argv); if ( 0 == result ) { - throw runtime_error("apply-plugin: Failed to locate plugin "+fac); + PluginDebug dbg; + PluginService::Create<long>(fac,(LCDD*)this,argc,argv); + throw runtime_error("apply-plugin: Failed to locate plugin "+fac+". "+dbg.missingFactory(fac)); } result = *(long*)result; if ( result != 1 ) { diff --git a/DDCore/src/Plugins.cpp b/DDCore/src/Plugins.cpp new file mode 100644 index 0000000000000000000000000000000000000000..02db9f3acaefd6888dae57d9da9063f2b31af052 --- /dev/null +++ b/DDCore/src/Plugins.cpp @@ -0,0 +1,37 @@ +// $Id: Readout.cpp 590 2013-06-03 17:02:43Z markus.frank $ +//==================================================================== +// AIDA Detector description implementation for LCD +//-------------------------------------------------------------------- +// +// Author : M.Frank +// +//==================================================================== + +#include "DD4hep/Plugins.h" +#include "Reflex/Reflex.h" + +using namespace std; +using namespace DD4hep; +using namespace ROOT::Reflex; + +/// Default constructor +PluginDebug::PluginDebug(int dbg) : m_debug(0) { + m_debug = PluginService::Debug(); + PluginService::SetDebug(dbg); +} + +/// Default destructor +PluginDebug::~PluginDebug() { + PluginService::SetDebug(m_debug); +} + +/// Helper to check factory existence +string PluginDebug::missingFactory(const string& name) const { + string msg = ""; + Scope factories = Scope::ByName(PLUGINSVC_FACTORY_NS); + string factoryname = PluginService::FactoryName(name); + msg = "\n\t\tNo factory with name "+factoryname+" for type "+name+" found.\n\t\tPlease check library load path."; + return msg; +} + + diff --git a/DDCore/src/plugins/Compact2Objects.cpp b/DDCore/src/plugins/Compact2Objects.cpp index b4cd863302b4b211587186ec97a6d02d7551c0fc..9c8fd9f1c0cc82978946bdfc60b8b12f54e4b9ae 100644 --- a/DDCore/src/plugins/Compact2Objects.cpp +++ b/DDCore/src/plugins/Compact2Objects.cpp @@ -12,15 +12,15 @@ #include "DD4hep/IDDescriptor.h" #include "DD4hep/FieldTypes.h" #include "DD4hep/Printout.h" +#include "DD4hep/Plugins.h" #include "XML/DocumentHandler.h" #include "XML/Conversions.h" // Root/TGeo include files #include "TGeoManager.h" #include "TGeoMaterial.h" -#include "Reflex/PluginService.h" - +// C/C++ include files #include <climits> #include <iostream> #include <iomanip> @@ -468,8 +468,12 @@ template <> void Converter<Readout>::operator()(xml_h e) const { if ( seg ) { // Segmentation is not mandatory! string type = seg.attr<string>(_U(type)); - Ref_t segment(ROOT::Reflex::PluginService::Create<TNamed*>(type,&lcdd,&seg)); - if ( !segment.isValid() ) throw_print("FAILED to create segmentation:"+type); + Ref_t segment(PluginService::Create<TNamed*>(type,&lcdd,&seg)); + if ( !segment.isValid() ) { + PluginDebug dbg; + PluginService::Create<TNamed*>(type,&lcdd,&seg); + throw_print("FAILED to create segmentation:"+type+". "+dbg.missingFactory(type)); + } ro.setSegmentation(segment); } if ( id ) { @@ -539,9 +543,11 @@ template <> void Converter<CartesianField>::operator()(xml_h e) const { CartesianField field = lcdd.field(name); if ( !field.isValid() ) { // The field is not present: We create it and add it to LCDD - field = Ref_t(ROOT::Reflex::PluginService::Create<TNamed*>(type,&lcdd,&e)); + field = Ref_t(PluginService::Create<TNamed*>(type,&lcdd,&e)); if ( !field.isValid() ) { - throw_print("Failed to create field object of type "+type); + PluginDebug dbg; + PluginService::Create<TNamed*>(type,&lcdd,&e); + throw_print("Failed to create field object of type "+type+". "+dbg.missingFactory(type)); } lcdd.addField(field); msg = "created"; @@ -678,20 +684,29 @@ template <> void Converter<DetElement>::operator()(xml_h element) const { lcdd.addSensitiveDetector(sd); } Ref_t sens = sd; - DetElement det(Ref_t(ROOT::Reflex::PluginService::Create<TNamed*>(type,&lcdd,&element,&sens))); + DetElement det(Ref_t(PluginService::Create<TNamed*>(type,&lcdd,&element,&sens))); if ( det.isValid() ) { setChildTitles(make_pair(name,det)); } printout(det.isValid() ? INFO : ERROR,"Compact","%s subdetector:%s of type %s %s", (det.isValid() ? "++ Converted" : "FAILED "),name.c_str(),type.c_str(), (sd.isValid() ? ("["+sd.type()+"]").c_str() : "")); + + if ( !det.isValid() ) { + PluginDebug dbg; + PluginService::Create<TNamed*>(type,&lcdd,&element,&sens); + throw runtime_error("Failed to execute subdetector creation plugin. "+dbg.missingFactory(type)); + } lcdd.addDetector(det); + return; } catch(const exception& e) { printout(ERROR,"Compact","++ FAILED to convert subdetector: %s: %s",name.c_str(),e.what()); + terminate(); } catch(...) { printout(ERROR,"Compact","++ FAILED to convert subdetector: %s: %s",name.c_str(),"UNKNONW Exception"); + terminate(); } } diff --git a/DDCore/src/plugins/LCDDConverter.cpp b/DDCore/src/plugins/LCDDConverter.cpp index 92c4fc15583de80718b06238c85990b5cbdb11ed..45b387d5c01fafad0789b2503a96fa8572ffea17 100644 --- a/DDCore/src/plugins/LCDDConverter.cpp +++ b/DDCore/src/plugins/LCDDConverter.cpp @@ -8,6 +8,7 @@ //==================================================================== // Framework includes +#include "DD4hep/Plugins.h" #include "DD4hep/Volumes.h" #include "DD4hep/FieldTypes.h" #include "DD4hep/Segmentations.h" @@ -40,7 +41,6 @@ #include "TGeoNode.h" #include "TClass.h" #include "TMath.h" -#include "Reflex/PluginService.h" #include <fstream> #include <iostream> #include <iomanip> @@ -921,12 +921,14 @@ xml_h LCDDConverter::handleField(const std::string& name, const TNamed* f) con string type = f->GetTitle(); field=xml_elt_t(geo.doc,Unicode(type)); field.setAttr(_U(name),f->GetName()); - fld = ROOT::Reflex::PluginService::Create<TNamed*>(type+"_Convert2LCDD",&m_lcdd,&field,&fld); + fld = PluginService::Create<TNamed*>(type+"_Convert2LCDD",&m_lcdd,&field,&fld); cout << "++ " << (fld.isValid() ? "Converted" : "FAILED to convert ") << " electromagnetic field:" << f->GetName() << " of type " << type << endl; if ( !fld.isValid() ) { + PluginDebug dbg; + PluginService::Create<TNamed*>(type+"_Convert2LCDD",&m_lcdd,&field,&fld); throw runtime_error("Failed to locate plugin to convert electromagnetic field:"+ - string(f->GetName())+" of type "+type); + string(f->GetName())+" of type "+type+". "+dbg.missingFactory(type)); } geo.doc_fields.append(field); } @@ -960,10 +962,12 @@ void LCDDConverter::handleProperties(LCDD::Properties& prp) const { const LCDD::PropertyValues& vals = prp[nam]; string type = vals.find("type")->second; string tag = type + "_Geant4_action"; - long result = ROOT::Reflex::PluginService::Create<long>(tag,&m_lcdd,ptr,&vals); + long result = PluginService::Create<long>(tag,&m_lcdd,ptr,&vals); if ( 0 == result ) { + PluginDebug dbg; + PluginService::Create<long>(tag,&m_lcdd,ptr,&vals); throw runtime_error("Failed to locate plugin to interprete files of type" - " \""+tag+"\" - no factory:"+type); + " \""+tag+"\" - no factory:"+type+". "+dbg.missingFactory(tag)); } result = *(long*)result; if ( result != 1 ) {