Skip to content
Snippets Groups Projects
Commit 638d225b authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

A fix and cleanup for StoreID

Fixed Name-to-Type mapping for the Metadata store.

Removed the references to Simple Store and Spare Store,
which apparently had not been used by our software except
in a few tests. These tests were fixed too.
parent 3030b9a4
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!29294A fix and cleanup for StoreID
......@@ -38,8 +38,6 @@ int main() {
assert(pStore);
assert(pStore->storeID() == StoreID::EVENT_STORE);
pStore->setStoreID(StoreID::SPARE_STORE);
assert(pStore->storeID() == StoreID::SPARE_STORE);
assert((pSvcLoc->service("DetectorStore", pStore)).isSuccess());
assert(pStore);
......
......@@ -27,8 +27,6 @@ class StoreID
DETECTOR_STORE,
CONDITION_STORE,
METADATA_STORE,
SIMPLE_STORE,
SPARE_STORE,
PILEUP_STORE,
UNKNOWN
} type;
......
......@@ -11,7 +11,5 @@ EVENT_STORE = 0
DETECTOR_STORE = 1
CONDITION_STORE = 2
METADATA_STORE = 3
SIMPLE_STORE = 4
SPARE_STORE = 5
PILEUP_STORE = 6
UNKNOWN = 7
PILEUP_STORE = 4
UNKNOWN = 5
......@@ -12,7 +12,6 @@ static const std::vector<std::string> STORENAMES {
"ConditionStore",
"InputMetaDataStore",
"MetaDataStore",
"SpareStore",
"PileupStore",
"UnknownStore"
};
......@@ -51,7 +50,7 @@ StoreID::findStoreID(const std::string& storeNamePrefix) {
}
case 'M':
{
return StoreID::SIMPLE_STORE;
return StoreID::METADATA_STORE;
break;
}
case 'P':
......@@ -61,16 +60,7 @@ StoreID::findStoreID(const std::string& storeNamePrefix) {
}
case 'S':
{
if (storeNamePrefix.at(ist+1)=='p'){
return StoreID::SPARE_STORE;
}else{
return StoreID::EVENT_STORE;
}
break;
}
case 'T':
{
return StoreID::METADATA_STORE;
return StoreID::EVENT_STORE;
break;
}
default:
......
......@@ -261,7 +261,7 @@ SG::DataProxy*
ProxyProviderSvc::retrieveProxy(const CLID& id, const std::string& key,
IProxyRegistry& store)
{
if ( !m_providers.empty() && store.storeID() != StoreID::SIMPLE_STORE ) {
if ( !m_providers.empty() ) {
const EventContext& ctx = contextFromStore (store);
SG::TransientAddress pTAd (id, key);
pAPiterator iProvider(m_providers.begin()), iEnd(m_providers.end());
......
......@@ -59,8 +59,8 @@ void test_ctor()
SGTest::TestStore pool;
SG::DataStore store (pool);
assert (store.storeID() == StoreID::UNKNOWN);
store.setStoreID (StoreID::SPARE_STORE);
assert (store.storeID() == StoreID::SPARE_STORE);
store.setStoreID (StoreID::EVENT_STORE);
assert (store.storeID() == StoreID::EVENT_STORE);
}
......@@ -336,7 +336,7 @@ void test_keys()
assert (store.addToStore (125, dp3).isSuccess());
assert (store.addToStore (125, dp4).isSuccess());
TestProvider prov;
dp4->setProvider (&prov, StoreID::SPARE_STORE);
dp4->setProvider (&prov, StoreID::EVENT_STORE);
store.keys (125, v, true, false);
assert (v.size() == 2);
......
......@@ -164,9 +164,9 @@ void test1()
assert (tad3.address() == 0);
TestProvider tp;
tad3.setProvider (&tp, StoreID::SPARE_STORE);
tad3.setProvider (&tp, StoreID::EVENT_STORE);
assert (tad3.provider() == &tp);
assert (tad3.storeID() == StoreID::SPARE_STORE);
assert (tad3.storeID() == StoreID::EVENT_STORE);
assert (tad3.isValid(nullptr));
tad3.consultProvider (false);
assert (!tad3.isValid(nullptr));
......@@ -193,7 +193,7 @@ void test2()
TestAddress ad1(1);
SG::TransientAddress tad1 (123, "key", &ad1);
TestProvider tp;
tad1.setProvider (&tp, StoreID::SPARE_STORE);
tad1.setProvider (&tp, StoreID::EVENT_STORE);
tad1.setSGKey (876);
tad1.setTransientID (124);
tad1.setAlias ("key2");
......@@ -201,7 +201,7 @@ void test2()
assert (tad1.name() == "key");
assert (tad1.clID() == 123);
assert (tad1.address() == &ad1);
assert (tad1.storeID() == StoreID::SPARE_STORE);
assert (tad1.storeID() == StoreID::EVENT_STORE);
assert (tad1.sgkey() == 876);
assert (tad1.transientID().size() == 2);
assert (tad1.transientID (123));
......@@ -214,7 +214,7 @@ void test2()
assert (tad2.name() == "key");
assert (tad2.clID() == 123);
assert (tad2.address() == &ad1);
assert (tad2.storeID() == StoreID::SPARE_STORE);
assert (tad2.storeID() == StoreID::EVENT_STORE);
assert (tad2.sgkey() == 876);
assert (tad2.transientID().size() == 2);
assert (tad2.transientID (123));
......@@ -232,7 +232,7 @@ void test2()
assert (tad1.name() == "key");
assert (tad1.clID() == 123);
assert (tad1.address() == &ad1);
assert (tad1.storeID() == StoreID::SPARE_STORE);
assert (tad1.storeID() == StoreID::EVENT_STORE);
assert (tad1.sgkey() == 876);
assert (tad1.transientID().size() == 2);
assert (tad1.transientID (123));
......@@ -255,7 +255,7 @@ void test3()
TestAddress ad1(1);
SG::TransientAddress tad1 (123, "key", &ad1);
TestProvider tp;
tad1.setProvider (&tp, StoreID::SPARE_STORE);
tad1.setProvider (&tp, StoreID::EVENT_STORE);
tad1.setSGKey (876);
tad1.setTransientID (124);
tad1.setAlias ("key2");
......@@ -263,7 +263,7 @@ void test3()
assert (tad1.name() == "key");
assert (tad1.clID() == 123);
assert (tad1.address() == &ad1);
assert (tad1.storeID() == StoreID::SPARE_STORE);
assert (tad1.storeID() == StoreID::EVENT_STORE);
assert (tad1.sgkey() == 876);
assert (tad1.transientID().size() == 2);
assert (tad1.transientID (123));
......@@ -276,7 +276,7 @@ void test3()
assert (tad2.name() == "key");
assert (tad2.clID() == 123);
assert (tad2.address() == &ad1);
assert (tad2.storeID() == StoreID::SPARE_STORE);
assert (tad2.storeID() == StoreID::EVENT_STORE);
assert (tad2.sgkey() == 876);
assert (tad2.transientID().size() == 2);
assert (tad2.transientID (123));
......@@ -290,7 +290,7 @@ void test3()
assert (tad3.name() == "key");
assert (tad3.clID() == 123);
assert (tad3.address() == &ad1);
assert (tad3.storeID() == StoreID::SPARE_STORE);
assert (tad3.storeID() == StoreID::EVENT_STORE);
assert (tad3.sgkey() == 876);
assert (tad3.transientID().size() == 2);
assert (tad3.transientID (123));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment