diff --git a/DDCore/src/LCDDImp.cpp b/DDCore/src/LCDDImp.cpp index 2679a16037f2bcb015845c9ce0ceb0a07195c410..6cdba6c3654e5e98af8fb6e33aa844605eefd869 100644 --- a/DDCore/src/LCDDImp.cpp +++ b/DDCore/src/LCDDImp.cpp @@ -110,12 +110,14 @@ LCDDImp::LCDDImp() : LCDDData(), LCDDLoad(this), m_buildType(BUILD_NONE) } { m_manager = gGeoManager; +#if 0 TGeoElementTable* table = m_manager->GetElementTable(); table->TGeoElementTable::~TGeoElementTable(); new(table) TGeoElementTable(); // This will initialize the table without filling: table->AddElement("VACUUM","VACUUM" ,0, 0, 0.0); table->Print(); +#endif } //if ( 0 == gGeoIdentity ) { diff --git a/examples/Conditions/CMakeLists.txt b/examples/Conditions/CMakeLists.txt index 8b7e5776e9ee86581c0de7e97397059203294a35..c0881b0a5041193c500b6464960e3773ae890ddd 100644 --- a/examples/Conditions/CMakeLists.txt +++ b/examples/Conditions/CMakeLists.txt @@ -77,3 +77,10 @@ dd4hep_add_test_reg( test_Conditions_CLICSiD_stress2_LONGTEST EXEC_ARGS geoPluginRun -volmgr -destroy -plugin DD4hep_ConditionExample_stress2 -input file:${DD4hep_DIR}/examples/CLICSiD/compact/compact.xml -iovs 20 REGEX_PASS "Summary: # of IOV: 20") +# +#---Testing: Multi-threading test: Load CLICSiD geometry and have multiple parallel runs on IOVs +dd4hep_add_test_reg( test_Conditions_CLICSiD_MT_LONGTEST + COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" + EXEC_ARGS geoPluginRun -volmgr -destroy -plugin DD4hep_ConditionExample_MT + -input file:${DD4hep_DIR}/examples/CLICSiD/compact/compact.xml -iovs 3 -runs 2 + REGEX_PASS "Total 280088 conditions \\(S:280088,L: 0,C: 0,M:0\\) of type run\\(0\\):\\[1-1\\]") diff --git a/examples/Conditions/src/ConditionExample_MT.cpp b/examples/Conditions/src/ConditionExample_MT.cpp index d7fae31e757e4fce8b43eb7affbe6aa91981eb0a..b579f2bc53cc5ce73c0ddb143d8b5ed90c2a1b2b 100644 --- a/examples/Conditions/src/ConditionExample_MT.cpp +++ b/examples/Conditions/src/ConditionExample_MT.cpp @@ -150,13 +150,15 @@ namespace { */ static int condition_example (Geometry::LCDD& lcdd, int argc, char** argv) { string input; - int num_iov = 10, num_threads = 1; + int num_iov = 10, num_threads = 1, num_run = 30; bool arg_error = false; for(int i=0; i<argc && argv[i]; ++i) { if ( 0 == ::strncmp("-input",argv[i],4) ) input = argv[++i]; else if ( 0 == ::strncmp("-iovs",argv[i],4) ) num_iov = ::atol(argv[++i]); + else if ( 0 == ::strncmp("-runs",argv[i],4) ) + num_run = ::atol(argv[++i]); else if ( 0 == ::strncmp("-threads",argv[i],4) ) num_threads = ::atol(argv[++i]); else @@ -197,6 +199,7 @@ static int condition_example (Geometry::LCDD& lcdd, int argc, char** argv) { ConditionsDependencyCreator(*slice,DEBUG).process(lcdd.world(),0,true); Statistics stats; + EventQueue events; /******************** Populate the conditions store *********************/ // Have e.g. 10 run-slices [1,10], [11,20] .... [91,100] for(int i=0; i<num_iov; ++i) { @@ -211,15 +214,13 @@ static int condition_example (Geometry::LCDD& lcdd, int argc, char** argv) { printout(INFO,"Example", "Setup %ld conditions for IOV:%s [%8.3f sec]", creator.conditionCount, iov.str().c_str(), stop.AsDouble()-start.AsDouble()); + // Fill the event queue with 10 evt per run + for(int j=0; j<6; ++j) { + events.push(make_pair((i*10)+j,num_run)); + } } // ++++++++++++++++++++++++ Now compute the conditions for each of these IOVs - EventQueue events; - for(int i=0; i<num_iov; ++i) { - for(int j=0; j<2; ++j) { - events.push(make_pair((i*10)+j,30)); - } - } vector<thread*> threads; for(int i=0; i<num_threads; ++i) { Executor* exec = new Executor(condMgr, iov_typ, i, events, stats);