ATLAS Offline Software
Loading...
Searching...
No Matches
StoreID.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
5#include <string>
6#include <vector>
7#include <utility>
8
9static const std::vector<std::string> STORENAMES {
10 "StoreGateSvc",
11 "DetectorStore",
12 "ConditionStore",
13 "MetaDataStore",
14 "InputMetaDataStore",
15 "PileupStore",
16 "UnknownStore"
17 };
18
19
21StoreID::findStoreID(const std::string& storeNamePrefix) {
22 // Account for AthenaMT stores that start with {digits}_
23 size_t ist (0);
24 if (::isdigit(storeNamePrefix.at(0))) {
25 ist = storeNamePrefix.find('_',0) +1;
26 }
27 //slightly faster
28
29 auto c(storeNamePrefix.at(ist));
30 switch(c){
31 case 'C':
32 {
34 break;
35 }
36 case 'D':
37 {
39 break;
40 }
41 case 'E':
42 {
44 break;
45 }
46 case 'I':
47 {
49 break;
50 }
51 case 'M':
52 {
54 break;
55 }
56 case 'P':
57 {
59 break;
60 }
61 case 'S':
62 {
64 break;
65 }
66 default:
67 {
68 return StoreID::UNKNOWN;
69 break;
70 }
71 }
72
73 return StoreID::UNKNOWN;
74}
75
76const std::string&
78 return STORENAMES[ (unsigned int)id ];
79}
80
static const std::vector< std::string > STORENAMES
Definition StoreID.cxx:9
@ EVENT_STORE
Definition StoreID.h:26
@ CONDITION_STORE
Definition StoreID.h:28
@ UNKNOWN
Definition StoreID.h:32
@ METADATA_STORE
Definition StoreID.h:29
@ DETECTOR_STORE
Definition StoreID.h:27
@ PILEUP_STORE
Definition StoreID.h:31
static const std::string & storeName(const StoreID::type &s)
Definition StoreID.cxx:77
static StoreID::type findStoreID(const std::string &storeName)
Definition StoreID.cxx:21