Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Axel Puntke
mcbmroot
Commits
d8071d9f
Commit
d8071d9f
authored
Apr 22, 2021
by
Sergey Gorbunov
Committed by
Florian Uhlig
Apr 23, 2021
Browse files
give names to L1Vectors for debugging purposes
parent
c1eeb83c
Changes
3
Hide whitespace changes
Inline
Side-by-side
reco/L1/CbmL1Def.h
View file @
d8071d9f
...
...
@@ -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
reco/L1/L1Algo/L1Algo.h
View file @
d8071d9f
...
...
@@ -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
)
...
...
reco/L1/L1Algo/L1Branch.h
View file @
d8071d9f
...
...
@@ -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
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment