11 #include "TInterpreter.h"
12 #include "TVirtualMutex.h"
14 #include "boost/algorithm/string.hpp"
15 #include "boost/thread/tss.hpp"
37 found_type = foundType;
47 static std::string const template_name(
"edm::RefVector");
48 static std::string const member_type(
"member_type");
59 static std::string const template_name(
"edm::PtrVector");
60 static std::string const member_type(
"member_type");
75 static std::string const template_name(
"edm::RefToBaseVector");
76 static std::string const member_type(
"member_type");
85 int const oneParamArraySize = 6;
94 int const twoParamArraySize = 3;
104 std::auto_ptr<G__ClassInfo> ci(
new G__ClassInfo(name.c_str()));
105 return(ci.get() && ci->IsLoaded());
112 checkType(TypeWithDict
t,
bool noComponents =
false) {
117 for(TypeWithDict
x(t.toType());
x != t &&
x.typeInfo() !=
typeid(void); t =
x,
x = t.toType()) {}
127 if(name.empty() || t.isFundamental() || t.isEnum() || t.typeInfo() ==
typeid(void)) {
133 if(hasCintDictionary(name)) {
142 if(noComponents)
return;
144 if(name.find(
"std::") == 0) {
145 if(t.isTemplateInstance()) {
148 if(
std::find(oneParam, oneParam + oneParamArraySize, name.substr(5, n - 5)) != oneParam + oneParamArraySize) {
150 }
else if(
std::find(twoParam, twoParam + twoParamArraySize, name.substr(5, n - 5)) != twoParam + twoParamArraySize) {
153 for(
int i = 0;
i < cnt; ++
i) {
158 TypeDataMembers members(t);
159 for(
auto const& member : members) {
160 MemberWithDict
m(member);
161 if(!
m.isTransient() && !
m.isStatic()) {
166 R__LOCKGUARD(gCINTMutex);
168 for(
auto const&
base : bases) {
169 BaseWithDict
b(
base);
203 std::ostringstream ostr;
206 ostr << *it <<
"\n\n";
209 <<
"No REFLEX data dictionary found for the following classes:\n\n"
211 <<
"Most likely each dictionary was never generated,\n"
212 <<
"but it may be that it was generated in the wrong package.\n"
213 <<
"Please add (or move) the specification\n"
214 <<
"<class name=\"whatever\"/>\n"
215 <<
"to the appropriate classes_def.xml file.\n"
216 <<
"If the class is a template instance, you may need\n"
217 <<
"to define a dummy variable of this type in classes.h.\n"
218 <<
"Also, if this class has any transient members,\n"
219 <<
"you need to specify them in classes_def.xml.";
226 for (StringSet::const_iterator it = missing.begin(), itEnd = missing.end();
229 gROOT->GetClass(it->c_str(), kTRUE);
235 for (StringSet::const_iterator it = missing.begin(), itEnd = missing.end();
250 std::vector<TypeWithDict>& baseTypes) {
254 R__LOCKGUARD(gCINTMutex);
256 for(
auto const& basex : bases) {
261 if(
bool(baseRflxType)) {
268 baseTypes.push_back(baseType);
bool find_nested_type_named(std::string const &nested_type, TypeWithDict const &type_to_search, TypeWithDict &found_type)
bool is_RefToBaseVector(TypeWithDict const &possible_ref_vector, TypeWithDict &value_type)
static TypeWithDict byName(std::string const &className)
std::string const & dictionaryPlugInPrefix()
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void public_base_classes(TypeWithDict const &type, std::vector< TypeWithDict > &baseTypes)
bool is_RefVector(TypeWithDict const &possible_ref_vector, TypeWithDict &value_type)
std::string templateName() const
TypeWithDict nestedType(char const *name) const
StringSet & missingTypes()
std::set< std::string > StringSet
void checkDictionaries(std::string const &name, bool noComponents=false)
std::type_info const & typeInfo() const
TypeWithDict typeOf() const
Container::value_type value_type
void throwMissingDictionariesException()
static StringSet foundTypes_
bool search_all(ForwardSequence const &s, Datum const &d)
void loadMissingDictionaries()
static StringSet missingTypes_
bool is_PtrVector(TypeWithDict const &possible_ref_vector, TypeWithDict &value_type)