Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move CMSSW_7_4_X to be ROOT6 based. #8606

Merged
merged 1 commit into from Mar 31, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion AnalysisDataFormats/SUSYBSMObjects/src/classes_def.xml
Expand Up @@ -22,7 +22,7 @@
<class name="edm::Wrapper<susybsm::HSCPIsolation>"/>
<class name="edm::Wrapper<susybsm::HSCPIsolationCollection>"/>
<class name="edm::Wrapper<susybsm::HSCPIsolationValueMap>"/>
<class name="susybsm::HSCPCaloInfo" ClassVersion="11">
<class name="susybsm::HSCPCaloInfo" ClassVersion="12">
<version ClassVersion="12" checksum="2407040083"/>
<version ClassVersion="11" checksum="1170741674"/>
</class>
Expand Down
2 changes: 1 addition & 1 deletion AnalysisDataFormats/TrackInfo/src/classes_def.xml 100755 → 100644
@@ -1,7 +1,7 @@
<lcgdict>
<class name="std::pair<LocalVector,LocalVector>"/>
<class name="std::pair<LocalPoint,LocalPoint>"/>
<class name="reco::TrackingRecHitInfo" ClassVersion="10">
<class name="reco::TrackingRecHitInfo" ClassVersion="11">
<version ClassVersion="11" checksum="803167075"/>
<version ClassVersion="10" checksum="2470257581"/>
</class>
Expand Down
2 changes: 1 addition & 1 deletion CalibMuon/DTCalibration/plugins/DTT0CalibrationNew.cc
Expand Up @@ -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<float>
vector<float> peakMeans(peaks,peaks + npeaks);
//Sort the peaks in ascending order
Expand Down
2 changes: 0 additions & 2 deletions CommonTools/ParticleFlow/test/Macros/isolation.C
Expand Up @@ -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");
Expand Down
2 changes: 0 additions & 2 deletions CommonTools/ParticleFlow/test/Macros/plotVertex.py
Expand Up @@ -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();')



Expand Down
2 changes: 0 additions & 2 deletions CommonTools/ParticleFlow/test/Macros/ptJets.C
Expand Up @@ -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");
Expand Down
2 changes: 0 additions & 2 deletions CommonTools/ParticleFlow/test/Macros/ptMus.C
Expand Up @@ -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");
Expand Down
2 changes: 0 additions & 2 deletions CommonTools/ParticleFlow/test/Macros/rootlogon.C
Expand Up @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions CommonTools/ParticleFlow/test/Macros/testMuonTopProjection.C
Expand Up @@ -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");
Expand Down
18 changes: 13 additions & 5 deletions CommonTools/Utils/interface/StringToEnumValue.h
Expand Up @@ -3,7 +3,9 @@


#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/Utilities/interface/TypeWithDict.h"
#include "TEnum.h"
#include "TEnumConstant.h"
#include <cassert>
#include <string>
#include <sstream>
#include <vector>
Expand All @@ -21,10 +23,16 @@
\date 04 Mar 2011
*/

template <class MyType>
int StringToEnumValue(const std::string & enumMemberName){
edm::TypeWithDict dataType(typeid(MyType), kIsEnum);
return dataType.stringToEnumValue(enumMemberName);
template <typename MyEnum>
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;
}


Expand Down
4 changes: 2 additions & 2 deletions CommonTools/Utils/src/ExpressionVar.cc
Expand Up @@ -152,7 +152,7 @@ double ExpressionVar::value(const edm::ObjectWithDict& obj) const
std::vector<bool>::const_reverse_iterator RIB = needsDestructor_.rbegin();
for (std::vector<edm::ObjectWithDict>::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;
Expand Down Expand Up @@ -231,7 +231,7 @@ ExpressionLazyVar::value(const edm::ObjectWithDict& o) const
double ret = I->invokeLast(val, objects_);
for (std::vector<edm::ObjectWithDict>::reverse_iterator RI =
objects_.rbegin(), RE = objects_.rend(); RI != RE; ++RI) {
RI->typeOf().destruct(RI->address(), false);
RI->destruct(false);
}
objects_.clear();
return ret;
Expand Down
2 changes: 1 addition & 1 deletion CommonTools/Utils/src/MethodInvoker.cc
Expand Up @@ -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<void**>(addr));
//std::cout << "Now type is " << retType.qualifiedName() << std::endl;
Expand Down
40 changes: 32 additions & 8 deletions CommonTools/Utils/src/findMethod.cc
Expand Up @@ -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 <cassert>

Expand Down Expand Up @@ -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<edm::FunctionWithDict, bool> mem;
//FIXME: We must initialize mem.first!
mem.second = false;
// suitable members and number of integer->real casts required to get them
std::vector<std::pair<int, edm::FunctionWithDict> > 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);
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 2 additions & 3 deletions CommonTools/Utils/test/testCutParser.cc
Expand Up @@ -8,7 +8,6 @@
#include "FWCore/Utilities/interface/ObjectWithDict.h"
#include "FWCore/Utilities/interface/TypeWithDict.h"
#include <typeinfo>
#include "Cintex/Cintex.h"



Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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<reco::Track>("quality('notAnEnum')",sel, false), cms::Exception);
CPPUNIT_ASSERT_THROW(reco::parser::cutParser<reco::Track>("quality('notAnEnum')",sel, false), edm::Exception);

// check hits (for re-implemented virtual functions and exception handling)
CPPUNIT_ASSERT(hitOk.hasPositionAndError());
Expand Down
4 changes: 0 additions & 4 deletions CommonTools/Utils/test/testCutParserThreaded.cc
Expand Up @@ -7,8 +7,6 @@
#include "TObject.h"
#include "TVirtualStreamerInfo.h"

#include "Cintex/Cintex.h"

#include <thread>
#include <atomic>
#include <iostream>
Expand Down Expand Up @@ -41,8 +39,6 @@ int main() {
std::atomic<bool> failed{false};
std::vector<std::thread> threads;

ROOT::Cintex::Cintex::Enable();

TThread::Initialize();
//When threading, also have to keep ROOT from logging all TObjects into a list
TObject::SetObjectStat(false);
Expand Down
3 changes: 1 addition & 2 deletions CommonTools/Utils/test/testExpressionParser.cc
Expand Up @@ -14,7 +14,6 @@
#include "FWCore/Utilities/interface/TypeWithDict.h"
#include <typeinfo>
#include "DataFormats/Common/interface/TestHandle.h"
#include "Cintex/Cintex.h"

class testExpressionParser : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(testExpressionParser);
Expand All @@ -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();
Expand Down
11 changes: 1 addition & 10 deletions CondCore/CondDB/src/Serialization.cc
Expand Up @@ -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/");
Expand Down
2 changes: 1 addition & 1 deletion CondCore/CondDB/test/MyTestData.h
Expand Up @@ -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;
Expand Down