Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CondCore
ORA
src
ArrayHandlerFactory.cc
Go to the documentation of this file.
1
#include "
CondCore/ORA/interface/Exception.h
"
2
#include "
ArrayHandlerFactory.h
"
3
#include "
STLContainerHandler.h
"
4
#include "
CArrayHandler.h
"
5
#include "
PVectorHandler.h
"
6
// externals
7
#include "
FWCore/Utilities/interface/TypeWithDict.h
"
8
9
ora::IArrayHandler
*
10
ora::ArrayHandlerFactory::newArrayHandler
(
const
edm::TypeWithDict
& arrayType )
11
{
12
if
(arrayType.
isArray
()){
13
return
new
CArrayHandler
( arrayType );
14
}
else
{
15
if
( arrayType.
isTemplateInstance
() ) {
16
std::string
contName = arrayType.
templateName
();
17
if
( contName ==
"std::vector"
||
18
contName ==
"std::list"
||
19
contName ==
"std::set"
||
20
contName ==
"std::multiset"
||
21
contName ==
"std::deque"
||
22
contName ==
"__gnu_cxx::hash_set"
||
23
contName ==
"__gnu_cxx::hash_multiset"
||
24
contName ==
"std::map"
||
25
contName ==
"std::multimap"
||
26
contName ==
"__gnu_cxx::hash_map"
||
27
contName ==
"__gnu_cxx::hash_multimap"
){
28
return
new
STLContainerHandler
( arrayType );
29
}
else
if
( contName ==
"std::stack"
||
30
contName ==
"std::queue"
){
31
return
new
SpecialSTLContainerHandler
( arrayType );
32
}
else
if
( contName ==
"ora::PVector"
) {
33
return
new
PVectorHandler
( arrayType );
34
}
35
36
}
37
}
38
throwException
(
"No Array Handler available for class \""
+arrayType.
templateName
()+
"\""
,
39
"ArrayHandlerFactory::newArrayHandler"
);
40
return
0;
41
}
PVectorHandler.h
ora::SpecialSTLContainerHandler
Definition:
STLContainerHandler.h:95
ora::CArrayHandler
Definition:
CArrayHandler.h:37
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
TypeWithDict.h
edm::TypeWithDict::isArray
bool isArray() const
Definition:
TypeWithDict.cc:403
edm::TypeWithDict::templateName
std::string templateName() const
Definition:
TypeWithDict.cc:709
edm::TypeWithDict::isTemplateInstance
bool isTemplateInstance() const
Definition:
TypeWithDict.cc:428
ora::IArrayHandler
Definition:
IArrayHandler.h:28
ora::ArrayHandlerFactory::newArrayHandler
static IArrayHandler * newArrayHandler(const edm::TypeWithDict &arrayType)
Definition:
ArrayHandlerFactory.cc:10
ora::throwException
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
Definition:
Exception.cc:10
ora::STLContainerHandler
Definition:
STLContainerHandler.h:52
edm::TypeWithDict
Definition:
TypeWithDict.h:38
CArrayHandler.h
ArrayHandlerFactory.h
STLContainerHandler.h
ora::PVectorHandler
Definition:
PVectorHandler.h:55
Exception.h
Generated for CMSSW Reference Manual by
1.8.5