diff --git a/DDCond/src/ConditionsDependencyHandler.cpp b/DDCond/src/ConditionsDependencyHandler.cpp
index 08d1d1ad3235c8c42e9832701ee60b97e10cfb06..01c93a25fca413abdd73fb309ebe1ef651968bb9 100644
--- a/DDCond/src/ConditionsDependencyHandler.cpp
+++ b/DDCond/src/ConditionsDependencyHandler.cpp
@@ -16,6 +16,7 @@
#include "DDCond/ConditionsManagerObject.h"
#include "DD4hep/ConditionsProcessor.h"
#include "DD4hep/Printout.h"
+#include "TTimeStamp.h"
using namespace dd4hep;
using namespace dd4hep::cond;
@@ -110,17 +111,17 @@ void ConditionsDependencyHandler::resolve() {
m_state = RESOLVED;
for( const auto& c : m_todo ) {
w = c.second;
+ m_currentWork = w;
+ if ( w->state != RESOLVED ) {
+ w->resolve(m_currentWork);
+ }
+ ++num_resolved;
// Fill an empty map of condition vectors for the block inserts
auto ret = work_pools.insert(make_pair(w->iov->keyData,tmp));
if ( ret.second ) {
// There is sort of the hope that most conditions go into 1 pool...
ret.first->second.reserve(m_todo.size());
}
- if ( w->state == RESOLVED ) continue;
- w->state = RESOLVED;
- m_currentWork = w;
- w->context.dependency->callback->resolve(w->condition, w->context);
- ++num_resolved;
}
// Optimize pool interactions: Cache pool in map assuming there are only few pools created
for( const auto& c : m_todo ) {
@@ -139,13 +140,16 @@ void ConditionsDependencyHandler::resolve() {
// In principle at thi stage the conditions manager should be locked
// provided all the work done so far can be undone.....in case of an error
for( const auto& section : work_pools ) {
+ TTimeStamp start;
IOV iov(m_iovType, section.first);
size_t result = registerMany(iov, section.second);
if ( result != section.second.size() ) {
//
}
- printout(prt_lvl,"DependencyHandler","++ Inserted %ld conditions to pool-iov: %s",
- section.second.size(), iov.str().c_str());
+ TTimeStamp stop;
+ printout(prt_lvl,"DependencyHandler","Inserted %ld [%ld] conditions to pool-iov: %s [%7.5f seconds]",
+ result, section.second.size(), iov.str().c_str(),
+ stop.AsDouble()-start.AsDouble());
}
}
diff --git a/DDCond/src/Type1/Manager_Type1.cpp b/DDCond/src/Type1/Manager_Type1.cpp
index db17e6f83fcfd04be955c10d2a85b98e791f635d..ef655e8e137aa4c30ee8655854580aa4013b61e9 100644
--- a/DDCond/src/Type1/Manager_Type1.cpp
+++ b/DDCond/src/Type1/Manager_Type1.cpp
@@ -264,11 +264,14 @@ bool Manager_Type1::registerUnlocked(ConditionsPool& pool, Condition cond) {
/// Register a whole block of conditions with identical IOV.
size_t Manager_Type1::blockRegister(ConditionsPool& pool, const vector<Condition>& cond) const {
size_t result = 0;
+ //string typ;
for(auto c : cond) {
if ( c.isValid() ) {
c->iov = pool.iov;
c->setFlag(Condition::ACTIVE);
pool.insert(c);
+ //typ = typeName(typeid(*(c.ptr())));
+ //if ( typ.find("Static") != string::npos ) cout << "++Insert: " << typ << endl;
if ( !m_onRegister.empty() ) {
__callListeners(m_onRegister, &ConditionsListener::onRegisterCondition, c);
}