-
Notifications
You must be signed in to change notification settings - Fork 35
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
Remove using namespace from header files #35
Conversation
Which package does this not break? |
Probably all, but we should at one point resolve this. |
Yes, should at one point resolve this - but now is the worst time, as we are in the middle of preparing an iLCSoft release. |
That's the beauty of a PR, you can merge it at the time you see fit. |
@andresailer @petricm should we merge this now ? |
One should apply these changes locally and fix the other packages before merging this. Otherwise too many things will be broken. |
I have compiled everything with this change and made appropriate PRs if everything merged this PR should work. The only thing I was not able to fix is Garlic since it's in DESY SVN and I don't have access. @gaede can you please apply the following patch to Garlic Index: include/GarlicClusterVarsGenericObject.hh
===================================================================
--- include/GarlicClusterVarsGenericObject.hh (revision 111)
+++ include/GarlicClusterVarsGenericObject.hh (working copy)
@@ -11,7 +11,7 @@
public:
GarlicClusterVarsGenericObject() {
- _genObj = new LCGenericObjectImpl(NINT, NFLOAT, 0);
+ _genObj = new lcio::LCGenericObjectImpl(NINT, NFLOAT, 0);
for (int i=0; i<NINT; i++) _genObj->setIntVal(i, -999);
for (int i=0; i<NFLOAT; i++) _genObj->setFloatVal(i, -999);
}
@@ -20,7 +20,7 @@
assert(obj->getNInt()==NINT);
assert(obj->getNFloat()==NFLOAT);
assert(obj->getNDouble()==0);
- _genObj = new LCGenericObjectImpl(NINT, NFLOAT, 0);
+ _genObj = new lcio::LCGenericObjectImpl(NINT, NFLOAT, 0);
for (int i=0; i<NINT; i++) _genObj->setIntVal( i, obj->getIntVal(i) );
for (int i=0; i<NFLOAT; i++) _genObj->setFloatVal( i, obj->getFloatVal(i) );
}
Index: include/GarlicAlgorithmParameters.hh
===================================================================
--- include/GarlicAlgorithmParameters.hh (revision 111)
+++ include/GarlicAlgorithmParameters.hh (working copy)
@@ -7,6 +7,7 @@
#include "GarlicClusterSelector.hh"
+using namespace std;
using std::vector;
Index: include/GarlicGeometryParameters.hh
===================================================================
--- include/GarlicGeometryParameters.hh (revision 111)
+++ include/GarlicGeometryParameters.hh (working copy)
@@ -55,7 +55,7 @@
}
void Set_barrelStaveDir (std::vector< std::vector < float > > gg) {_barrelStaveDir=gg;}
- void Set_defaultDecoder (CellIDDecoder<CalorimeterHit>* dec) {_defaultDecoder=dec;}
+ void Set_defaultDecoder (lcio::CellIDDecoder<lcio::CalorimeterHit>* dec) {_defaultDecoder=dec;}
void Set_absorberRadiationLength (float x0) {_absorberRadiationLength=x0;}
@@ -94,7 +94,7 @@
float * Get_positionEndcapLayer () {return _positionEndcapLayer;}
std::vector< std::vector < float > > Get_barrelStaveDir () {return _barrelStaveDir;}
- CellIDDecoder<CalorimeterHit>* Get_defaultDecoder () {return _defaultDecoder;}
+ lcio::CellIDDecoder<lcio::CalorimeterHit>* Get_defaultDecoder () {return _defaultDecoder;}
private:
@@ -136,7 +136,7 @@
std::vector< std::vector < float > > _barrelStaveDir;
- CellIDDecoder<CalorimeterHit>* _defaultDecoder;
+ lcio::CellIDDecoder<lcio::CalorimeterHit>* _defaultDecoder;
void init() {
_rOfBarrel=-999;
Index: src/GarlicExtendedCluster.cc
===================================================================
--- src/GarlicExtendedCluster.cc (revision 111)
+++ src/GarlicExtendedCluster.cc (working copy)
@@ -32,6 +32,8 @@
using std::cout;
using std::endl;
+using namespace lcio;
+
int GarlicExtendedCluster::counter=0;
Index: src/GarlicClusterAlgos.cc
===================================================================
--- src/GarlicClusterAlgos.cc (revision 111)
+++ src/GarlicClusterAlgos.cc (working copy)
@@ -25,6 +25,8 @@
#include "GarlicExtendedCluster.hh"
#include "GarlicExtendedHit.hh"
+using namespace lcio;
+
std::map <CalorimeterHit*, bool> GarlicClusterAlgos::getSeeds(GarlicExtendedCluster* preClus) {
float energyCutMip = GarlicAlgorithmParameters::Instance().GetSeedHitEnergyCut(); |
I could of course do this - but this might be a good chance to move Garlic also to the iLCSoft Github. |
I am always happy to move stuff to git, I took the liberty and made a copy https://github.com/iLCSoft/Garlic |
All packages have been updated to cope with this PR. |
BEGINRELEASENOTES
ENDRELEASENOTES