12 #include "boost/algorithm/string.hpp"
13 #include "boost/thread/tss.hpp"
35 found_type = foundType;
45 static std::string const template_name(
"edm::RefVector");
46 static std::string const member_type(
"member_type");
57 static std::string const template_name(
"edm::PtrVector");
58 static std::string const member_type(
"member_type");
73 static std::string const template_name(
"edm::RefToBaseVector");
74 static std::string const member_type(
"member_type");
83 int const oneParamArraySize = 6;
92 int const twoParamArraySize = 3;
102 std::auto_ptr<G__ClassInfo> ci(
new G__ClassInfo(name.c_str()));
103 return(ci.get() && ci->IsLoaded());
110 checkType(TypeWithDict
t,
bool noComponents =
false) {
115 for(TypeWithDict
x(t.toType());
x != t &&
x.typeInfo() !=
typeid(void); t =
x,
x = t.toType()) {}
125 if(name.empty() || t.isFundamental() || t.isEnum() || t.typeInfo() ==
typeid(void)) {
131 if(hasCintDictionary(name)) {
140 if(noComponents)
return;
142 if(name.find(
"std::") == 0) {
143 if(t.isTemplateInstance()) {
146 if(
std::find(oneParam, oneParam + oneParamArraySize, name.substr(5, n - 5)) != oneParam + oneParamArraySize) {
148 }
else if(
std::find(twoParam, twoParam + twoParamArraySize, name.substr(5, n - 5)) != twoParam + twoParamArraySize) {
151 for(
int i = 0;
i < cnt; ++
i) {
156 TypeDataMembers members(t);
157 for(
auto const& member : members) {
158 MemberWithDict
m(member);
159 if(!
m.isTransient() && !
m.isStatic()) {
164 for(
auto const&
base : bases) {
165 BaseWithDict
b(
base);
198 std::ostringstream ostr;
201 ostr << *it <<
"\n\n";
204 <<
"No REFLEX data dictionary found for the following classes:\n\n"
206 <<
"Most likely each dictionary was never generated,\n"
207 <<
"but it may be that it was generated in the wrong package.\n"
208 <<
"Please add (or move) the specification\n"
209 <<
"<class name=\"whatever\"/>\n"
210 <<
"to the appropriate classes_def.xml file.\n"
211 <<
"If the class is a template instance, you may need\n"
212 <<
"to define a dummy variable of this type in classes.h.\n"
213 <<
"Also, if this class has any transient members,\n"
214 <<
"you need to specify them in classes_def.xml.";
221 for (StringSet::const_iterator it = missing.begin(), itEnd = missing.end();
224 gROOT->GetClass(it->c_str(), kTRUE);
230 for (StringSet::const_iterator it = missing.begin(), itEnd = missing.end();
245 std::vector<TypeWithDict>& baseTypes) {
251 for(
auto const& basex : bases) {
256 if(
bool(baseRflxType)) {
263 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)