Skip to content

Commit 520de51

Browse files
committed
Merge branch 'dev' into onnx_gpu_timer
2 parents 5ef448c + fe73d1b commit 520de51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+620
-928
lines changed

.github/workflows/code-transformations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
with:
1616
ref: ${{ github.event.pull_request.head.sha }}
1717
persist-credentials: false

.github/workflows/datamodel-doc.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ jobs:
1010
steps:
1111

1212
- name: Checkout O2
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414
with:
1515
path: O2
1616
persist-credentials: false
1717

1818
- name: Checkout O2Physics
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
with:
2121
repository: AliceO2Group/O2Physics
2222
path: O2Physics
2323
persist-credentials: false
2424

2525
- name: Checkout documentation
26-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2727
with:
2828
repository: AliceO2Group/analysis-framework
2929
path: analysis-framework
@@ -40,7 +40,7 @@ jobs:
4040
git checkout -B auto-datamodel-doc
4141
4242
- name: Set up Python
43-
uses: actions/setup-python@v2
43+
uses: actions/setup-python@v5
4444
with:
4545
python-version: 3.x
4646

.github/workflows/doxygen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
run: |
1414
sudo apt-get update -y
1515
sudo apt-get install -y doxygen doxygen-doc doxygen-latex doxygen-gui graphviz cmake
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
with:
1818
ref: "dev"
1919
persist-credentials: false

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
branch=$(echo ${{ github.event.inputs.tag }}-patches | tr . - | sed -e's/-[0-9]*-patches$/-patches/')
1919
EOF
2020
id: decide_release_branch
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222
with:
2323
ref: "dev"
2424
- name: Tag branch (or create one before tagging if does not exists)

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
stale:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/stale@v1
10+
- uses: actions/stale@v9
1111
with:
1212
repo-token: ${{ secrets.GITHUB_TOKEN }}
1313
stale-pr-message: 'This PR did not have any update in the last 30 days. Is it still needed? Unless further action in will be closed in 5 days.'

DataFormats/Detectors/ITSMFT/common/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ o2_add_library(DataFormatsITSMFT
1818
src/ClusterPattern.cxx
1919
src/ClusterTopology.cxx
2020
src/TopologyDictionary.cxx
21+
src/TimeDeadMap.cxx
2122
src/CTF.cxx
2223
PUBLIC_LINK_LIBRARIES O2::ITSMFTBase
2324
O2::ReconstructionDataFormats
2425
Microsoft.GSL::GSL)
2526

