diff --git a/AnalysisDataFormats/SUSYBSMObjects/src/classes_def.xml b/AnalysisDataFormats/SUSYBSMObjects/src/classes_def.xml
index c9bd06e508dbe..f0a73307deeb4 100644
--- a/AnalysisDataFormats/SUSYBSMObjects/src/classes_def.xml
+++ b/AnalysisDataFormats/SUSYBSMObjects/src/classes_def.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/AnalysisDataFormats/TrackInfo/src/classes_def.xml b/AnalysisDataFormats/TrackInfo/src/classes_def.xml
old mode 100755
new mode 100644
index 7165214147222..46fe958041886
--- a/AnalysisDataFormats/TrackInfo/src/classes_def.xml
+++ b/AnalysisDataFormats/TrackInfo/src/classes_def.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/CalibMuon/DTCalibration/plugins/DTT0CalibrationNew.cc b/CalibMuon/DTCalibration/plugins/DTT0CalibrationNew.cc
index 33b2203e9683e..3ed2ea470b105 100644
--- a/CalibMuon/DTCalibration/plugins/DTT0CalibrationNew.cc
+++ b/CalibMuon/DTCalibration/plugins/DTT0CalibrationNew.cc
@@ -277,7 +277,7 @@ void DTT0CalibrationNew::analyze(const edm::Event & event, const edm::EventSetup
//int npeaks = spectrum->Search((*lHisto).second,(tpPeakWidthPerLayer/2.),"goff",0.3);
int npeaks = spectrum->Search((*lHisto).second,(tpPeakWidthPerLayer/2.),"",0.3);
- float *peaks = spectrum->GetPositionX();
+ double *peaks = spectrum->GetPositionX();
//Put in a std::vector
vector peakMeans(peaks,peaks + npeaks);
//Sort the peaks in ascending order
diff --git a/CommonTools/ParticleFlow/test/Macros/isolation.C b/CommonTools/ParticleFlow/test/Macros/isolation.C
index 79a97e67f0c90..79d5c9b134b5d 100644
--- a/CommonTools/ParticleFlow/test/Macros/isolation.C
+++ b/CommonTools/ParticleFlow/test/Macros/isolation.C
@@ -3,8 +3,6 @@
gSystem->Load("libFWCoreFWLite.so");
AutoLibraryLoader::enable();
-gSystem->Load("libCintex.so");
-ROOT::Cintex::Cintex::Enable();
TFile f("testPFPAT.root");
Events.Draw("recoIsolatedPFCandidates_pfPionsIsolation__PFPAT.obj.isolation_>>h2");
diff --git a/CommonTools/ParticleFlow/test/Macros/plotVertex.py b/CommonTools/ParticleFlow/test/Macros/plotVertex.py
index 403ebbb85aeff..7d4ff1b449990 100644
--- a/CommonTools/ParticleFlow/test/Macros/plotVertex.py
+++ b/CommonTools/ParticleFlow/test/Macros/plotVertex.py
@@ -8,8 +8,6 @@ def loadFWLite():
gSystem.Load("libFWCoreFWLite")
gROOT.ProcessLine('AutoLibraryLoader::enable();')
gSystem.Load("libFWCoreFWLite")
- gSystem.Load("libCintex")
- gROOT.ProcessLine('ROOT::Cintex::Cintex::Enable();')
diff --git a/CommonTools/ParticleFlow/test/Macros/ptJets.C b/CommonTools/ParticleFlow/test/Macros/ptJets.C
index dd4d495788549..d47015e96bfd2 100644
--- a/CommonTools/ParticleFlow/test/Macros/ptJets.C
+++ b/CommonTools/ParticleFlow/test/Macros/ptJets.C
@@ -3,8 +3,6 @@
gSystem->Load("libFWCoreFWLite.so");
AutoLibraryLoader::enable();
- gSystem->Load("libCintex.so");
- ROOT::Cintex::Cintex::Enable();
TFile f("patTuple_PF2PAT.root");
Events.Draw("patJets_selectedPatJets__PAT.obj.pt()>>h1");
diff --git a/CommonTools/ParticleFlow/test/Macros/ptMus.C b/CommonTools/ParticleFlow/test/Macros/ptMus.C
index 0085bffa1bec2..a8dbc70977ed0 100644
--- a/CommonTools/ParticleFlow/test/Macros/ptMus.C
+++ b/CommonTools/ParticleFlow/test/Macros/ptMus.C
@@ -3,8 +3,6 @@
gSystem->Load("libFWCoreFWLite.so");
AutoLibraryLoader::enable();
- gSystem->Load("libCintex.so");
- ROOT::Cintex::Cintex::Enable();
TFile f("patTuple_PF2PAT.root");
Events.Draw("patMuons_selectedPatMuons__PAT.obj.pt()>>h1");
diff --git a/CommonTools/ParticleFlow/test/Macros/rootlogon.C b/CommonTools/ParticleFlow/test/Macros/rootlogon.C
index 5c443612797a0..4205978a8682b 100644
--- a/CommonTools/ParticleFlow/test/Macros/rootlogon.C
+++ b/CommonTools/ParticleFlow/test/Macros/rootlogon.C
@@ -10,8 +10,6 @@ void rootlogon() {
void loadFWLite() {
gSystem->Load("libFWCoreFWLite.so");
AutoLibraryLoader::enable();
- gSystem->Load("libCintex.so");
- ROOT::Cintex::Cintex::Enable();
}
void initAOD(const char* process) {
diff --git a/CommonTools/ParticleFlow/test/Macros/testMuonTopProjection.C b/CommonTools/ParticleFlow/test/Macros/testMuonTopProjection.C
index 6cb3a906b29f0..a5bd55113ed54 100644
--- a/CommonTools/ParticleFlow/test/Macros/testMuonTopProjection.C
+++ b/CommonTools/ParticleFlow/test/Macros/testMuonTopProjection.C
@@ -2,8 +2,6 @@
gSystem->Load("libFWCoreFWLite.so");
AutoLibraryLoader::enable();
- gSystem->Load("libCintex.so");
- ROOT::Cintex::Cintex::Enable();
TFile fDisabled("tpDisabled.root");
TTree *tDisabled = (TTree*) fDisabled.Get("Events");
diff --git a/CommonTools/Utils/interface/StringToEnumValue.h b/CommonTools/Utils/interface/StringToEnumValue.h
index 0fb35f664bd8e..3c26c53647ff1 100644
--- a/CommonTools/Utils/interface/StringToEnumValue.h
+++ b/CommonTools/Utils/interface/StringToEnumValue.h
@@ -3,7 +3,9 @@
#include "FWCore/Utilities/interface/Exception.h"
-#include "FWCore/Utilities/interface/TypeWithDict.h"
+#include "TEnum.h"
+#include "TEnumConstant.h"
+#include
#include
#include
#include
@@ -21,10 +23,16 @@
\date 04 Mar 2011
*/
-template
-int StringToEnumValue(const std::string & enumMemberName){
- edm::TypeWithDict dataType(typeid(MyType), kIsEnum);
- return dataType.stringToEnumValue(enumMemberName);
+template
+int StringToEnumValue(std::string const& enumConstName){
+ TEnum* en = TEnum::GetEnum(typeid(MyEnum));
+ if (en != nullptr){
+ if (TEnumConstant const* enc = en->GetConstant(enumConstName.c_str())){
+ return enc->GetValue();
+ }
+ }
+ assert(0);
+ return -1;
}
diff --git a/CommonTools/Utils/src/ExpressionVar.cc b/CommonTools/Utils/src/ExpressionVar.cc
index 155aed6fca144..9be62bb85b10c 100755
--- a/CommonTools/Utils/src/ExpressionVar.cc
+++ b/CommonTools/Utils/src/ExpressionVar.cc
@@ -152,7 +152,7 @@ double ExpressionVar::value(const edm::ObjectWithDict& obj) const
std::vector::const_reverse_iterator RIB = needsDestructor_.rbegin();
for (std::vector::reverse_iterator RI = objects_.rbegin(), RE = objects_.rend(); RI != RE; ++RIB, ++RI) {
if (*RIB) {
- RI->typeOf().destruct(RI->address(), false);
+ RI->destruct(false);
}
}
return ret;
@@ -231,7 +231,7 @@ ExpressionLazyVar::value(const edm::ObjectWithDict& o) const
double ret = I->invokeLast(val, objects_);
for (std::vector::reverse_iterator RI =
objects_.rbegin(), RE = objects_.rend(); RI != RE; ++RI) {
- RI->typeOf().destruct(RI->address(), false);
+ RI->destruct(false);
}
objects_.clear();
return ret;
diff --git a/CommonTools/Utils/src/MethodInvoker.cc b/CommonTools/Utils/src/MethodInvoker.cc
index 37512a4c8aaa5..be96b3380aed0 100755
--- a/CommonTools/Utils/src/MethodInvoker.cc
+++ b/CommonTools/Utils/src/MethodInvoker.cc
@@ -159,7 +159,7 @@ invoke(const edm::ObjectWithDict& o, edm::ObjectWithDict& retstore) const
// strip cv & ref flags
// FIXME: This is only true if the propery passed to the constructor
// overrides the const and reference flags.
- retType = edm::TypeWithDict(retType, 0L);
+ retType = retType.stripConstRef();
}
ret = edm::ObjectWithDict(retType, *static_cast(addr));
//std::cout << "Now type is " << retType.qualifiedName() << std::endl;
diff --git a/CommonTools/Utils/src/findMethod.cc b/CommonTools/Utils/src/findMethod.cc
index 1b3b5f8d7953b..50aeb42067dcc 100755
--- a/CommonTools/Utils/src/findMethod.cc
+++ b/CommonTools/Utils/src/findMethod.cc
@@ -5,8 +5,6 @@
#include "FWCore/Utilities/interface/BaseWithDict.h"
#include "FWCore/Utilities/interface/TypeWithDict.h"
#include "FWCore/Utilities/interface/TypeID.h"
-#include "TInterpreter.h"
-#include "TVirtualMutex.h"
#include
@@ -157,18 +155,44 @@ findMethod(const edm::TypeWithDict& t, /*class=in*/
throw parser::Exception(iIterator) << "No dictionary for class \"" <<
type.name() << "\".";
}
- while(type.isPointer() || type.isTypedef()) {
+ while (type.isPointer() || type.isReference()) {
type = type.toType();
}
- type = edm::TypeWithDict(type, 0L); // strip const, volatile, c++ ref, ..
-
+ while (type.isTypedef()) {
+ edm::TypeWithDict theType = type.finalType();
+ if(theType == type) {
+ break;
+ }
+ type = theType;
+ }
+ // strip const, volatile, c++ ref, ..
+ type = type.stripConstRef();
+ // Create our return value.
std::pair mem;
//FIXME: We must initialize mem.first!
mem.second = false;
// suitable members and number of integer->real casts required to get them
std::vector > oks;
-
- // first look in base scope
+ std::string theArgs;
+ for(auto const& item : args) {
+ if(!theArgs.empty()) {
+ theArgs += ',';
+ }
+ theArgs += edm::TypeID(item.type()).className();
+ }
+ edm::FunctionWithDict f = type.functionMemberByName(name, theArgs, true);
+ if(bool(f)) {
+ int casts = checkMethod(f, type, args, fixuppedArgs);
+ if (casts > -1) {
+ oks.push_back(std::make_pair(casts, f));
+ } else {
+ oError = -1 * casts;
+ //is this a show stopper error?
+ if (fatalErrorCondition(oError)) {
+ return mem;
+ }
+ }
+ } else {
edm::TypeFunctionMembers functions(type);
for (auto const& F : functions) {
edm::FunctionWithDict f(F);
@@ -186,6 +210,7 @@ findMethod(const edm::TypeWithDict& t, /*class=in*/
}
}
}
+ }
//std::cout << "At base scope (type " << (type.name()) << ") found " <<
// oks.size() << " methods." << std::endl;
// found at least one method
@@ -213,7 +238,6 @@ findMethod(const edm::TypeWithDict& t, /*class=in*/
// allowed
int baseError = parser::kNameDoesNotExist;
if (!bool(mem.first)) {
- R__LOCKGUARD(gCINTMutex);
edm::TypeBases bases(type);
for (auto const& B : bases) {
mem = findMethod(edm::BaseWithDict(B).typeOf(), name, args,
diff --git a/CommonTools/Utils/test/testCutParser.cc b/CommonTools/Utils/test/testCutParser.cc
index afa4e37e10ece..134201114c652 100755
--- a/CommonTools/Utils/test/testCutParser.cc
+++ b/CommonTools/Utils/test/testCutParser.cc
@@ -8,7 +8,6 @@
#include "FWCore/Utilities/interface/ObjectWithDict.h"
#include "FWCore/Utilities/interface/TypeWithDict.h"
#include
-#include "Cintex/Cintex.h"
@@ -42,7 +41,7 @@ class testCutParser : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE_END();
public:
- void setUp() {ROOT::Cintex::Cintex::Enable();}
+ void setUp() {}
void tearDown() {}
void checkAll();
void check(const std::string &, bool);
@@ -229,7 +228,7 @@ void testCutParser::checkAll() {
CPPUNIT_ASSERT_THROW((*sel)(o), reco::parser::Exception); // it throws wen called
sel.reset();
- CPPUNIT_ASSERT_THROW(reco::parser::cutParser("quality('notAnEnum')",sel, false), cms::Exception);
+ CPPUNIT_ASSERT_THROW(reco::parser::cutParser("quality('notAnEnum')",sel, false), edm::Exception);
// check hits (for re-implemented virtual functions and exception handling)
CPPUNIT_ASSERT(hitOk.hasPositionAndError());
diff --git a/CommonTools/Utils/test/testCutParserThreaded.cc b/CommonTools/Utils/test/testCutParserThreaded.cc
index 01356ec4f60e3..a70eb859e0711 100644
--- a/CommonTools/Utils/test/testCutParserThreaded.cc
+++ b/CommonTools/Utils/test/testCutParserThreaded.cc
@@ -7,8 +7,6 @@
#include "TObject.h"
#include "TVirtualStreamerInfo.h"
-#include "Cintex/Cintex.h"
-
#include
#include
#include
@@ -41,8 +39,6 @@ int main() {
std::atomic failed{false};
std::vector threads;
- ROOT::Cintex::Cintex::Enable();
-
TThread::Initialize();
//When threading, also have to keep ROOT from logging all TObjects into a list
TObject::SetObjectStat(false);
diff --git a/CommonTools/Utils/test/testExpressionParser.cc b/CommonTools/Utils/test/testExpressionParser.cc
index d4169418bea26..88cff79d65b83 100755
--- a/CommonTools/Utils/test/testExpressionParser.cc
+++ b/CommonTools/Utils/test/testExpressionParser.cc
@@ -14,7 +14,6 @@
#include "FWCore/Utilities/interface/TypeWithDict.h"
#include
#include "DataFormats/Common/interface/TestHandle.h"
-#include "Cintex/Cintex.h"
class testExpressionParser : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(testExpressionParser);
@@ -23,7 +22,7 @@ class testExpressionParser : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE_END();
public:
- void setUp() {ROOT::Cintex::Cintex::Enable();}
+ void setUp() {}
void tearDown() {}
void checkAll();
void testStringToEnum();
diff --git a/CondCore/CondDB/src/Serialization.cc b/CondCore/CondDB/src/Serialization.cc
index a0178ea875d87..dd771672c7727 100644
--- a/CondCore/CondDB/src/Serialization.cc
+++ b/CondCore/CondDB/src/Serialization.cc
@@ -7,21 +7,12 @@
// root includes
#include "TStreamerInfo.h"
#include "TClass.h"
-#include "TList.h"
#include "TBufferFile.h"
-#include "Cintex/Cintex.h"
namespace cond {
- struct CintexIntializer {
- CintexIntializer(){
- ROOT::Cintex::Cintex::Enable();
- }
- };
-
- // initialize Cintex and load dictionary when required
+ // load dictionary when required
TClass* lookUpDictionary( const std::type_info& sourceType ){
- static const CintexIntializer initializer;
TClass* rc = TClass::GetClass(sourceType);
if( !rc ){
static std::string const prefix("LCGReflex/");
diff --git a/CondCore/CondDB/test/MyTestData.h b/CondCore/CondDB/test/MyTestData.h
index e7786af681d4d..74e8ffa1f8e4d 100644
--- a/CondCore/CondDB/test/MyTestData.h
+++ b/CondCore/CondDB/test/MyTestData.h
@@ -12,7 +12,7 @@ class MyTestData {
MyTestData():
a( 0 ),
b( 0. ),
- s(""){
+ s(" "){
for( size_t i=0;i<2;i++)
for( size_t j=0;j<2;j++){
d[i][j]=0;
diff --git a/CondCore/CondDB/test/testConditionDatabase_0.cpp b/CondCore/CondDB/test/testConditionDatabase_0.cpp
index 05f4081eaad30..3c9ea9bdc454c 100644
--- a/CondCore/CondDB/test/testConditionDatabase_0.cpp
+++ b/CondCore/CondDB/test/testConditionDatabase_0.cpp
@@ -22,14 +22,14 @@ int run( const std::string& connectionString ){
try{
//*************
- std::cout <<"# Connecting with db in "< Connecting with db in "< Storing payload ptr="<<&d0< inserted 2 iovs..."< iov changes flushed..."< iov changes committed!..."< iov loaded size="< iov sequence size="<[0] not found!"<
@@ -16,7 +15,6 @@ int main (int argc, char** argv)
edmplugin::PluginManager::Config config;
edmplugin::PluginManager::configure(edmplugin::standard::config());
- ROOT::Cintex::Cintex::Enable();
static std::string const prefix("LCGReflex/");
edmplugin::PluginCapabilities::get()->load(prefix + "MyTestData");
diff --git a/CondCore/DBCommon/plugins/BlobStreamingService.cc b/CondCore/DBCommon/plugins/BlobStreamingService.cc
index dbf318cc55dcb..ac6f0f6e6173c 100644
--- a/CondCore/DBCommon/plugins/BlobStreamingService.cc
+++ b/CondCore/DBCommon/plugins/BlobStreamingService.cc
@@ -28,9 +28,9 @@ namespace cond {
virtual ~BlobStreamingService();
- boost::shared_ptr write( const void* addressOfInputData, Reflex::Type const & classDictionary, bool useCompression=true ) override;
+ boost::shared_ptr write( const void* addressOfInputData, edm::TypeWithDict const & classDictionary, bool useCompression=true ) override;
- void read( const coral::Blob& blobData, void* addressOfContainer, Reflex::Type const & classDictionary ) override;
+ void read( const coral::Blob& blobData, void* addressOfContainer, edm::TypeWithDict const & classDictionary ) override;
private:
@@ -46,7 +46,7 @@ namespace cond {
static Variant findVariant(const void* address);
- static int isVectorChar(Reflex::Type const & classDictionary);
+ static int isVectorChar(edm::TypeWithDict const & classDictionary);
static boost::shared_ptr compress(const void* addr, size_t isize);
@@ -62,7 +62,7 @@ namespace cond {
BlobStreamingService::~BlobStreamingService(){}
- boost::shared_ptr BlobStreamingService::write( const void* addressOfInputData, Reflex::Type const & classDictionary, bool useCompression ) {
+ boost::shared_ptr BlobStreamingService::write( const void* addressOfInputData, edm::TypeWithDict const & classDictionary, bool useCompression ) {
boost::shared_ptr blobOut;
int const k = isVectorChar(classDictionary);
switch (k) {
@@ -108,7 +108,7 @@ namespace cond {
}
- void BlobStreamingService::read( const coral::Blob& blobData, void* addressOfContainer, Reflex::Type const & classDictionary ) {
+ void BlobStreamingService::read( const coral::Blob& blobData, void* addressOfContainer, edm::TypeWithDict const & classDictionary ) {
// protect against small blobs...
Variant v = (size_t(blobData.size()) < m_offset) ? OLD : findVariant(blobData.startingAddress());
switch (v) {
@@ -164,10 +164,9 @@ namespace cond {
};
- int BlobStreamingService::isVectorChar(Reflex::Type const & classDictionary) {
- std::type_info const & t = classDictionary.TypeInfo();
- if (t==typeid(std::vector) ) return 1;
- if (t==typeid(std::vector) ) return 2;
+ int BlobStreamingService::isVectorChar(edm::TypeWithDict const& classDictionary) {
+ if (classDictionary == typeid(std::vector)) return 1;
+ if (classDictionary == typeid(std::vector)) return 2;
return 0;
}
diff --git a/CondCore/DBCommon/plugins/TBufferBlobStreamingService.cc b/CondCore/DBCommon/plugins/TBufferBlobStreamingService.cc
index 6c156e329b8db..48981f659197d 100644
--- a/CondCore/DBCommon/plugins/TBufferBlobStreamingService.cc
+++ b/CondCore/DBCommon/plugins/TBufferBlobStreamingService.cc
@@ -8,8 +8,8 @@
#include
//
#include "TBufferFile.h"
-#include "Reflex/Reflex.h"
-#include "Cintex/Cintex.h"
+
+#include "FWCore/Utilities/interface/TypeWithDict.h"
typedef void (TBuffer::*WriteArrayFn_t)(const void *obj, Int_t n);
typedef void (TBuffer::*ReadArrayFn_t)(void *obj, Int_t n);
@@ -50,48 +50,42 @@ static const std::size_t nPrimitives =
#undef PRIMTIVE
-cond::TBufferBlobTypeInfo::TBufferBlobTypeInfo( Reflex::Type const & type_)
+cond::TBufferBlobTypeInfo::TBufferBlobTypeInfo( edm::TypeWithDict const & type_)
: m_arraySize(0), m_class(0), m_primitive(0)
{
- static bool cintexInitialized = false;
- if (!cintexInitialized) {
- cintexInitialized = true;
- ROOT::Cintex::Cintex::Enable();
- }
-
- Reflex::Type type = type_;
+ edm::TypeWithDict type = type_;
while(true) {
- type = type.FinalType();
+ type = type.finalType();
- if (!type.IsArray())
+ if (!type.isArray())
break;
if (!m_arraySize)
m_arraySize = 1;
- m_arraySize *= type.ArrayLength();
- type = type.ToType();
+ m_arraySize *= type.arrayLength();
+ type = type.toType();
}
- if (type.IsClass()) {
- const std::type_info &typeInfo = type.TypeInfo();
+ if (type.isClass()) {
+ const std::type_info &typeInfo = type.typeInfo();
m_class = TClass::GetClass(typeInfo);
if (!m_class)
throw cond::Exception("TBufferBlobTypeInfo::TBufferBlobTypeInfo "
- "No ROOT class registered for " + type.Name());
- } else if (type.IsFundamental()) {
+ "No ROOT class registered for " + type.name());
+ } else if (type.isFundamental()) {
if (!m_arraySize)
throw cond::Exception("TBufferBlobTypeInfo::TBufferBlobTypeInfo "
"Only arrays of primitive types supported. "
"Please to not use a Blob for this member.");
m_primitive = std::find(primitives, primitives + nPrimitives,
- type.TypeInfo()) - primitives;
+ type.typeInfo()) - primitives;
if (m_primitive >= nPrimitives)
throw cond::Exception("TBufferBlobTypeInfo::TBufferBlobTypeInfo "
- "Cannot handle primitive type " + type.Name());
+ "Cannot handle primitive type " + type.name());
} else
throw cond::Exception("TBufferBlobTypeInfo::TBufferBlobTypeInfo "
- "Cannot handle C++ type " + type.Name());
+ "Cannot handle C++ type " + type.name());
}
@@ -112,7 +106,7 @@ namespace {
}
boost::shared_ptr cond::TBufferBlobStreamingService::write( const void* addr,
- Reflex::Type const & classDictionary,
+ edm::TypeWithDict const & classDictionary,
bool ){
TBufferBlobTypeInfo theType( classDictionary );
if (theType.m_class && theType.m_class->GetActualClass(addr) != theType.m_class)
@@ -145,7 +139,7 @@ boost::shared_ptr cond::TBufferBlobStreamingService::write( const v
void cond::TBufferBlobStreamingService::read( const coral::Blob& blobData,
void* addr,
- Reflex::Type const & classDictionary ){
+ edm::TypeWithDict const & classDictionary ){
TBufferBlobTypeInfo theType( classDictionary );
const void *startingAddress = blobData.startingAddress();
size_t size = blobData.size();
diff --git a/CondCore/DBCommon/plugins/TBufferBlobStreamingService.h b/CondCore/DBCommon/plugins/TBufferBlobStreamingService.h
index dbaa1f22e16be..33deb51d803d6 100644
--- a/CondCore/DBCommon/plugins/TBufferBlobStreamingService.h
+++ b/CondCore/DBCommon/plugins/TBufferBlobStreamingService.h
@@ -6,13 +6,15 @@
#include
//
#include "CoralBase/Blob.h"
-#include "Reflex/Type.h"
+
+#include "FWCore/Utilities/interface/TypeWithDict.h"
+
#include "TClass.h"
namespace cond {
class TBufferBlobTypeInfo {
public:
- TBufferBlobTypeInfo( const Reflex::Type& type );
+ TBufferBlobTypeInfo( const edm::TypeWithDict& type );
/// length of the plain C array (zero otherwise)
std::size_t m_arraySize;
@@ -30,9 +32,9 @@ namespace cond {
virtual ~TBufferBlobStreamingService();
- boost::shared_ptr write( const void* addressOfInputData, Reflex::Type const & classDictionary, bool useCompression=false );
+ boost::shared_ptr write( const void* addressOfInputData, edm::TypeWithDict const & classDictionary, bool useCompression=false );
- void read( const coral::Blob& blobData, void* addressOfContainer, Reflex::Type const & classDictionary );
+ void read( const coral::Blob& blobData, void* addressOfContainer, edm::TypeWithDict const & classDictionary );
};
diff --git a/CondCore/DBCommon/test/testBlobStreaming.cpp b/CondCore/DBCommon/test/testBlobStreaming.cpp
index 66b336f207f5b..7708f662e6608 100644
--- a/CondCore/DBCommon/test/testBlobStreaming.cpp
+++ b/CondCore/DBCommon/test/testBlobStreaming.cpp
@@ -51,7 +51,7 @@ int main() {
for(size_t i=0; i!=vf.size(); ++i)
vf[i] = float(i)+float(i)/1000.;
- Reflex::Type vType = Reflex::Type::ByTypeInfo( typeid(std::vector));
+ edm::TypeWithDict vType = edm::TypeWithDict( typeid(std::vector) );
{
// old mode
@@ -81,7 +81,7 @@ int main() {
// CBLOB...
std::vector vc = crap;
- Reflex::Type cType = Reflex::Type::ByTypeInfo( typeid(std::vector));
+ edm::TypeWithDict cType = edm::TypeWithDict( typeid(std::vector) );
{
// old mode
diff --git a/CondCore/IOVService/test/testIOVCopy.cc b/CondCore/IOVService/test/testIOVCopy.cc
index 81f32380bd8c2..a72314a05871a 100644
--- a/CondCore/IOVService/test/testIOVCopy.cc
+++ b/CondCore/IOVService/test/testIOVCopy.cc
@@ -17,7 +17,7 @@ int main(){
std::string sourceConnect("sqlite_file:source.db");
std::string destConnect("sqlite_file:dest.db");
cond::DbConnection connection;
- connection.configuration().setMessageLevel(coral::Debug);
+ //connection.configuration().setMessageLevel(coral::Debug);
connection.configure();
cond::DbSession sourcedb = connection.createSession();
sourcedb.open("sqlite_file:source.db");
diff --git a/CondCore/IOVService/test/testqueryPContainer.cc b/CondCore/IOVService/test/testqueryPContainer.cc
index d30a55d551959..5b0adeceb92f8 100644
--- a/CondCore/IOVService/test/testqueryPContainer.cc
+++ b/CondCore/IOVService/test/testqueryPContainer.cc
@@ -12,7 +12,7 @@ int main(){
try{
edmplugin::PluginManager::configure(edmplugin::standard::config());
cond::DbConnection connection;
- connection.configuration().setMessageLevel( coral::Debug );
+ //connection.configuration().setMessageLevel( coral::Debug );
std::cout<<"#0 "<
#include
#include
#include
+#ifdef AP_NOT_FOR_RIGHT_NOW
+
static std::string const prefix("LCGReflex/");
-Reflex::Type resolvedType(const Reflex::Type& typ){
- Reflex::Type resolvedType = typ;
+edm::TypeWithDict resolvedType(const edm::TypeWithDict& typ){
+ edm::TypeWithDict resolvedType = typ;
while(resolvedType.IsTypedef()){
resolvedType = resolvedType.ToType();
}
@@ -43,17 +46,17 @@ bool isSTLContainer( const std::string& contName ){
return false;
}
-bool isBasic( const Reflex::Type& typ ){
+bool isBasic( const edm::TypeWithDict& typ ){
return ( typ.IsFundamental() ||
typ.IsEnum() ||
typ.Name(Reflex::SCOPED|Reflex::FINAL) == "std::string" ||
typ.Name(Reflex::SCOPED|Reflex::FINAL) == "std::basic_string" );
}
-void processType( const Reflex::Type& t,
+void processType( const edm::TypeWithDict& t,
std::map,std::set > >& outList,
std::set& doneList ){
- Reflex::Type objType = t;
+ edm::TypeWithDict objType = t;
std::string className = objType.Name( Reflex::SCOPED|Reflex::FINAL );
auto iD = doneList.find( className );
if( iD != doneList.end() ) return;
@@ -63,9 +66,9 @@ void processType( const Reflex::Type& t,
std::set bases;
std::set members;
- while( objType.IsArray() ) objType = objType.ToType();
+ while( objType.isArray() ) objType = objType.ToType();
if( isBasic( objType ) ) return;
- Reflex::TypeTemplate templ = objType.TemplateFamily();
+ edm::TypeWithDictTemplate templ = objType.TemplateFamily();
if ( templ ) {
className = templ.Name(Reflex::SCOPED|Reflex::FINAL);
if( isSTLContainer( className ) ) return;
@@ -73,13 +76,13 @@ void processType( const Reflex::Type& t,
for ( size_t i=0;iload(prefix + line);
- Reflex::Type t = Reflex::Type::ByName( line );
+ edm::TypeWithDict t = edm::TypeWithDict::ByName( line );
if( ! t ) throw std::runtime_error("Class "+line+" is not known by the dictionary");
processType( t, outList, doneList );
}
@@ -166,3 +169,11 @@ int main ( int argc, char *argv[] )
}
}
}
+#else // AP_NOT_FOR_RIGHT_NOW
+
+int main()
+{
+ return 0;
+}
+
+#endif // defined AP_NOT_FOR_RIGHT_NOW
diff --git a/CondCore/ORA/interface/IBlobStreamingService.h b/CondCore/ORA/interface/IBlobStreamingService.h
index 1bed13c30a4b3..f2cee28c188a8 100644
--- a/CondCore/ORA/interface/IBlobStreamingService.h
+++ b/CondCore/ORA/interface/IBlobStreamingService.h
@@ -7,8 +7,8 @@ namespace coral {
class Blob;
}
-namespace Reflex {
- class Type;
+namespace edm {
+ class TypeWithDict;
}
namespace ora {
@@ -20,10 +20,10 @@ namespace ora {
/// Empty destructor
virtual ~IBlobStreamingService() {}
- virtual boost::shared_ptr write( const void* addressOfInputData, const Reflex::Type& classDictionary, bool useCompression = true ) = 0;
+ virtual boost::shared_ptr write( const void* addressOfInputData, const edm::TypeWithDict & classDictionary, bool useCompression = true ) = 0;
/// Reads an object from a Blob and fills-in the container
- virtual void read( const coral::Blob& blobData, void* addressOfContainer, const Reflex::Type& classDictionary ) = 0;
+ virtual void read( const coral::Blob& blobData, void* addressOfContainer, const edm::TypeWithDict& classDictionary ) = 0;
};
}
diff --git a/CondCore/ORA/interface/Object.h b/CondCore/ORA/interface/Object.h
index 4588b4778ddcf..21edcc22fcc3c 100644
--- a/CondCore/ORA/interface/Object.h
+++ b/CondCore/ORA/interface/Object.h
@@ -1,11 +1,12 @@
#ifndef INCLUDE_ORA_OBJECT_H
#define INCLUDE_ORA_OBJECT_H
+#include
//
#include
#include
// externals
-#include "Reflex/Type.h"
+#include "FWCore/Utilities/interface/TypeWithDict.h"
namespace ora {
@@ -15,7 +16,7 @@ namespace ora {
template
explicit Object( const T& obj );
Object( const void* ptr, const std::type_info& typeInfo );
- Object( const void* ptr, const Reflex::Type& type );
+ Object( const void* ptr, const edm::TypeWithDict& type );
Object( const void* ptr, const std::string& typeName );
Object( const Object& rhs);
virtual ~Object();
@@ -23,7 +24,7 @@ namespace ora {
bool operator==( const Object& rhs) const;
bool operator!=( const Object& rhs) const;
void* address() const;
- const Reflex::Type& type() const;
+ const edm::TypeWithDict& type() const;
std::string typeName() const;
void* cast( const std::type_info& asType ) const;
template T* cast() const;
@@ -31,7 +32,7 @@ namespace ora {
void destruct();
private:
void* m_ptr;
- Reflex::Type m_type;
+ edm::TypeWithDict m_type;
};
template<>
diff --git a/CondCore/ORA/src/ArrayHandlerFactory.cc b/CondCore/ORA/src/ArrayHandlerFactory.cc
index b907e3ff37c72..26a8fe99f506f 100644
--- a/CondCore/ORA/src/ArrayHandlerFactory.cc
+++ b/CondCore/ORA/src/ArrayHandlerFactory.cc
@@ -4,17 +4,16 @@
#include "CArrayHandler.h"
#include "PVectorHandler.h"
// externals
-#include "Reflex/Type.h"
+#include "FWCore/Utilities/interface/TypeWithDict.h"
ora::IArrayHandler*
-ora::ArrayHandlerFactory::newArrayHandler( const Reflex::Type& arrayType )
+ora::ArrayHandlerFactory::newArrayHandler( const edm::TypeWithDict& arrayType )
{
- if(arrayType.IsArray()){
+ if(arrayType.isArray()){
return new CArrayHandler( arrayType );
} else {
- Reflex::TypeTemplate templ = arrayType.TemplateFamily();
- if ( templ ) {
- std::string contName = templ.Name(Reflex::SCOPED|Reflex::FINAL);
+ if ( arrayType.isTemplateInstance() ) {
+ std::string contName = arrayType.templateName();
if( contName == "std::vector" ||
contName == "std::list" ||
contName == "std::set" ||
@@ -36,7 +35,7 @@ ora::ArrayHandlerFactory::newArrayHandler( const Reflex::Type& arrayType )
}
}
- throwException( "No Array Handler available for class \""+arrayType.Name(Reflex::SCOPED)+"\"",
+ throwException( "No Array Handler available for class \""+arrayType.templateName()+"\"",
"ArrayHandlerFactory::newArrayHandler");
return 0;
}
diff --git a/CondCore/ORA/src/ArrayHandlerFactory.h b/CondCore/ORA/src/ArrayHandlerFactory.h
index 05f03b64cff3e..150764fe87c51 100644
--- a/CondCore/ORA/src/ArrayHandlerFactory.h
+++ b/CondCore/ORA/src/ArrayHandlerFactory.h
@@ -1,8 +1,8 @@
#ifndef INCLUDE_ORA_ARRAYHANDLERFACTORY_H
#define INCLUDE_ORA_ARRAYHANDLERFACTORY_H
-namespace Reflex {
- class Type;
+namespace edm {
+ class TypeWithDict;
}
namespace ora {
@@ -16,7 +16,7 @@ namespace ora {
class ArrayHandlerFactory {
public:
- static IArrayHandler* newArrayHandler( const Reflex::Type& arrayType );
+ static IArrayHandler* newArrayHandler( const edm::TypeWithDict& arrayType );
};
}
diff --git a/CondCore/ORA/src/BlobStreamer.cc b/CondCore/ORA/src/BlobStreamer.cc
index 1a228bd2f07ba..14df640bcf10c 100644
--- a/CondCore/ORA/src/BlobStreamer.cc
+++ b/CondCore/ORA/src/BlobStreamer.cc
@@ -13,7 +13,7 @@
#include "CoralBase/Attribute.h"
#include "CoralBase/Blob.h"
-ora::BlobWriterBase::BlobWriterBase( const Reflex::Type& objectType,
+ora::BlobWriterBase::BlobWriterBase( const edm::TypeWithDict& objectType,
MappingElement& mapping,
ContainerSchema& contSchema ):
m_objectType( objectType ),
@@ -64,7 +64,7 @@ void ora::BlobWriterBase::bindData( const void* data ){
relDataElement.bind( *blobData );
}
-ora::BlobWriter::BlobWriter( const Reflex::Type& objectType,
+ora::BlobWriter::BlobWriter( const edm::TypeWithDict& objectType,
MappingElement& mapping,
ContainerSchema& contSchema ):
BlobWriterBase( objectType, mapping, contSchema ){
@@ -87,7 +87,7 @@ void ora::BlobWriter::write( int,
bindData( data );
}
-ora::BlobUpdater::BlobUpdater( const Reflex::Type& objectType,
+ora::BlobUpdater::BlobUpdater( const edm::TypeWithDict& objectType,
MappingElement& mapping,
ContainerSchema& contSchema ):
BlobWriterBase( objectType, mapping, contSchema ){
@@ -111,7 +111,7 @@ void ora::BlobUpdater::update( int,
}
-ora::BlobReader::BlobReader( const Reflex::Type& objectType,
+ora::BlobReader::BlobReader( const edm::TypeWithDict& objectType,
MappingElement& mapping,
ContainerSchema& contSchema ):
m_objectType( objectType ),
@@ -165,7 +165,7 @@ void ora::BlobReader::read( void* data ){
void ora::BlobReader::clear(){
}
-ora::BlobStreamer::BlobStreamer( const Reflex::Type& objectType,
+ora::BlobStreamer::BlobStreamer( const edm::TypeWithDict& objectType,
MappingElement& mapping,
ContainerSchema& contSchema ):
m_objectType( objectType ),
diff --git a/CondCore/ORA/src/BlobStreamer.h b/CondCore/ORA/src/BlobStreamer.h
index 2238cd1d442b7..cf199899e6d36 100644
--- a/CondCore/ORA/src/BlobStreamer.h
+++ b/CondCore/ORA/src/BlobStreamer.h
@@ -3,7 +3,7 @@
#include "IRelationalStreamer.h"
// externals
-#include "Reflex/Type.h"
+#include "FWCore/Utilities/interface/TypeWithDict.h"
namespace ora {
@@ -15,7 +15,7 @@ namespace ora {
class BlobWriterBase {
public:
- BlobWriterBase( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
+ BlobWriterBase( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
virtual ~BlobWriterBase();
@@ -24,7 +24,7 @@ namespace ora {
void bindData( const void* data );
private:
- Reflex::Type m_objectType;
+ edm::TypeWithDict m_objectType;
MappingElement& m_mapping;
int m_columnIndex;
ContainerSchema& m_schema;
@@ -40,7 +40,7 @@ namespace ora {
class BlobWriter : public BlobWriterBase, public IRelationalWriter {
public:
- BlobWriter( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
+ BlobWriter( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
virtual ~BlobWriter();
@@ -56,7 +56,7 @@ namespace ora {
class BlobUpdater : public BlobWriterBase, public IRelationalUpdater {
public:
- BlobUpdater( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
+ BlobUpdater( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
virtual ~BlobUpdater();
@@ -71,7 +71,7 @@ namespace ora {
class BlobReader : public IRelationalReader {
public:
- BlobReader( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
+ BlobReader( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
virtual ~BlobReader();
@@ -86,7 +86,7 @@ namespace ora {
void clear();
private:
- Reflex::Type m_objectType;
+ edm::TypeWithDict m_objectType;
MappingElement& m_mapping;
int m_columnIndex;
ContainerSchema& m_schema;
@@ -101,7 +101,7 @@ namespace ora {
class BlobStreamer : public IRelationalStreamer
{
public:
- BlobStreamer( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
+ BlobStreamer( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
~BlobStreamer();
@@ -112,7 +112,7 @@ namespace ora {
IRelationalReader* newReader();
private:
- Reflex::Type m_objectType;
+ edm::TypeWithDict m_objectType;
MappingElement& m_mapping;
ContainerSchema& m_schema;
};
diff --git a/CondCore/ORA/src/CArrayHandler.cc b/CondCore/ORA/src/CArrayHandler.cc
index e7f9845d4f6ab..dac6c8b4256e2 100644
--- a/CondCore/ORA/src/CArrayHandler.cc
+++ b/CondCore/ORA/src/CArrayHandler.cc
@@ -1,10 +1,10 @@
#include "CArrayHandler.h"
#include "ClassUtils.h"
// externals
-#include "Reflex/Object.h"
+#include "FWCore/Utilities/interface/ObjectWithDict.h"
ora::CArrayIteratorHandler::CArrayIteratorHandler( const void* startAddress,
- const Reflex::Type& iteratorReturnType ):
+ const edm::TypeWithDict& iteratorReturnType ):
m_returnType(iteratorReturnType),
m_currentElement(startAddress){
@@ -15,7 +15,7 @@ ora::CArrayIteratorHandler::~CArrayIteratorHandler(){}
void
ora::CArrayIteratorHandler::increment()
{
- m_currentElement = static_cast< const char* >( m_currentElement) + m_returnType.SizeOf();
+ m_currentElement = static_cast< const char* >( m_currentElement) + m_returnType.size();
}
void*
@@ -24,19 +24,19 @@ ora::CArrayIteratorHandler::object()
return const_cast(m_currentElement);
}
-Reflex::Type&
+edm::TypeWithDict&
ora::CArrayIteratorHandler::returnType()
{
return m_returnType;
}
-ora::CArrayHandler::CArrayHandler( const Reflex::Type& dictionary ):
+ora::CArrayHandler::CArrayHandler( const edm::TypeWithDict& dictionary ):
m_type( dictionary ),
m_elementType()
{
// find the iterator return type
- Reflex::Type elementType = m_type.ToType();
+ edm::TypeWithDict elementType = m_type.toType();
m_elementType = ClassUtils::resolvedType( elementType );
}
@@ -46,8 +46,8 @@ ora::CArrayHandler::~CArrayHandler(){
size_t
ora::CArrayHandler::size( const void* )
-{
- return m_type.ArrayLength();
+{
+ return ClassUtils::arrayLength( m_type );
}
@@ -68,7 +68,7 @@ ora::CArrayHandler::clear( const void* )
{
}
-Reflex::Type&
+edm::TypeWithDict&
ora::CArrayHandler::iteratorReturnType()
{
return m_elementType;
diff --git a/CondCore/ORA/src/CArrayHandler.h b/CondCore/ORA/src/CArrayHandler.h
index 17d858880ebc8..70482626bd04f 100644
--- a/CondCore/ORA/src/CArrayHandler.h
+++ b/CondCore/ORA/src/CArrayHandler.h
@@ -3,14 +3,14 @@
#include "IArrayHandler.h"
// externals
-#include "Reflex/Reflex.h"
+#include "FWCore/Utilities/interface/TypeWithDict.h"
namespace ora {
class CArrayIteratorHandler : virtual public IArrayIteratorHandler {
public:
/// Constructor
- CArrayIteratorHandler( const void* startAddress, const Reflex::Type& iteratorReturnType );
+ CArrayIteratorHandler( const void* startAddress, const edm::TypeWithDict& iteratorReturnType );
/// Destructor
~CArrayIteratorHandler();
@@ -22,12 +22,12 @@ namespace ora {
void* object();
/// Returns the return type of the iterator dereference method
- Reflex::Type& returnType();
+ edm::TypeWithDict& returnType();
private:
/// The return type of the iterator dereference method
- Reflex::Type m_returnType;
+ edm::TypeWithDict m_returnType;
/// Current element object pointer
const void* m_currentElement;
@@ -38,7 +38,7 @@ namespace ora {
public:
/// Constructor
- explicit CArrayHandler( const Reflex::Type& dictionary );
+ explicit CArrayHandler( const edm::TypeWithDict& dictionary );
/// Destructor
~CArrayHandler();
@@ -56,17 +56,17 @@ namespace ora {
void clear( const void* address );
/// Returns the iterator return type
- Reflex::Type& iteratorReturnType();
+ edm::TypeWithDict& iteratorReturnType();
/// Returns the associativeness of the container
bool isAssociative() const { return false; }
private:
/// The dictionary information
- Reflex::Type m_type;
+ edm::TypeWithDict m_type;
/// The iterator return type
- Reflex::Type m_elementType;
+ edm::TypeWithDict m_elementType;
};
diff --git a/CondCore/ORA/src/CArrayStreamer.cc b/CondCore/ORA/src/CArrayStreamer.cc
index 9290dbb33a41f..954dd09010904 100644
--- a/CondCore/ORA/src/CArrayStreamer.cc
+++ b/CondCore/ORA/src/CArrayStreamer.cc
@@ -12,9 +12,9 @@
// externals
#include "CoralBase/Attribute.h"
#include "RelationalAccess/IBulkOperation.h"
-#include "Reflex/Object.h"
+#include "FWCore/Utilities/interface/ObjectWithDict.h"
-ora::CArrayWriter::CArrayWriter( const Reflex::Type& objectType,
+ora::CArrayWriter::CArrayWriter( const edm::TypeWithDict& objectType,
MappingElement& mapping,
ContainerSchema& contSchema ):
m_objectType( objectType ),
@@ -41,12 +41,12 @@ bool ora::CArrayWriter::build( DataElement& offset,
m_recordId.push_back(0);
// Check the array type
- Reflex::Type arrayType = m_objectType.ToType();
- Reflex::Type arrayResolvedType = ClassUtils::resolvedType(arrayType);
+ edm::TypeWithDict arrayType = m_objectType.toType();
+ edm::TypeWithDict arrayResolvedType = ClassUtils::resolvedType(arrayType);
// Check the component type
if ( ! arrayType || !arrayResolvedType ) {
throwException( "Missing dictionary information for the element type of the array \"" +
- m_objectType.Name(Reflex::SCOPED|Reflex::FINAL) + "\"",
+ m_objectType.cppName() + "\"",
"CArrayWriter::build" );
}
@@ -67,7 +67,7 @@ bool ora::CArrayWriter::build( DataElement& offset,
m_arrayHandler.reset( ArrayHandlerFactory::newArrayHandler( m_objectType ) );
- std::string arrayTypeName = arrayType.Name();
+ std::string arrayTypeName = arrayType.name();
// Retrieve the relevant mapping element
MappingElement::iterator iMe = m_mappingElement.find( arrayTypeName );
if ( iMe == m_mappingElement.end() ) {
@@ -138,7 +138,7 @@ void ora::CArrayWriter::write( int oid,
}
-ora::CArrayUpdater::CArrayUpdater(const Reflex::Type& objectType,
+ora::CArrayUpdater::CArrayUpdater(const edm::TypeWithDict& objectType,
MappingElement& mapping,
ContainerSchema& contSchema ):
m_deleter( mapping ),
@@ -166,7 +166,7 @@ void ora::CArrayUpdater::update( int oid,
m_writer.write( oid, data );
}
-ora::CArrayReader::CArrayReader(const Reflex::Type& objectType,
+ora::CArrayReader::CArrayReader(const edm::TypeWithDict& objectType,
MappingElement& mapping,
ContainerSchema& contSchema ):
m_objectType( objectType ),
@@ -193,12 +193,12 @@ bool ora::CArrayReader::build( DataElement& offset,
m_recordId.push_back(0);
// Check the array type
- Reflex::Type arrayType = m_objectType.ToType();
- Reflex::Type arrayResolvedType = ClassUtils::resolvedType(arrayType);
+ edm::TypeWithDict arrayType = m_objectType.toType();
+ edm::TypeWithDict arrayResolvedType = ClassUtils::resolvedType(arrayType);
// Check the component type
if ( ! arrayType || !arrayResolvedType ) {
throwException( "Missing dictionary information for the element type of the array \"" +
- m_objectType.Name(Reflex::SCOPED|Reflex::FINAL) + "\"",
+ m_objectType.cppName() + "\"",
"CArrayReader::build" );
}
@@ -217,7 +217,7 @@ bool ora::CArrayReader::build( DataElement& offset,
m_arrayHandler.reset( ArrayHandlerFactory::newArrayHandler( m_objectType ) );
- std::string arrayTypeName = arrayType.Name();
+ std::string arrayTypeName = arrayType.name();
// Retrieve the relevant mapping element
MappingElement::iterator iMe = m_mappingElement.find( arrayTypeName );
@@ -258,13 +258,13 @@ void ora::CArrayReader::read( void* destinationData ) {
}
void* address = m_offset->address( destinationData );
- Reflex::Type iteratorDereferenceReturnType = m_arrayHandler->iteratorReturnType();
+ edm::TypeWithDict iteratorDereferenceReturnType = m_arrayHandler->iteratorReturnType();
- bool isElementFundamental = iteratorDereferenceReturnType.IsFundamental();
+ bool isElementFundamental = iteratorDereferenceReturnType.isFundamental();
std::string positionColumn = m_mappingElement.posColumn();
- size_t arraySize = m_objectType.ArrayLength();
+ size_t arraySize = ClassUtils::arrayLength( m_objectType );
m_arrayHandler->clear( address );
@@ -288,11 +288,11 @@ void ora::CArrayReader::read( void* destinationData ) {
}
// the memory has been allocated already!
- objectData = static_cast(address)+arrayIndex*iteratorDereferenceReturnType.SizeOf();
+ objectData = static_cast(address)+arrayIndex*iteratorDereferenceReturnType.size();
if(!isElementFundamental){
// in this case the initialization is required: use default constructor...
- iteratorDereferenceReturnType.Construct(Reflex::Type(0,0),std::vector< void* >(),objectData);
+ iteratorDereferenceReturnType.construct();// edm::TypeWithDict(0,0),std::vector< void* >(),objectData);
}
m_dataReader->setRecordId( m_recordId );
@@ -309,7 +309,7 @@ void ora::CArrayReader::clear(){
if(m_dataReader.get()) m_dataReader->clear();
}
-ora::CArrayStreamer::CArrayStreamer( const Reflex::Type& objectType,
+ora::CArrayStreamer::CArrayStreamer( const edm::TypeWithDict& objectType,
MappingElement& mapping,
ContainerSchema& contSchema ):
m_objectType( objectType ),
diff --git a/CondCore/ORA/src/CArrayStreamer.h b/CondCore/ORA/src/CArrayStreamer.h
index df01f45c931c4..bc78a89cdd53a 100644
--- a/CondCore/ORA/src/CArrayStreamer.h
+++ b/CondCore/ORA/src/CArrayStreamer.h
@@ -7,7 +7,7 @@
//
#include
// externals
-#include "Reflex/Type.h"
+#include "FWCore/Utilities/interface/TypeWithDict.h"
namespace ora {
@@ -22,7 +22,7 @@ namespace ora {
public:
/// Constructor
- CArrayWriter( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
+ CArrayWriter( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
virtual ~CArrayWriter();
bool build( DataElement& offset, IRelationalData& relationalData, RelationalBuffer& operationBuffer );
@@ -33,7 +33,7 @@ namespace ora {
void write( int oid,const void* data );
private:
- Reflex::Type m_objectType;
+ edm::TypeWithDict m_objectType;
MappingElement& m_mappingElement;
ContainerSchema& m_schema;
std::vector m_recordId;
@@ -52,7 +52,7 @@ namespace ora {
public:
/// Constructor
- CArrayUpdater(const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
+ CArrayUpdater(const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
virtual ~CArrayUpdater();
@@ -74,7 +74,7 @@ namespace ora {
public:
/// Constructor
- CArrayReader(const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
+ CArrayReader(const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
virtual ~CArrayReader();
@@ -90,7 +90,7 @@ namespace ora {
void clear();
private:
- Reflex::Type m_objectType;
+ edm::TypeWithDict m_objectType;
MappingElement& m_mappingElement;
ContainerSchema& m_schema;
std::vector m_recordId;
@@ -106,7 +106,7 @@ namespace ora {
class CArrayStreamer : public IRelationalStreamer
{
public:
- CArrayStreamer( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
+ CArrayStreamer( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
~CArrayStreamer();
@@ -117,7 +117,7 @@ namespace ora {
IRelationalReader* newReader();
private:
- Reflex::Type m_objectType;
+ edm::TypeWithDict m_objectType;
MappingElement& m_mapping;
ContainerSchema& m_schema;
};
diff --git a/CondCore/ORA/src/ClassUtils.cc b/CondCore/ORA/src/ClassUtils.cc
index 90374b06213dc..c313ecb683d07 100644
--- a/CondCore/ORA/src/ClassUtils.cc
+++ b/CondCore/ORA/src/ClassUtils.cc
@@ -4,12 +4,15 @@
#include "FWCore/PluginManager/interface/PluginCapabilities.h"
#include "ClassUtils.h"
//
+#include
#include
// externals
-#include "Reflex/Object.h"
-#include "Reflex/Base.h"
+#include "FWCore/Utilities/interface/ObjectWithDict.h"
+#include "FWCore/Utilities/interface/BaseWithDict.h"
+#include "TROOT.h"
+#include "TDictAttributeMap.h"
-ora::RflxDeleter::RflxDeleter( const Reflex::Type& type ):
+ora::RflxDeleter::RflxDeleter( const edm::TypeWithDict& type ):
m_type( type ){
}
@@ -21,7 +24,7 @@ ora::RflxDeleter::~RflxDeleter(){
}
void ora::RflxDeleter::operator()( void* ptr ){
- m_type.Destruct( ptr );
+ m_type.destruct( ptr );
}
void ora::ClassUtils::loadDictionary( const std::string& className ){
@@ -29,46 +32,116 @@ void ora::ClassUtils::loadDictionary( const std::string& className ){
edmplugin::PluginCapabilities::get()->load(prefix + className);
}
-void* ora::ClassUtils::upCast( const Reflex::Type& type,
+void* ora::ClassUtils::upCast( const edm::TypeWithDict& type,
void* ptr,
- const Reflex::Type& castType ){
+ const edm::TypeWithDict& castType ){
void* ret = 0;
if( type == castType ){
ret = ptr;
- } else if( type.HasBase( castType )){
- Reflex::Object theObj( type, ptr );
- ret = theObj.CastObject( castType ).Address();
+ } else if( type.hasBase( castType )){
+ ret = reinterpret_cast(reinterpret_cast(ptr) + type.getBaseClassOffset(castType));
}
return ret;
}
-bool ora::ClassUtils::isType( const Reflex::Type& type,
- const Reflex::Type& baseType ){
+bool ora::ClassUtils::isType( const edm::TypeWithDict& type,
+ const edm::TypeWithDict& baseType ){
bool ret = false;
- if( type == baseType || type.HasBase( baseType )){
+ if( type == baseType || type.hasBase( baseType )){
ret = true;
}
return ret;
}
-bool ora::ClassUtils::checkMappedType( const Reflex::Type& type,
- const std::string& mappedTypeName ){
+static
+void
+replaceString(std::string& name, std::string const& from, std::string const& to) {
+ // from must not be a substring of to.
+ std::string::size_type length = from.size();
+ std::string::size_type pos = 0;
+ while((pos = name.find(from, pos)) != std::string::npos) {
+ name.replace(pos, length, to);
+ }
+}
+
+static
+bool
+compareWithSuffixes(std::string const& name, std::string const& other) {
+ size_t pos = name.find('<');
+ if(pos == std::string::npos) {
+ // Not a template instance
+ return false;
+ }
+ size_t nameSize = name.size();
+ if(other.size() >= nameSize) {
+ // Can't be a case with ull qualifiers no name.
+ return false;
+ }
+ if(name.substr(0, pos) != other.substr(0, pos)) {
+ return false;
+ }
+ int nesting = 0;
+ size_t j = pos;
+ for(size_t i = pos; i < nameSize; ++i) {
+ char c = name[i];
+ if (c == '<') ++nesting;
+ if(c != other[j]) {
+ if(c != 'u' && c != 'l') return false;
+ if(nesting == 0) return false;
+ if(!isdigit(name[i-1])) return false;
+ for(size_t n = i-2; n >= pos; --n) {
+ char q = name[n];
+ if(q == '<' || q == ',') break;
+ if(!isdigit(q)) return false;
+ }
+ for(size_t n = i+1; n < nameSize; ++n) {
+ char q = name[n];
+ if(q == '>' || q == ',') break;
+ if(q != 'l') return false;
+ ++i;
+ }
+ continue;
+ }
+ if (c == '>') --nesting;
+ ++j;
+ }
+ return true;
+}
+
+bool ora::ClassUtils::checkMappedType( const edm::TypeWithDict& type,
+ const std::string& mappedTypeName ){
if( isTypeString( type ) ){
return (mappedTypeName=="std::basic_string" || mappedTypeName=="basic_string" || mappedTypeName=="std::string" || mappedTypeName=="string");
- } else if ( type.IsEnum() ){
+ } else if ( type.isEnum() ){
return mappedTypeName=="int";
} else if ( isTypeOraVector( type ) ){
return isTypeNameOraVector( mappedTypeName );
- } else {
- return type.Name(Reflex::SCOPED)==mappedTypeName;
+ } else if ( type.cppName() == mappedTypeName ) {
+ return true;
+ }
+ // ROOT 6 uses these typedefs in names.
+ std::string typeName(mappedTypeName);
+ replaceString(typeName, "std::basic_string ", "std::string");
+ replaceString(typeName, "std::basic_string", "std::string");
+ if ( type.cppName() == typeName ) {
+ return true;
}
+ // Ignore u and l qualifiers off of integer template parameters for comparison
+ return ( compareWithSuffixes( type.cppName(), typeName ) );
}
-bool ora::ClassUtils::findBaseType( Reflex::Type& type, Reflex::Type& baseType, Reflex::OffsetFunction& func ){
+bool ora::ClassUtils::findBaseType( edm::TypeWithDict& type, edm::TypeWithDict& baseType, size_t& func ){
bool found = false;
+ if ( ! type.hasBase(baseType) ) {
+ return found; // no inheritance, nothing to do
+ } else {
+ func = type.getBaseClassOffset(baseType);
+ found = true;
+ }
+/*-ap old code
for ( unsigned int i=0;i" ){
// ugly, but no other way with Reflex...
- type = Reflex::Type::ByName("std::string");
+ type = edm::TypeWithDict::byName("std::string");
}
if( !type ){
loadDictionary( className );
- type = Reflex::Type::ByName( className );
+ type = edm::TypeWithDict::byName( className );
}
if( !type && throwFlag ){
throwException( "Class \""+className+"\" has not been found in the dictionary.",
@@ -124,32 +199,31 @@ Reflex::Type ora::ClassUtils::lookupDictionary( const std::string& className, bo
return type;
}
-void* ora::ClassUtils::constructObject( const Reflex::Type& typ ){
+void* ora::ClassUtils::constructObject( const edm::TypeWithDict& typ ){
void* ptr = 0;
- if( typ.Name(Reflex::SCOPED)=="std::string"){
+ if( typ.cppName()=="std::string"){
ptr = new std::string("");
} else {
- ptr = typ.Construct().Address();
+ ptr = typ.construct().address();
}
return ptr;
}
-bool ora::ClassUtils::isTypeString(const Reflex::Type& typ){
- std::string name = typ.Name(Reflex::SCOPED|Reflex::FINAL);
+bool ora::ClassUtils::isTypeString(const edm::TypeWithDict& typ){
+ std::string name = typ.cppName();
return ( name == "std::string" ||
name == "std::basic_string" );
}
-bool ora::ClassUtils::isTypePrimitive(const Reflex::Type& typ){
- return ( typ.IsFundamental() || typ.IsEnum() || isTypeString( typ ) );
+bool ora::ClassUtils::isTypePrimitive(const edm::TypeWithDict& typ){
+ return ( typ.isFundamental() || typ.isEnum() || isTypeString( typ ) );
}
-bool ora::ClassUtils::isTypeContainer(const Reflex::Type& typ){
- Reflex::TypeTemplate templ = typ.TemplateFamily();
- if (! templ) {
+bool ora::ClassUtils::isTypeContainer(const edm::TypeWithDict& typ){
+ if ( ! typ.isTemplateInstance() ) {
return false;
} else {
- std::string contName = templ.Name(Reflex::SCOPED|Reflex::FINAL);
+ std::string contName = typ.templateName();
if( contName == "std::vector" ||
contName == "std::list" ||
contName == "std::deque" ||
@@ -170,12 +244,11 @@ bool ora::ClassUtils::isTypeContainer(const Reflex::Type& typ){
return false;
}
-bool ora::ClassUtils::isTypeKeyedContainer(const Reflex::Type& typ){
- Reflex::TypeTemplate tt = typ.TemplateFamily();
- if (! tt) {
+bool ora::ClassUtils::isTypeKeyedContainer(const edm::TypeWithDict& typ){
+ if ( ! typ.isTemplateInstance() ) {
return false;
} else {
- std::string contName = tt.Name(Reflex::SCOPED|Reflex::FINAL);
+ std::string contName = typ.templateName();
if( contName == "std::map" ||
contName == "std::multimap" ||
contName == "std::set" ||
@@ -190,12 +263,11 @@ bool ora::ClassUtils::isTypeKeyedContainer(const Reflex::Type& typ){
return false;
}
-bool ora::ClassUtils::isTypeNonKeyedContainer(const Reflex::Type& typ){
- Reflex::TypeTemplate templ = typ.TemplateFamily();
- if (! templ) {
+bool ora::ClassUtils::isTypeNonKeyedContainer(const edm::TypeWithDict& typ){
+ if ( ! typ.isTemplateInstance() ) {
return false;
} else {
- std::string contName = templ.Name(Reflex::SCOPED|Reflex::FINAL);
+ std::string contName = typ.templateName();
if( contName == "std::vector" ||
contName == "std::list" ||
contName == "std::deque" ||
@@ -208,12 +280,11 @@ bool ora::ClassUtils::isTypeNonKeyedContainer(const Reflex::Type& typ){
return false;
}
-bool ora::ClassUtils::isTypeAssociativeContainer(const Reflex::Type& typ){
- Reflex::TypeTemplate tt = typ.TemplateFamily();
- if (! tt) {
+bool ora::ClassUtils::isTypeAssociativeContainer(const edm::TypeWithDict& typ){
+ if ( ! typ.isTemplateInstance() ) {
return false;
} else {
- std::string contName = tt.Name(Reflex::SCOPED|Reflex::FINAL);
+ std::string contName = typ.templateName();
if( contName == "std::map" ||
contName == "std::multimap" ||
contName == "__gnu_cxx::hash_map" ||
@@ -224,12 +295,11 @@ bool ora::ClassUtils::isTypeAssociativeContainer(const Reflex::Type& typ){
return false;
}
-bool ora::ClassUtils::isTypeNonAssociativeContainer(const Reflex::Type& typ){
- Reflex::TypeTemplate tt = typ.TemplateFamily();
- if (! tt) {
+bool ora::ClassUtils::isTypeNonAssociativeContainer(const edm::TypeWithDict& typ){
+ if ( ! typ.isTemplateInstance() ) {
return false;
} else {
- std::string contName = tt.Name(Reflex::SCOPED|Reflex::FINAL);
+ std::string contName = typ.templateName();
if( contName == "std::vector" ||
contName == "std::list" ||
contName == "std::deque" ||
@@ -247,12 +317,11 @@ bool ora::ClassUtils::isTypeNonAssociativeContainer(const Reflex::Type& typ){
}
-bool ora::ClassUtils::isTypeOraPointer( const Reflex::Type& typ){
- Reflex::TypeTemplate templ = typ.TemplateFamily();
- if (! templ) {
+bool ora::ClassUtils::isTypeOraPointer( const edm::TypeWithDict& typ){
+ if ( ! typ.isTemplateInstance() ) {
return false;
} else {
- std::string contName = templ.Name(Reflex::SCOPED|Reflex::FINAL);
+ std::string contName = typ.templateName();
if( contName == "ora::Ptr" ){
return true;
}
@@ -260,20 +329,19 @@ bool ora::ClassUtils::isTypeOraPointer( const Reflex::Type& typ){
return false;
}
-bool ora::ClassUtils::isTypeOraReference( const Reflex::Type& typ){
- return typ.HasBase(Reflex::Type::ByTypeInfo(typeid(ora::Reference)));
+bool ora::ClassUtils::isTypeOraReference( const edm::TypeWithDict& typ){
+ return typ.hasBase( edm::TypeWithDict(typeid(ora::Reference)) );
}
-bool ora::ClassUtils::isTypeNamedReference( const Reflex::Type& typ){
- return typ.HasBase(Reflex::Type::ByTypeInfo(typeid(ora::NamedReference)));
+bool ora::ClassUtils::isTypeNamedReference( const edm::TypeWithDict& typ){
+ return typ.hasBase( edm::TypeWithDict(typeid(ora::NamedReference)) );
}
-bool ora::ClassUtils::isTypeUniqueReference( const Reflex::Type& typ){
- Reflex::TypeTemplate templ = typ.TemplateFamily();
- if (! templ) {
+bool ora::ClassUtils::isTypeUniqueReference( const edm::TypeWithDict& typ){
+ if ( ! typ.isTemplateInstance() ) {
return false;
} else {
- std::string contName = templ.Name(Reflex::SCOPED|Reflex::FINAL);
+ std::string contName = typ.templateName();
if( contName == "ora::UniqueRef" ){
return true;
}
@@ -281,12 +349,11 @@ bool ora::ClassUtils::isTypeUniqueReference( const Reflex::Type& typ){
return false;
}
-bool ora::ClassUtils::isTypePVector( const Reflex::Type& typ){
- Reflex::TypeTemplate templ = typ.TemplateFamily();
- if (! templ) {
+bool ora::ClassUtils::isTypePVector( const edm::TypeWithDict& typ){
+ if ( ! typ.isTemplateInstance() ) {
return false;
} else {
- std::string contName = templ.Name(Reflex::SCOPED|Reflex::FINAL);
+ std::string contName = typ.templateName();
if( contName == "ora::PVector" ){
return true;
}
@@ -294,12 +361,11 @@ bool ora::ClassUtils::isTypePVector( const Reflex::Type& typ){
return false;
}
-bool ora::ClassUtils::isTypeQueryableVector( const Reflex::Type& typ){
- Reflex::TypeTemplate templ = typ.TemplateFamily();
- if (! templ) {
+bool ora::ClassUtils::isTypeQueryableVector( const edm::TypeWithDict& typ){
+ if ( ! typ.isTemplateInstance() ) {
return false;
} else {
- std::string contName = templ.Name(Reflex::SCOPED|Reflex::FINAL);
+ std::string contName = typ.templateName();
if( contName == "ora::QueryableVector" ){
return true;
}
@@ -307,7 +373,7 @@ bool ora::ClassUtils::isTypeQueryableVector( const Reflex::Type& typ){
return false;
}
-bool ora::ClassUtils::isTypeOraVector( const Reflex::Type& typ){
+bool ora::ClassUtils::isTypeOraVector( const edm::TypeWithDict& typ){
if( isTypePVector( typ ) || isTypeQueryableVector( typ ) ){
return true;
}
@@ -323,28 +389,29 @@ bool ora::ClassUtils::isTypeNameOraVector( const std::string& typeName ){
return false;
}
-bool ora::ClassUtils::isTypeObject( const Reflex::Type& typ){
- Reflex::Type resType = ClassUtils::resolvedType( typ );
+bool ora::ClassUtils::isTypeObject( const edm::TypeWithDict& typ){
+ edm::TypeWithDict resType = ClassUtils::resolvedType( typ );
if( isTypePrimitive( resType ) ) {
//if ( resType.IsFundamental() || resType.IsEnum() || isTypeString(resType) ) {
return false;
} else {
- if( resType.IsArray() ) return false;
- if( isTypeContainer( resType ) ) return false;
- if( isTypeOraPointer( resType ) ) return false;
+ if( resType.isArray( ) ) return false;
+ if( isTypeContainer( resType ) ) return false;
+ if( isTypeOraPointer( resType ) ) return false;
if( isTypeUniqueReference( resType ) ) return false;
- if( isTypeOraVector( resType ) ) return false;
+ if( isTypeOraVector( resType ) ) return false;
}
return true;
}
-Reflex::Type ora::ClassUtils::containerValueType(const Reflex::Type& typ){
- Reflex::Type valueType;
+edm::TypeWithDict ora::ClassUtils::containerValueType(const edm::TypeWithDict& typ){
+ /*-ap old code
+ edm::TypeWithDict valueType;
// find the iterator return type as the member value_type of the containers
size_t subTypeSize = typ.SubTypeSize();
size_t i=0;
while(iGetAttributeMap();
+ if( classProps && classProps->HasKey( propertyName.c_str() ) ){
+ ret = classProps->GetPropertyAsString( propertyName.c_str() );
+ }
+ }
+ return ret;
+}
+
+std::string ora::ClassUtils::getDataMemberProperty( const std::string& propertyName,
+ const edm::MemberWithDict& dataMember ){
+ std::string ret("");
+ TClass* declaringClass = dataMember.declaringType().getClass();
+ if( declaringClass ){
+ auto dm = declaringClass->GetDataMember( dataMember.name().c_str() );
+ if( dm ) {
+ TDictAttributeMap* memberProps = dm->GetAttributeMap();
+ if( memberProps && memberProps->HasKey( propertyName.c_str() ) ){
+ ret = memberProps->GetPropertyAsString( propertyName.c_str() );
+ }
+ }
+ }
+ return ret;
}
diff --git a/CondCore/ORA/src/ClassUtils.h b/CondCore/ORA/src/ClassUtils.h
index 7c8848aac0408..cde2d71a2d4b5 100644
--- a/CondCore/ORA/src/ClassUtils.h
+++ b/CondCore/ORA/src/ClassUtils.h
@@ -2,14 +2,14 @@
#define INCLUDE_ORA_CLASSUTILS_H
// externals
-#include "Reflex/Type.h"
+#include "FWCore/Utilities/interface/TypeWithDict.h"
namespace ora {
class RflxDeleter{
public:
- RflxDeleter( const Reflex::Type& type );
+ RflxDeleter( const edm::TypeWithDict& type );
RflxDeleter( const RflxDeleter& rhs );
@@ -18,7 +18,7 @@ namespace ora {
void operator()( void* ptr );
private:
- Reflex::Type m_type;
+ edm::TypeWithDict m_type;
};
@@ -26,64 +26,68 @@ namespace ora {
void loadDictionary( const std::string& className );
- void* upCast( const Reflex::Type& type, void* ptr, const Reflex::Type& asType );
+ void* upCast( const edm::TypeWithDict& type, void* ptr, const edm::TypeWithDict& asType );
- bool isType( const Reflex::Type& type, const Reflex::Type& baseType );
+ bool isType( const edm::TypeWithDict& type, const edm::TypeWithDict& baseType );
- bool checkMappedType( const Reflex::Type& type, const std::string& mappedTypeName );
+ bool checkMappedType( const edm::TypeWithDict& type, const std::string& mappedTypeName );
- bool findBaseType( Reflex::Type& type, Reflex::Type& baseType, Reflex::OffsetFunction& func );
+ bool findBaseType( edm::TypeWithDict& type, edm::TypeWithDict& baseType, size_t& func );
std::string demangledName( const std::type_info& typeInfo );
- Reflex::Type lookupDictionary( const std::type_info& typeInfo, bool throwFlag = true );
+ edm::TypeWithDict lookupDictionary( const std::type_info& typeInfo, bool throwFlag = true );
- Reflex::Type lookupDictionary( const std::string& className, bool throwFlag = true );
+ edm::TypeWithDict lookupDictionary( const std::string& className, bool throwFlag = true );
- void* constructObject( const Reflex::Type& typ );
+ void* constructObject( const edm::TypeWithDict& typ );
- bool isTypeString(const Reflex::Type& typ);
+ bool isTypeString(const edm::TypeWithDict& typ);
- bool isTypePrimitive(const Reflex::Type& typ);
+ bool isTypePrimitive(const edm::TypeWithDict& typ);
- bool isTypeContainer(const Reflex::Type& typ);
+ bool isTypeContainer(const edm::TypeWithDict& typ);
- bool isTypeKeyedContainer(const Reflex::Type& typ);
+ bool isTypeKeyedContainer(const edm::TypeWithDict& typ);
- bool isTypeNonKeyedContainer(const Reflex::Type& typ);
+ bool isTypeNonKeyedContainer(const edm::TypeWithDict& typ);
- bool isTypeAssociativeContainer(const Reflex::Type& typ);
+ bool isTypeAssociativeContainer(const edm::TypeWithDict& typ);
- bool isTypeNonAssociativeContainer(const Reflex::Type& typ);
+ bool isTypeNonAssociativeContainer(const edm::TypeWithDict& typ);
- Reflex::Type containerValueType(const Reflex::Type& typ);
+ edm::TypeWithDict containerValueType(const edm::TypeWithDict& typ);
- Reflex::Type containerKeyType(const Reflex::Type& typ);
+ edm::TypeWithDict containerKeyType(const edm::TypeWithDict& typ);
- Reflex::Type containerDataType(const Reflex::Type& typ);
+ edm::TypeWithDict containerDataType(const edm::TypeWithDict& typ);
- Reflex::Type containerSubType(const Reflex::Type& typ, const std::string& subTypeName);
+ edm::TypeWithDict containerSubType(const edm::TypeWithDict& typ, const std::string& subTypeName);
- Reflex::Type resolvedType(const Reflex::Type& typ);
+ edm::TypeWithDict resolvedType(const edm::TypeWithDict& typ);
- bool isTypeOraReference( const Reflex::Type& typ);
+ bool isTypeOraReference( const edm::TypeWithDict& typ);
- bool isTypeNamedReference( const Reflex::Type& typ);
+ bool isTypeNamedReference( const edm::TypeWithDict& typ);
- bool isTypeOraPointer( const Reflex::Type& typ);
+ bool isTypeOraPointer( const edm::TypeWithDict& typ);
- bool isTypeUniqueReference( const Reflex::Type& typ);
+ bool isTypeUniqueReference( const edm::TypeWithDict& typ);
- bool isTypePVector( const Reflex::Type& typ);
+ bool isTypePVector( const edm::TypeWithDict& typ);
- bool isTypeQueryableVector( const Reflex::Type& typ);
+ bool isTypeQueryableVector( const edm::TypeWithDict& typ);
- bool isTypeOraVector( const Reflex::Type& typ);
+ bool isTypeOraVector( const edm::TypeWithDict& typ);
bool isTypeNameOraVector( const std::string& typeName );
- bool isTypeObject( const Reflex::Type& typ);
+ bool isTypeObject( const edm::TypeWithDict& typ);
+ size_t arrayLength( const edm::TypeWithDict& typ );
+
+ std::string getClassProperty( const std::string& propertyName, const edm::TypeWithDict& type );
+ std::string getDataMemberProperty( const std::string& propertyName, const edm::MemberWithDict& dataMember );
}
diff --git a/CondCore/ORA/src/Container.cc b/CondCore/ORA/src/Container.cc
index 7ca6363b5c030..6d7ab33592c99 100644
--- a/CondCore/ORA/src/Container.cc
+++ b/CondCore/ORA/src/Container.cc
@@ -39,7 +39,7 @@ ora::Object ora::ContainerIterator::getItem(){
}
boost::shared_ptr ora::ContainerIterator::getItemAsType( const std::type_info& asTypeInfo ){
- Reflex::Type castType = ClassUtils::lookupDictionary( asTypeInfo );
+ edm::TypeWithDict castType = ClassUtils::lookupDictionary( asTypeInfo );
void* ptr = m_buffer->getItemAsType( castType );
return boost::shared_ptr( ptr, RflxDeleter( m_buffer->type() ) );
}
@@ -77,8 +77,8 @@ const std::string& ora::Container::className(){
}
std::string ora::Container::realClassName(){
- Reflex::Type type = ClassUtils::lookupDictionary( className() );
- std::string ret = ClassUtils::demangledName( type.TypeInfo() );
+ edm::TypeWithDict type = ClassUtils::lookupDictionary( className() );
+ std::string ret = ClassUtils::demangledName( type.typeInfo() );
ret.erase( std::remove( ret.begin(), ret.end(), ' ' ), ret.end() );
return ret;
}
@@ -97,7 +97,7 @@ ora::ContainerIterator ora::Container::iterator(){
}
void ora::Container::extendSchema( const std::type_info& typeInfo ){
- Reflex::Type type = ClassUtils::lookupDictionary( typeInfo );
+ edm::TypeWithDict type = ClassUtils::lookupDictionary( typeInfo );
m_dbContainer->extendSchema( type );
}
@@ -112,7 +112,7 @@ ora::Object ora::Container::fetchItem(int itemId){
boost::shared_ptr ora::Container::fetchItemAsType(int itemId,
const std::type_info& asTypeInfo){
- Reflex::Type asType = ClassUtils::lookupDictionary( asTypeInfo );
+ edm::TypeWithDict asType = ClassUtils::lookupDictionary( asTypeInfo );
void* ptr = m_dbContainer->fetchItemAsType(itemId, asType );
if(!ptr) return boost::shared_ptr();
return boost::shared_ptr( ptr, RflxDeleter( m_dbContainer->type() ) );
@@ -127,7 +127,7 @@ bool ora::Container::isLocked(){
}
int ora::Container::insertItem( const Object& data ){
- const Reflex::Type& objType = data.type();
+ const edm::TypeWithDict& objType = data.type();
if(!objType){
throwException("Object class has not been found in the dictionary.",
"Container::insertItem");
@@ -137,13 +137,13 @@ int ora::Container::insertItem( const Object& data ){
int ora::Container::insertItem( const void* data,
const std::type_info& typeInfo ){
- Reflex::Type type = ClassUtils::lookupDictionary( typeInfo );
+ edm::TypeWithDict type = ClassUtils::lookupDictionary( typeInfo );
return m_dbContainer->insertItem( data, type );
}
void ora::Container::updateItem( int itemId,
const Object& data ){
- const Reflex::Type& objType = data.type();
+ const edm::TypeWithDict& objType = data.type();
if(!objType){
throwException("Object class has not been found in the dictionary.",
"Container::updateItem");
@@ -154,7 +154,7 @@ void ora::Container::updateItem( int itemId,
void ora::Container::updateItem( int itemId,
const void* data,
const std::type_info& typeInfo ){
- Reflex::Type type = ClassUtils::lookupDictionary( typeInfo );
+ edm::TypeWithDict type = ClassUtils::lookupDictionary( typeInfo );
m_dbContainer->updateItem( itemId, data, type );
}
diff --git a/CondCore/ORA/src/ContainerSchema.cc b/CondCore/ORA/src/ContainerSchema.cc
index e50df442f5c4e..2780aacab40c3 100644
--- a/CondCore/ORA/src/ContainerSchema.cc
+++ b/CondCore/ORA/src/ContainerSchema.cc
@@ -49,11 +49,11 @@ namespace ora {
ora::ContainerSchema::ContainerSchema( int containerId,
const std::string& containerName,
- const Reflex::Type& containerType,
+ const edm::TypeWithDict& containerType,
DatabaseSession& session ):
m_containerId( containerId ),
m_containerName( containerName ),
- m_className( containerType.Name( Reflex::SCOPED ) ),
+ m_className( containerType.cppName( ) ),
m_classDict( containerType ),
m_session( session ),
m_loaded( false ),
@@ -172,7 +172,7 @@ void ora::ContainerSchema::evolve(){
MappingGenerator mapGen( m_session.schema().storageSchema() );
// retrieve the base mapping
MappingTree baseMapping;
- if( !m_session.mappingDatabase().getBaseMappingForContainer( m_classDict.Name(Reflex::SCOPED), m_containerId, baseMapping )){
+ if( !m_session.mappingDatabase().getBaseMappingForContainer( m_classDict.cppName(), m_containerId, baseMapping )){
throwException("Base mapping has not been found in the database.",
"ContainerSchema::evolve");
}
@@ -186,13 +186,13 @@ void ora::ContainerSchema::evolve(){
m_loaded = true;
}
-void ora::ContainerSchema::evolve( const Reflex::Type& dependentClass, MappingTree& baseMapping ){
- std::string className = dependentClass.Name(Reflex::SCOPED);
+void ora::ContainerSchema::evolve( const edm::TypeWithDict& dependentClass, MappingTree& baseMapping ){
+ std::string className = dependentClass.cppName();
MappingGenerator mapGen( m_session.schema().storageSchema() );
std::map::iterator iDep =
m_dependentMappings.insert( std::make_pair( className, new MappingTree ) ).first;
- if( baseMapping.className() != dependentClass.Name(Reflex::SCOPED) ){
- throwException("Provided base mapping does not map class \""+dependentClass.Name(Reflex::SCOPED)+"\".",
+ if( baseMapping.className() != dependentClass.cppName() ){
+ throwException("Provided base mapping does not map class \""+dependentClass.cppName()+"\".",
"ContainerSchema::evolve");
}
mapGen.createNewDependentMapping( dependentClass, m_mapping, baseMapping, *iDep->second );
@@ -214,7 +214,7 @@ void ora::ContainerSchema::setAccessPermission( const std::string& principal,
}
}
-const Reflex::Type& ora::ContainerSchema::type(){
+const edm::TypeWithDict& ora::ContainerSchema::type(){
initClassDict();
return m_classDict;
}
@@ -244,10 +244,10 @@ ora::MappingTree& ora::ContainerSchema::mapping( bool writeEnabled ){
return m_mapping;
}
-bool ora::ContainerSchema::loadMappingForDependentClass( const Reflex::Type& dependentClassDict ){
+bool ora::ContainerSchema::loadMappingForDependentClass( const edm::TypeWithDict& dependentClassDict ){
if( !dependentClassDict ) throwException("The dependent class has not been found in the dictionary.",
"ContainerSchema::loadMappingForDependentClass");
- std::string className = dependentClassDict.Name(Reflex::SCOPED);
+ std::string className = dependentClassDict.cppName();
std::map::iterator iDep = m_dependentMappings.find( className );
if( iDep == m_dependentMappings.end() ){
// not in cache, search the database...
@@ -263,8 +263,8 @@ bool ora::ContainerSchema::loadMappingForDependentClass( const Reflex::Type& dep
return true;
}
-void ora::ContainerSchema::create( const Reflex::Type& dependentClassDict ){
- std::string className = dependentClassDict.Name(Reflex::SCOPED);
+void ora::ContainerSchema::create( const edm::TypeWithDict& dependentClassDict ){
+ std::string className = dependentClassDict.cppName();
std::map::iterator iDep =
m_dependentMappings.insert( std::make_pair( className, new MappingTree ) ).first;
MappingGenerator mapGen( m_session.schema().storageSchema() );
@@ -278,8 +278,8 @@ void ora::ContainerSchema::create( const Reflex::Type& dependentClassDict ){
m_containerSchemaSequences.create( MappingRules::sequenceNameForDependentClass( m_containerName, className ));
}
-void ora::ContainerSchema::extend( const Reflex::Type& dependentClassDict ){
- std::string className = dependentClassDict.Name(Reflex::SCOPED);
+void ora::ContainerSchema::extend( const edm::TypeWithDict& dependentClassDict ){
+ std::string className = dependentClassDict.cppName();
MappingTree baseMapping;
if( !m_session.mappingDatabase().getBaseMappingForContainer( className,
m_containerId, baseMapping ) ){
@@ -289,7 +289,7 @@ void ora::ContainerSchema::extend( const Reflex::Type& dependentClassDict ){
}
}
-bool ora::ContainerSchema::extendIfRequired( const Reflex::Type& dependentClassDict ){
+bool ora::ContainerSchema::extendIfRequired( const edm::TypeWithDict& dependentClassDict ){
bool ret = false;
if( ! loadMappingForDependentClass( dependentClassDict ) ){
extend( dependentClassDict );
@@ -298,9 +298,9 @@ bool ora::ContainerSchema::extendIfRequired( const Reflex::Type& dependentClassD
return ret;
}
-ora::MappingElement& ora::ContainerSchema::mappingForDependentClass( const Reflex::Type& dependentClassDict,
+ora::MappingElement& ora::ContainerSchema::mappingForDependentClass( const edm::TypeWithDict& dependentClassDict,
bool writeEnabled ){
- std::string className = dependentClassDict.Name(Reflex::SCOPED);
+ std::string className = dependentClassDict.cppName();
if( ! loadMappingForDependentClass( dependentClassDict ) ){
if( writeEnabled ){
// check if a base is available:
diff --git a/CondCore/ORA/src/ContainerSchema.h b/CondCore/ORA/src/ContainerSchema.h
index b2a73519708fb..8bd16a4343d23 100644
--- a/CondCore/ORA/src/ContainerSchema.h
+++ b/CondCore/ORA/src/ContainerSchema.h
@@ -4,7 +4,7 @@
#include "MappingTree.h"
#include "Sequences.h"
// externals
-#include "Reflex/Type.h"
+#include "FWCore/Utilities/interface/TypeWithDict.h"
namespace coral {
class ISchema;
@@ -21,7 +21,7 @@ namespace ora {
ContainerSchema( int containerId,
const std::string& containerName,
- const Reflex::Type& containerType,
+ const edm::TypeWithDict& containerType,
DatabaseSession& session );
ContainerSchema( int containerId,
@@ -37,19 +37,19 @@ namespace ora {
void evolve();
- void create( const Reflex::Type& dependentClass );
+ void create( const edm::TypeWithDict& dependentClass );
- void evolve( const Reflex::Type& dependentClass, MappingTree& baseMapping );
+ void evolve( const edm::TypeWithDict& dependentClass, MappingTree& baseMapping );
void setAccessPermission( const std::string& principal, bool forWrite );
- const Reflex::Type& type();
+ const edm::TypeWithDict& type();
MappingTree& mapping( bool writeEnabled=false);
- bool extendIfRequired( const Reflex::Type& dependentClass );
+ bool extendIfRequired( const edm::TypeWithDict& dependentClass );
- MappingElement& mappingForDependentClass( const Reflex::Type& dependentClass, bool writeEnabled=false );
+ MappingElement& mappingForDependentClass( const edm::TypeWithDict& dependentClass, bool writeEnabled=false );
bool mappingForDependentClasses( std::vector& destination );
@@ -73,15 +73,15 @@ namespace ora {
private:
void initClassDict();
- bool loadMappingForDependentClass( const Reflex::Type& dependentClass );
- void extend( const Reflex::Type& dependentClass );
+ bool loadMappingForDependentClass( const edm::TypeWithDict& dependentClass );
+ void extend( const edm::TypeWithDict& dependentClass );
void getTableHierarchy( const std::set& containerMappingVersions, std::vector& destination );
private:
int m_containerId;
std::string m_containerName;
std::string m_className;
- Reflex::Type m_classDict;
+ edm::TypeWithDict m_classDict;
DatabaseSession& m_session;
bool m_loaded;
Sequences m_containerSchemaSequences;
diff --git a/CondCore/ORA/src/DataElement.cc b/CondCore/ORA/src/DataElement.cc
index b09cd8a9e1856..2ed69613b2b40 100644
--- a/CondCore/ORA/src/DataElement.cc
+++ b/CondCore/ORA/src/DataElement.cc
@@ -1,18 +1,19 @@
#include "DataElement.h"
+#include /* offsetof */
ora::DataElement::DataElement():
m_parent(0),
m_children(),
m_declaringScopeOffset(0),
- m_offsetFunction(0){
+ /*m_offsetFunction(0)*/ m_offset(0){
}
ora::DataElement::DataElement( size_t declaringScopeOffset,
- Reflex::OffsetFunction offsetFunc ):
+ size_t /*offsetFunc*/ offset ):
m_parent(0),
m_children(),
m_declaringScopeOffset(declaringScopeOffset),
- m_offsetFunction(offsetFunc){
+ /*m_offsetFunction(offsetFunc)*/ m_offset(offset){
}
ora::DataElement::~DataElement(){
@@ -24,23 +25,23 @@ ora::DataElement::~DataElement(){
ora::DataElement&
ora::DataElement::addChild( size_t declaringScopeOffset,
- Reflex::OffsetFunction offsetFunction ){
- DataElement* child = new DataElement( declaringScopeOffset, offsetFunction );
+ size_t /*offsetFunction*/ offset ){
+ DataElement* child = new DataElement( declaringScopeOffset, /*offsetFunction*/ offset );
child->m_parent = this;
m_children.push_back(child);
return *child;
}
size_t ora::DataElement::offset( const void* topLevelAddress ) const {
- const void* address = topLevelAddress;
+ //const void* address = topLevelAddress;
size_t offset = m_declaringScopeOffset;
if(m_parent){
size_t parentOffset = m_parent->offset( topLevelAddress );
offset += parentOffset;
- address = static_cast(const_cast(topLevelAddress))+parentOffset;
+ //address = static_cast(const_cast(topLevelAddress))+parentOffset;
}
- if(m_offsetFunction){
- offset += m_offsetFunction( const_cast(address));
+ if(/*m_offsetFunction*/ m_offset){
+ offset += /*m_offsetFunction( const_cast(address))*/ m_offset;
}
return offset;
}
diff --git a/CondCore/ORA/src/DataElement.h b/CondCore/ORA/src/DataElement.h
index e7b8e3b71ba1d..8e9ef52d83075 100644
--- a/CondCore/ORA/src/DataElement.h
+++ b/CondCore/ORA/src/DataElement.h
@@ -2,7 +2,7 @@
#define INCLUDE_ORA_DATAELEMENT_H
// externals
-#include "Reflex/Type.h"
+#include "FWCore/Utilities/interface/TypeWithDict.h"
namespace ora {
@@ -10,10 +10,10 @@ namespace ora {
class DataElement {
public:
DataElement();
- DataElement( size_t declaringScopeOffset, Reflex::OffsetFunction offsetFunction );
+ DataElement( size_t declaringScopeOffset, size_t /*offsetFunction*/ offset );
virtual ~DataElement();
- DataElement& addChild( size_t declaringScopeOffset, Reflex::OffsetFunction offsetFunction );
+ DataElement& addChild( size_t declaringScopeOffset, size_t /*offsetFunction*/ offset );
size_t offset( const void* topLevelAddress ) const;
void* address( const void* topLevelAddress ) const;
@@ -26,7 +26,7 @@ namespace ora {
const DataElement* m_parent;
std::vector m_children;
size_t m_declaringScopeOffset;
- Reflex::OffsetFunction m_offsetFunction;
+ /*Reflex::OffsetFunction m_offsetFunction*/ size_t m_offset;
};
}
diff --git a/CondCore/ORA/src/Database.cc b/CondCore/ORA/src/Database.cc
index bba026e8b540f..efe96d403e40e 100644
--- a/CondCore/ORA/src/Database.cc
+++ b/CondCore/ORA/src/Database.cc
@@ -34,11 +34,11 @@ namespace ora {
std::auto_ptr m_transaction;
};
- std::string nameFromClass( const Reflex::Type& contType ){
- return contType.Name( Reflex::SCOPED );
+ std::string nameFromClass( const edm::TypeWithDict& contType ){
+ return contType.cppName();
}
- Container getContainerFromSession( const std::string& name, const Reflex::Type& contType, DatabaseSession& session ){
+ Container getContainerFromSession( const std::string& name, const edm::TypeWithDict& contType, DatabaseSession& session ){
Handle contHandle = session.containerHandle( name );
if( !contHandle ){
if( session.configuration().properties().getFlag( Configuration::automaticDatabaseCreation()) ||
@@ -55,7 +55,7 @@ namespace ora {
}
std::string ora::Database::nameForContainer( const std::type_info& typeInfo ){
- Reflex::Type contType = ClassUtils::lookupDictionary( typeInfo );
+ edm::TypeWithDict contType = ClassUtils::lookupDictionary( typeInfo );
return nameFromClass( contType );
}
@@ -209,14 +209,14 @@ ora::Container ora::Database::createContainer( const std::string& name,
throwException("Container with name \""+name+"\" already exists in the database.",
"Database::createContainer");
}
- Reflex::Type contType = ClassUtils::lookupDictionary( typeInfo );
+ edm::TypeWithDict contType = ClassUtils::lookupDictionary( typeInfo );
Handle cont = m_impl->m_session->createContainer( name, contType );
return Container( cont );
}
ora::Container ora::Database::createContainer( const std::type_info& typeInfo ){
open( true );
- Reflex::Type contType = ClassUtils::lookupDictionary( typeInfo );
+ edm::TypeWithDict contType = ClassUtils::lookupDictionary( typeInfo );
std::string name = nameFromClass( contType );
if( m_impl->m_session->containerHandle( name ) ){
throwException("Container with name \""+name+"\" already exists in the database.",
@@ -229,7 +229,7 @@ ora::Container ora::Database::createContainer( const std::type_info& typeInfo ){
ora::Container ora::Database::createContainer( const std::string& className,
std::string name ){
open( true );
- Reflex::Type contType = ClassUtils::lookupDictionary( className );
+ edm::TypeWithDict contType = ClassUtils::lookupDictionary( className );
if( name.empty() ) name = nameForContainer( className );
if( m_impl->m_session->containerHandle( name ) ){
throwException("Container with name \""+name+"\" already exists in the database.",
@@ -242,13 +242,13 @@ ora::Container ora::Database::createContainer( const std::string& className,
ora::Container ora::Database::getContainer( const std::string& containerName,
const std::type_info& typeInfo){
open( true );
- Reflex::Type objType = ClassUtils::lookupDictionary( typeInfo );
+ edm::TypeWithDict objType = ClassUtils::lookupDictionary( typeInfo );
return getContainerFromSession( containerName, objType, *m_impl->m_session );
}
ora::Container ora::Database::getContainer( const std::type_info& typeInfo ){
open( true );
- Reflex::Type objType = ClassUtils::lookupDictionary( typeInfo );
+ edm::TypeWithDict objType = ClassUtils::lookupDictionary( typeInfo );
std::string contName = nameFromClass( objType );
return getContainerFromSession( contName, objType, *m_impl->m_session);
}
@@ -351,7 +351,7 @@ bool ora::Database::getItemId( const std::string& name, ora::OId& destination ){
boost::shared_ptr ora::Database::getTypedObjectByName( const std::string& name, const std::type_info& typeInfo ){
open();
- Reflex::Type objType = ClassUtils::lookupDictionary( typeInfo );
+ edm::TypeWithDict objType = ClassUtils::lookupDictionary( typeInfo );
return m_impl->m_session->fetchTypedObjectByName( name, objType );
}
diff --git a/CondCore/ORA/src/DatabaseContainer.cc b/CondCore/ORA/src/DatabaseContainer.cc
index 0a82c43f8c1cf..8254e896f083a 100644
--- a/CondCore/ORA/src/DatabaseContainer.cc
+++ b/CondCore/ORA/src/DatabaseContainer.cc
@@ -40,12 +40,12 @@ namespace ora {
RelationalBuffer operationBuffer( m_contSchema.storageSchema() );
InsertOperation* topLevelInsert = &operationBuffer.newInsert( topLevelMapping.tableName() );
topLevelInsert->addId( topLevelMapping.columnNames()[ 0 ] );
- const Reflex::Type& type = m_contSchema.type();
- MappingElement::iterator iMap = topLevelMapping.find( type.Name(Reflex::SCOPED) );
+ const edm::TypeWithDict& type = m_contSchema.type();
+ MappingElement::iterator iMap = topLevelMapping.find( type.cppName() );
// the first inner mapping is the relevant...
if( iMap == topLevelMapping.end()){
throwException("Could not find a mapping element for class \""+
- type.Name(Reflex::SCOPED)+"\"",
+ type.cppName()+"\"",
"WriteBuffer::flush");
}
MappingElement& mapping = iMap->second;
@@ -105,12 +105,12 @@ namespace ora {
UpdateOperation* topLevelUpdate = &operationBuffer.newUpdate( topLevelMapping.tableName(), true );
topLevelUpdate->addId( topLevelMapping.columnNames()[ 0 ] );
topLevelUpdate->addWhereId( topLevelMapping.columnNames()[ 0 ] );
- const Reflex::Type& type = m_contSchema.type();
- MappingElement::iterator iMap = topLevelMapping.find( type.Name(Reflex::SCOPED) );
+ const edm::TypeWithDict& type = m_contSchema.type();
+ MappingElement::iterator iMap = topLevelMapping.find( type.cppName() );
// the first inner mapping is the relevant...
if( iMap == topLevelMapping.end()){
throwException("Could not find a mapping element for class \""+
- type.Name(Reflex::SCOPED)+"\"",
+ type.cppName()+"\"",
"UpdateBuffer::flush");
}
MappingElement& mapping = iMap->second;
@@ -151,11 +151,11 @@ namespace ora {
MappingElement& topLevelMapping = contSchema.mapping().topElement();
m_topLevelQuery.addWhereId( topLevelMapping.columnNames()[ 0 ] );
- MappingElement::iterator iMap = topLevelMapping.find( m_type.Name(Reflex::SCOPED) );
+ MappingElement::iterator iMap = topLevelMapping.find( m_type.cppName() );
// the first inner mapping is the good one ...
if( iMap == topLevelMapping.end()){
throwException("Could not find a mapping element for class \""+
- m_type.Name(Reflex::SCOPED)+"\"",
+ m_type.cppName()+"\"",
"ReadBuffer::ReadBuffer");
}
MappingElement& mapping = iMap->second;
@@ -185,13 +185,13 @@ namespace ora {
return destination;
}
- const Reflex::Type& type(){
+ const edm::TypeWithDict& type(){
return m_type;
}
private:
DataElement m_topLevelElement;
- const Reflex::Type& m_type;
+ const edm::TypeWithDict& m_type;
std::auto_ptr m_reader;
SelectOperation m_topLevelQuery;
};
@@ -280,10 +280,10 @@ void* ora::IteratorBuffer::getItem(){
return ret;
}
-void* ora::IteratorBuffer::getItemAsType( const Reflex::Type& asType ){
+void* ora::IteratorBuffer::getItemAsType( const edm::TypeWithDict& asType ){
if( !ClassUtils::isType( type(), asType ) ){
- throwException("Provided output object type \""+asType.Name(Reflex::SCOPED)+"\" does not match with the container type \""+
- type().Name(Reflex::SCOPED)+"\"","IteratorBuffer::getItemAsType");
+ throwException("Provided output object type \""+asType.cppName()+"\" does not match with the container type \""+type().cppName(),
+ "ora::IteratorBuffer::getItemsAsType" );
}
return getItem();
}
@@ -292,7 +292,7 @@ int ora::IteratorBuffer::itemId(){
return m_itemId;
}
-const Reflex::Type& ora::IteratorBuffer::type(){
+const edm::TypeWithDict& ora::IteratorBuffer::type(){
return m_readBuffer.type();
}
@@ -315,7 +315,7 @@ ora::DatabaseContainer::DatabaseContainer( int contId,
ora::DatabaseContainer::DatabaseContainer( int contId,
const std::string& containerName,
- const Reflex::Type& containerType,
+ const edm::TypeWithDict& containerType,
DatabaseSession& session ):
m_dbSchema( session.schema() ),
m_schema( new ContainerSchema(contId, containerName, containerType, session) ),
@@ -345,7 +345,7 @@ const std::string& ora::DatabaseContainer::className(){
return m_schema->className();
}
-const Reflex::Type& ora::DatabaseContainer::type(){
+const edm::TypeWithDict& ora::DatabaseContainer::type(){
return m_schema->type();
}
@@ -396,7 +396,7 @@ void ora::DatabaseContainer::drop(){
m_containerUpdateTable.remove( m_schema->containerId() );
}
-void ora::DatabaseContainer::extendSchema( const Reflex::Type& dependentType ){
+void ora::DatabaseContainer::extendSchema( const edm::TypeWithDict& dependentType ){
m_schema->extendIfRequired( dependentType );
}
@@ -414,27 +414,27 @@ void* ora::DatabaseContainer::fetchItem(int itemId){
}
void* ora::DatabaseContainer::fetchItemAsType(int itemId,
- const Reflex::Type& asType){
+ const edm::TypeWithDict& asType){
if(!m_readBuffer.get()){
m_readBuffer.reset( new ReadBuffer( *m_schema ) );
}
if( !ClassUtils::isType( type(), asType ) ){
- throwException("Provided output object type \""+asType.Name(Reflex::SCOPED)+"\" does not match with the container type \""+
- type().Name(Reflex::SCOPED)+"\"","DatabaseContainer::fetchItemAsType");
+ throwException("Provided output object type \""+asType.cppName()+"\" does not match with the container type \""+type().cppName(),
+ "ora::DatabaseContainer::fetchItemAsType" );
}
return m_readBuffer->read( itemId );
}
int ora::DatabaseContainer::insertItem( const void* data,
- const Reflex::Type& dataType ){
+ const edm::TypeWithDict& dataType ){
if(!m_writeBuffer.get()){
m_writeBuffer.reset( new WriteBuffer( *m_schema ) );
}
- Reflex::Type inputResType = ClassUtils::resolvedType( dataType );
- Reflex::Type contType = ClassUtils::resolvedType(m_schema->type());
- if( inputResType.Name()!= contType.Name() && !inputResType.HasBase( contType ) ){
- throwException( "Provided input object type=\""+inputResType.Name()+
- "\" does not match with the container type=\""+contType.Name()+"\"",
+ edm::TypeWithDict inputResType = ClassUtils::resolvedType( dataType );
+ edm::TypeWithDict contType = ClassUtils::resolvedType(m_schema->type());
+ if( inputResType.name()!= contType.name() && !inputResType.hasBase( contType ) ){
+ throwException( "Provided input object type=\""+inputResType.name()+
+ "\" does not match with the container type=\""+contType.name()+"\"",
"DatabaseContainer::insertItem" );
}
@@ -445,15 +445,15 @@ int ora::DatabaseContainer::insertItem( const void* data,
void ora::DatabaseContainer::updateItem( int itemId,
const void* data,
- const Reflex::Type& dataType ){
+ const edm::TypeWithDict& dataType ){
if(!m_updateBuffer.get()){
m_updateBuffer.reset( new UpdateBuffer( *m_schema ) );
}
- Reflex::Type inputResType = ClassUtils::resolvedType( dataType );
- Reflex::Type contType = ClassUtils::resolvedType(m_schema->type());
- if( inputResType.Name()!= contType.Name() && !inputResType.HasBase( contType ) ){
- throwException( "Provided input object type=\""+inputResType.Name()+"\" does not match with the container type=\""+
- contType.Name()+"\".",
+ edm::TypeWithDict inputResType = ClassUtils::resolvedType( dataType );
+ edm::TypeWithDict contType = ClassUtils::resolvedType(m_schema->type());
+ if( inputResType.name()!= contType.name() && !inputResType.hasBase( contType ) ){
+ throwException( "Provided input object type=\""+inputResType.name()+"\" does not match with the container type=\""+
+ contType.name()+"\".",
"DatabaseContainer::updateItem" );
}
diff --git a/CondCore/ORA/src/DatabaseContainer.h b/CondCore/ORA/src/DatabaseContainer.h
index 491837e1ff464..1e2c8c74dcb50 100644
--- a/CondCore/ORA/src/DatabaseContainer.h
+++ b/CondCore/ORA/src/DatabaseContainer.h
@@ -9,8 +9,8 @@
#include
#include
-namespace Reflex {
- class Type;
+namespace edm {
+ class TypeWithDict;
}
namespace ora {
@@ -36,11 +36,11 @@ namespace ora {
void* getItem();
- void* getItemAsType( const Reflex::Type& type );
+ void* getItemAsType( const edm::TypeWithDict& type );
int itemId();
- const Reflex::Type& type();
+ const edm::TypeWithDict& type();
private:
SelectOperation m_query;
@@ -54,7 +54,7 @@ namespace ora {
DatabaseContainer( int contId, const std::string& containerName, const std::string& className,
unsigned int containerSize, DatabaseSession& session );
- DatabaseContainer( int contId, const std::string& containerName, const Reflex::Type& containerType,
+ DatabaseContainer( int contId, const std::string& containerName, const edm::TypeWithDict& containerType,
DatabaseSession& session );
virtual ~DatabaseContainer();
@@ -65,7 +65,7 @@ namespace ora {
const std::string& className();
- const Reflex::Type& type();
+ const edm::TypeWithDict& type();
const std::string& mappingVersion();
@@ -75,7 +75,7 @@ namespace ora {
void drop();
- void extendSchema( const Reflex::Type& dependentType );
+ void extendSchema( const edm::TypeWithDict& dependentType );
void setAccessPermission( const std::string& principal, bool forWrite );
@@ -87,11 +87,11 @@ namespace ora {
void* fetchItem(int itemId);
- void* fetchItemAsType(int itemId, const Reflex::Type& asType);
+ void* fetchItemAsType(int itemId, const edm::TypeWithDict& asType);
- int insertItem( const void* data, const Reflex::Type& type );
+ int insertItem( const void* data, const edm::TypeWithDict& type );
- void updateItem( int itemId, const void* data, const Reflex::Type& type );
+ void updateItem( int itemId, const void* data, const edm::TypeWithDict& type );
void erase( int itemId );
diff --git a/CondCore/ORA/src/DatabaseSession.cc b/CondCore/ORA/src/DatabaseSession.cc
index 68da50762f382..8a6dd3576143f 100644
--- a/CondCore/ORA/src/DatabaseSession.cc
+++ b/CondCore/ORA/src/DatabaseSession.cc
@@ -265,7 +265,7 @@ ora::Handle ora::DatabaseSession::addContainer( const st
ora::Handle ora::DatabaseSession::createContainer( const std::string& containerName,
- const Reflex::Type& type ){
+ const edm::TypeWithDict& type ){
// create the container
int newContId = m_contIdSequence->getNextId( true );
Handle newCont ( new DatabaseContainer( newContId, containerName, type, *this ) );
@@ -326,7 +326,7 @@ bool ora::DatabaseSession::getItemId( const std::string& name, ora::OId& destina
}
boost::shared_ptr ora::DatabaseSession::fetchTypedObjectByName( const std::string& name,
- const Reflex::Type& asType ){
+ const edm::TypeWithDict& asType ){
boost::shared_ptr ret = m_transactionCache->getNamedReference( name );
if( !ret.get() ){
std::pair oid;
diff --git a/CondCore/ORA/src/DatabaseSession.h b/CondCore/ORA/src/DatabaseSession.h
index b5577c5f8a0c5..b3fa624b05495 100644
--- a/CondCore/ORA/src/DatabaseSession.h
+++ b/CondCore/ORA/src/DatabaseSession.h
@@ -11,8 +11,8 @@
#include
#include