Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tab vs space issues in code #2212

Merged
merged 1 commit into from
Jan 29, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 34 additions & 34 deletions FWCore/Services/src/InitRootHandlers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -317,56 +317,56 @@ namespace edm {
int const kNClasses = gClassTable->Classes();
knownClassNames.reserve(kNClasses);
for(int i = 0; i<kNClasses; ++i) {
auto const name = gClassTable->At(i);
knownClassNames.push_back(name);
auto const name = gClassTable->At(i);
knownClassNames.push_back(name);
}

const std::string kFalse("false");
//Wrappers are required to work
for(auto name : knownClassNames) {
if(strncmp(name,"edm::Wrapper<",13)==0) {
TClass* c=TClass::GetClass(name);
//can't use the name to lookup ReflexType becuase ROOT removes 'std::'
assert(c->GetTypeInfo());
auto t = Reflex::Type::ByTypeInfo(*(c->GetTypeInfo()));
Reflex::PropertyList wp = t.Properties();
if(wp.HasProperty("persistent") and wp.PropertyAsString("persistent") == kFalse) continue;
//std::cout <<"start GetStreamerInfo for "<<name<<std::endl;
c->GetStreamerInfo();
}
if(strncmp(name,"edm::Wrapper<",13)==0) {
TClass* c=TClass::GetClass(name);
//can't use the name to lookup ReflexType becuase ROOT removes 'std::'
assert(c->GetTypeInfo());
auto t = Reflex::Type::ByTypeInfo(*(c->GetTypeInfo()));
Reflex::PropertyList wp = t.Properties();
if(wp.HasProperty("persistent") and wp.PropertyAsString("persistent") == kFalse) continue;
//std::cout <<"start GetStreamerInfo for "<<name<<std::endl;
c->GetStreamerInfo();
}
}

const std::vector<const char*> kKnownNames = {"TH2F","TArrayF"};
for(auto name: kKnownNames) {
TClass* c=TClass::GetClass(name);
assert(c);
c->GetStreamerInfo();
TClass* c=TClass::GetClass(name);
assert(c);
c->GetStreamerInfo();
}

s_ignoreEverything=true;
std::shared_ptr<void*> guard(nullptr,[](void*) { s_ignoreEverything=false;});

const Reflex::Type kDefaultType;
for(auto name : knownClassNames) {
if(strncmp(name,"edm::Wrapper<",13)==0) continue;
//std::cout <<"look at class "<<name<<std::endl;
TClass* c=TClass::GetClass(name);
if(c == nullptr) continue;
auto id = c->GetTypeInfo();
if( nullptr == id) continue;
auto t = Reflex::Type::ByTypeInfo(*id);
if(t == kDefaultType) continue;
Reflex::PropertyList wp = t.Properties();
if(wp.HasProperty("persistent") and wp.PropertyAsString("persistent") == kFalse) continue;

if( (not (c->Property() & kIsAbstract) ) and
c->HasDefaultConstructor() and
(0 != c->GetClassVersion()) and
( 0 == (gClassTable->GetPragmaBits(name) & TClassTable::kNoStreamer) )
) {
//std::cout <<"start GetStreamerInfo for "<<name<<" "<<c->GetClassVersion()<<std::endl;
c->GetStreamerInfo();
}
if(strncmp(name,"edm::Wrapper<",13)==0) continue;
//std::cout <<"look at class "<<name<<std::endl;
TClass* c=TClass::GetClass(name);
if(c == nullptr) continue;
auto id = c->GetTypeInfo();
if( nullptr == id) continue;
auto t = Reflex::Type::ByTypeInfo(*id);
if(t == kDefaultType) continue;
Reflex::PropertyList wp = t.Properties();
if(wp.HasProperty("persistent") and wp.PropertyAsString("persistent") == kFalse) continue;
if( (not (c->Property() & kIsAbstract) ) and
c->HasDefaultConstructor() and
(0 != c->GetClassVersion()) and
( 0 == (gClassTable->GetPragmaBits(name) & TClassTable::kNoStreamer) )
) {
//std::cout <<"start GetStreamerInfo for "<<name<<" "<<c->GetClassVersion()<<std::endl;
c->GetStreamerInfo();
}
}
}

Expand Down