diff --git a/reco/L1/CbmL1Def.h b/reco/L1/CbmL1Def.h index ca650b6d650e4ce196a7d9f815c2d6b4d13db56d..b1d9803844b359085f8d9cce48c64799ca29142c 100644 --- a/reco/L1/CbmL1Def.h +++ b/reco/L1/CbmL1Def.h @@ -65,10 +65,12 @@ typedef int index_type; template<typename T> class L1Vector : public std::vector<T> { public: - L1Vector() : std::vector<T>(), fSize(0) {}; - L1Vector(const unsigned int n) : std::vector<T>(n), fSize(0) {}; - L1Vector(const unsigned int n, const unsigned int value) - : std::vector<T>(n, value), fSize(0) {}; + L1Vector(const char* name = "no name") : std::vector<T>(), fSize(0), fName(name) {}; + L1Vector(const char* name, const unsigned int n) : std::vector<T>(n), fSize(0), fName(name) {}; + L1Vector(const char* name, const unsigned int n, const unsigned int value) + : std::vector<T>(n, value) + , fSize(0) + , fName(name) {}; unsigned int Size() const { return fSize; } // Size() return number @@ -106,8 +108,8 @@ public: #ifdef _OPENMP #pragma omp critical #endif - std::vector<T>::resize(index + 1); - std::cout << "Warning: L1Vector autoresize to " << index + 1 << std::endl; + std::vector<T>::resize((index + 1) * 2); + std::cout << "Warning: L1Vector " << fName << " autoresize to " << (index + 1) * 2 << std::endl; } if (index >= fSize) fSize = index + 1; @@ -119,8 +121,16 @@ public: return std::vector<T>::operator[](index); } + const char* getName() + { + std::string s = " L1Vector<"; + s += fName + "> "; + return s.data(); + } + private: unsigned int fSize; + std::string fName; }; #endif // CbmL1Def_h diff --git a/reco/L1/L1Algo/L1Algo.h b/reco/L1/L1Algo/L1Algo.h index 215fa11a5e49ee69f52872e5661e4ec67a153269..703c5fb2d722a9c1fb619863bc795343902ef526 100644 --- a/reco/L1/L1Algo/L1Algo.h +++ b/reco/L1/L1Algo/L1Algo.h @@ -77,15 +77,15 @@ class L1Algo { public: // L1Algo(int nThreads=7): L1Algo(int nThreads = 1, int TypicalSize = 200000) - : n_g1() - , FirstHit() - , LastHit() - , FirstHitIndex() - , LastHitIndex() - , Neighbour() - , TrackChi2() - , vRecoHitsNew() - , vTracksNew() + : n_g1("L1Algo::n_g1") + , FirstHit("L1Algo::FirstHit") + , LastHit("L1Algo::LastHit") + , FirstHitIndex("L1Algo::FirstHitIndex") + , LastHitIndex("L1Algo::LastHitIndex") + , Neighbour("L1Algo::Neighbour") + , TrackChi2("L1Algo::TrackChi2") + , vRecoHitsNew("L1Algo::vRecoHitsNew") + , vTracksNew("L1Algo::vTracksNew") , NStations(0) , // number of all detector stations NMvdStations(0) @@ -100,9 +100,9 @@ public: , vSFlag(0) // information of hits station & using hits in tracks(), , CATime(0) , // time of trackfinding - vTracks(40000) + vTracks("L1Algo::vTracks", 40000) , // reconstructed tracks - vRecoHits(400000) + vRecoHits("L1Algo::vRecoHits", 400000) , // packed hits of reconstructed tracks StsHitsStartIndex(nullptr) , StsHitsStopIndex(nullptr) @@ -120,12 +120,12 @@ public: , #ifdef _OPENMP - hitToBestTrackF(TypicalSize * 2) - , hitToBestTrackB(TypicalSize * 2) + hitToBestTrackF("L1Algo::hitToBestTrackF", TypicalSize * 2) + , hitToBestTrackB("L1Algo::hitToBestTrackB", TypicalSize * 2) , #endif - vStripToTrack(TypicalSize * 2) - , vStripToTrackB(TypicalSize * 2) + vStripToTrack("L1Algo::vStripToTrack", TypicalSize * 4) + , vStripToTrackB("L1Algo::vStripToTrackB", TypicalSize * 4) , //sh (), fNThreads(nThreads) diff --git a/reco/L1/L1Algo/L1Branch.h b/reco/L1/L1Algo/L1Branch.h index 00d6a40b4de779748003829d303174f010e40bce..55df14e9a63956e08f3a8372ad91eb95dc22d962 100644 --- a/reco/L1/L1Algo/L1Branch.h +++ b/reco/L1/L1Algo/L1Branch.h @@ -32,7 +32,8 @@ struct L1Branch { , NHits(0) , chi2(0) , CandIndex(0) - , StsHits() { + , StsHits("L1Branch::StsHits") + { // L1Branch():Momentum(0),chi2(0),NHits(0),Lengtha(0),ista(0) , StsHits(){ StsHits.resize(12); }