2627
o2_target_root_dictionary(DataFormatsITSMFT
2728
HEADERS include/DataFormatsITSMFT/ROFRecord.h
28-
include/DataFormatsITSMFT/Digit.h
29-
include/DataFormatsITSMFT/GBTCalibData.h
30-
include/DataFormatsITSMFT/NoiseMap.h
31-
include/DataFormatsITSMFT/TimeDeadMap.h
29+
include/DataFormatsITSMFT/Digit.h
30+
include/DataFormatsITSMFT/GBTCalibData.h
31+
include/DataFormatsITSMFT/NoiseMap.h
32+
include/DataFormatsITSMFT/TimeDeadMap.h
3233
include/DataFormatsITSMFT/Cluster.h
3334
include/DataFormatsITSMFT/CompCluster.h
3435
include/DataFormatsITSMFT/ClusterPattern.h

DataFormats/Detectors/ITSMFT/common/include/DataFormatsITSMFT/TimeDeadMap.h

Lines changed: 8 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
#define ALICEO2_ITSMFT_TIMEDEADMAP_H
1616

1717
#include "Rtypes.h"
18-
#include "DetectorsCommonDataFormats/DetID.h"
19-
#include <iostream>
2018
#include <vector>
2119
#include <map>
2220

@@ -26,6 +24,8 @@ namespace o2
2624
namespace itsmft
2725
{
2826

27+
class NoiseMap;
28+
2929
class TimeDeadMap
3030
{
3131
public:
@@ -56,96 +56,17 @@ class TimeDeadMap
5656
mStaticDeadMap.clear();
5757
}
5858

59-
void decodeMap(o2::itsmft::NoiseMap& noisemap)
60-
{ // for static part only
61-
if (mMAP_VERSION == "3") {
62-
LOG(error) << "Trying to decode static part of deadmap version " << mMAP_VERSION << ". Not implemented, doing nothing.";
63-
return;
64-
}
65-
for (int iel = 0; iel < mStaticDeadMap.size(); iel++) {
66-
uint16_t w = mStaticDeadMap[iel];
67-
noisemap.maskFullChip(w & 0x7FFF);
68-
if (w & 0x8000) {
69-
for (int w2 = (w & 0x7FFF) + 1; w2 < mStaticDeadMap.at(iel + 1); w2++) {
70-
noisemap.maskFullChip(w2);
71-
}
72-
}
73-
}
74-
}
75-
76-
void decodeMap(unsigned long orbit, o2::itsmft::NoiseMap& noisemap, bool includeStaticMap = true, long orbitGapAllowed = 330000)
77-
{ // for time-dependent and (optionally) static part. Use orbitGapAllowed = -1 to ignore check on orbit difference
78-
79-
if (mMAP_VERSION != "3" && mMAP_VERSION != "4") {
80-
LOG(error) << "Trying to decode time-dependent deadmap version " << mMAP_VERSION << ". Not implemented, doing nothing.";
81-
return;
82-
}
83-
84-
if (mEvolvingDeadMap.empty()) {
85-
LOG(warning) << "Time-dependent dead map is empty. Doing nothing.";
86-
return;
87-
}
88-
89-
std::vector<uint16_t> closestVec;
90-
long dT = getMapAtOrbit(orbit, closestVec);
91-
92-
if (orbitGapAllowed >= 0 && std::abs(dT) > orbitGapAllowed) {
93-
LOG(warning) << "Requested orbit " << orbit << ", found " << orbit - dT << ". Orbit gap is too high, skipping time-dependent map.";
94-
closestVec.clear();
95-
}
96-
97-
// add static part if requested. something may be masked twice
98-
if (includeStaticMap && mMAP_VERSION != "3") {
99-
closestVec.insert(closestVec.end(), mStaticDeadMap.begin(), mStaticDeadMap.end());
100-
}
101-
102-
// vector encoding: if 1<<15 = 0x8000 is set, the word encodes the first element of a range, with mask (1<<15)-1 = 0x7FFF. The last element of the range is the next in the vector.
103-
104-
for (int iel = 0; iel < closestVec.size(); iel++) {
105-
uint16_t w = closestVec.at(iel);
106-
noisemap.maskFullChip(w & 0x7FFF);
107-
if (w & 0x8000) {
108-
for (int w2 = (w & 0x7FFF) + 1; w2 < closestVec.at(iel + 1); w2++) {
109-
noisemap.maskFullChip(w2);
110-
}
111-
}
112-
}
113-
};
114-
59+
void decodeMap(NoiseMap& noisemap) const;
60+
void decodeMap(unsigned long orbit, o2::itsmft::NoiseMap& noisemap, bool includeStaticMap = true, long orbitGapAllowed = 330000) const;
11561
std::string getMapVersion() const { return mMAP_VERSION; };
11662

11763
unsigned long getEvolvingMapSize() const { return mEvolvingDeadMap.size(); };
118-
119-
std::vector<unsigned long> getEvolvingMapKeys()
120-
{
121-
std::vector<unsigned long> keys;
122-
std::transform(mEvolvingDeadMap.begin(), mEvolvingDeadMap.end(), std::back_inserter(keys),
123-
[](const auto& O) { return O.first; });
124-
return keys;
125-
}
126-
127-
void getStaticMap(std::vector<uint16_t>& mmap) { mmap = mStaticDeadMap; };
128-
129-
long getMapAtOrbit(unsigned long orbit, std::vector<uint16_t>& mmap)
130-
{ // fills mmap and returns requested_orbit - found_orbit. Found orbit is the highest key lower or equal to the requested one
131-
if (mEvolvingDeadMap.empty()) {
132-
LOG(warning) << "Requested orbit " << orbit << "from an empty time-dependent map. Doing nothing";
133-
return (long)orbit;
134-
}
135-
auto closest = mEvolvingDeadMap.upper_bound(orbit);
136-
if (closest != mEvolvingDeadMap.begin()) {
137-
--closest;
138-
mmap = closest->second;
139-
return (long)orbit - closest->first;
140-
} else {
141-
mmap = mEvolvingDeadMap.begin()->second;
142-
return (long)(orbit)-mEvolvingDeadMap.begin()->first;
143-
}
144-
}
145-
64+
std::vector<unsigned long> getEvolvingMapKeys() const;
65+
void getStaticMap(std::vector<uint16_t>& mmap) const { mmap = mStaticDeadMap; };
66+
long getMapAtOrbit(unsigned long orbit, std::vector<uint16_t>& mmap) const;
14667
void setMapVersion(std::string version) { mMAP_VERSION = version; };
14768

148-
bool isDefault() { return mIsDefaultObject; };
69+
bool isDefault() const { return mIsDefaultObject; };
14970
void setAsDefault(bool isdef = true) { mIsDefaultObject = isdef; };
15071

15172
private:
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
/// \file TimeDeadMap.cxx
13+
/// \brief Implementation of the time-dependent map
14+
15+
#include "DataFormatsITSMFT/TimeDeadMap.h"
16+
#include "DataFormatsITSMFT/NoiseMap.h"
17+
#include "Framework/Logger.h"
18+
19+
using namespace o2::itsmft;
20+
21+
void TimeDeadMap::decodeMap(o2::itsmft::NoiseMap& noisemap) const
22+
{ // for static part only
23+
if (mMAP_VERSION == "3") {
24+
LOG(error) << "Trying to decode static part of deadmap version " << mMAP_VERSION << ". Not implemented, doing nothing.";
25+
return;
26+
}
27+
for (int iel = 0; iel < mStaticDeadMap.size(); iel++) {
28+
uint16_t w = mStaticDeadMap[iel];
29+
noisemap.maskFullChip(w & 0x7FFF);
30+
if (w & 0x8000) {
31+
for (int w2 = (w & 0x7FFF) + 1; w2 < mStaticDeadMap.at(iel + 1); w2++) {
32+
noisemap.maskFullChip(w2);
33+
}
34+
}
35+
}
36+
}
37+
38+
void TimeDeadMap::decodeMap(unsigned long orbit, o2::itsmft::NoiseMap& noisemap, bool includeStaticMap, long orbitGapAllowed) const
39+
{ // for time-dependent and (optionally) static part. Use orbitGapAllowed = -1 to ignore check on orbit difference
40+
41+
if (mMAP_VERSION != "3" && mMAP_VERSION != "4") {
42+
LOG(error) << "Trying to decode time-dependent deadmap version " << mMAP_VERSION << ". Not implemented, doing nothing.";
43+
return;
44+
}
45+
46+
if (mEvolvingDeadMap.empty()) {
47+
LOG(warning) << "Time-dependent dead map is empty. Doing nothing.";
48+
return;
49+
}
50+
51+
std::vector<uint16_t> closestVec;
52+
long dT = getMapAtOrbit(orbit, closestVec);
53+
54+
if (orbitGapAllowed >= 0 && std::abs(dT) > orbitGapAllowed) {
55+
LOG(warning) << "Requested orbit " << orbit << ", found " << orbit - dT << ". Orbit gap is too high, skipping time-dependent map.";
56+
closestVec.clear();
57+
}
58+
59+
// add static part if requested. something may be masked twice
60+
if (includeStaticMap && mMAP_VERSION != "3") {
61+
closestVec.insert(closestVec.end(), mStaticDeadMap.begin(), mStaticDeadMap.end());
62+
}
63+
64+
// vector encoding: if 1<<15 = 0x8000 is set, the word encodes the first element of a range, with mask (1<<15)-1 = 0x7FFF. The last element of the range is the next in the vector.
65+
66+
for (int iel = 0; iel < closestVec.size(); iel++) {
67+
uint16_t w = closestVec.at(iel);
68+
noisemap.maskFullChip(w & 0x7FFF);
69+
if (w & 0x8000) {
70+
for (int w2 = (w & 0x7FFF) + 1; w2 < closestVec.at(iel + 1); w2++) {
71+
noisemap.maskFullChip(w2);
72+
}
73+
}
74+
}
75+
}
76+
77+
std::vector<unsigned long> TimeDeadMap::getEvolvingMapKeys() const
78+
{
79+
std::vector<unsigned long> keys;
80+
std::transform(mEvolvingDeadMap.begin(), mEvolvingDeadMap.end(), std::back_inserter(keys),
81+
[](const auto& O) { return O.first; });
82+
return keys;
83+
}
84+
85+
long TimeDeadMap::getMapAtOrbit(unsigned long orbit, std::vector<uint16_t>& mmap) const
86+
{ // fills mmap and returns requested_orbit - found_orbit. Found orbit is the highest key lower or equal to the requested one
87+
if (mEvolvingDeadMap.empty()) {
88+
LOG(warning) << "Requested orbit " << orbit << "from an empty time-dependent map. Doing nothing";
89+
return (long)orbit;
90+
}
91+
auto closest = mEvolvingDeadMap.upper_bound(orbit);
92+
if (closest != mEvolvingDeadMap.begin()) {
93+
--closest;
94+
mmap = closest->second;
95+
return (long)orbit - closest->first;
96+
} else {
97+
mmap = mEvolvingDeadMap.begin()->second;
98+
return (long)(orbit)-mEvolvingDeadMap.begin()->first;
99+
}
100+
}

DataFormats/simulation/src/DigitizationContext.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ DigitizationContext DigitizationContext::extractSingleTimeframe(int timeframeid,
705705
}
706706
std::copy(mEventRecords.begin() + startindex, mEventRecords.begin() + endindex, std::back_inserter(r.mEventRecords));
707707
std::copy(mEventParts.begin() + startindex, mEventParts.begin() + endindex, std::back_inserter(r.mEventParts));
708-
if (mInteractionVertices.size() > endindex) {
708+
if (mInteractionVertices.size() >= endindex) {
709709
std::copy(mInteractionVertices.begin() + startindex, mInteractionVertices.begin() + endindex, std::back_inserter(r.mInteractionVertices));
710710
}
711711

Detectors/ITSMFT/ITS/tracking/include/ITStracking/Cell.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,6 @@ namespace o2::its
2929
class Cell final
3030
{
3131
public:
32-
GPUhdDefault() Cell() = default;
33-
GPUhd() Cell(const int firstClusterIndex, const int secondClusterIndex, const int thirdClusterIndex,
34-
const int firstTrackletIndex, const int secondTrackletIndex)
35-
: mFirstClusterIndex(firstClusterIndex),
36-
mSecondClusterIndex(secondClusterIndex),
37-
mThirdClusterIndex(thirdClusterIndex),
38-
mFirstTrackletIndex(firstTrackletIndex),
39-
mSecondTrackletIndex(secondTrackletIndex),
40-
mLevel(1) {}
41-
GPUhdDefault() Cell(const Cell&) = default;
42-
GPUhdDefault() Cell(Cell&&) = default;
43-
GPUhdDefault() ~Cell() = default;
44-
45-
GPUhdDefault() Cell& operator=(const Cell&) = default;
46-
GPUhdDefault() Cell& operator=(Cell&&) noexcept = default;
47-
4832
GPUhd() int getFirstClusterIndex() const { return mFirstClusterIndex; };
4933
GPUhd() int getSecondClusterIndex() const { return mSecondClusterIndex; };
5034
GPUhd() int getThirdClusterIndex() const { return mThirdClusterIndex; };

0 commit comments

Comments
 (0)