Skip to content

Commit 8e555d4

Browse files
authored
Merge branch 'AliceO2Group:dev' into fix-kCylinder
2 parents 2d73087 + ab29595 commit 8e555d4

File tree

67 files changed

+1065
-4573
lines changed

Some content is hidden

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

67 files changed

+1065
-4573
lines changed

DataFormats/Detectors/MUON/MCH/src/DsChannelGroup.cxx

Lines changed: 0 additions & 16 deletions
This file was deleted.

DataFormats/Detectors/TPC/include/DataFormatsTPC/CalibdEdxCorrection.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ class CalibdEdxCorrection
115115
/// Single fit parameters averaged over all sectors for a stack type
116116
float getMeanEntries(const GEMstack stack, ChargeType charge) const;
117117

118+
/// set all corrections to 1, used for default initialization and to reset corrections
119+
void setUnity();
120+
118121
#endif
119122

120123
private:

DataFormats/Detectors/TPC/src/CalibdEdxCorrection.cxx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,16 @@ float CalibdEdxCorrection::getMeanEntries(const GEMstack stack, ChargeType charg
168168

169169
return mean / (SECTORSPERSIDE * SIDES);
170170
}
171+
172+
void CalibdEdxCorrection::setUnity()
173+
{
174+
for (int i = 0; i < FitSize; ++i) {
175+
for (int j = 0; j < ParamSize; ++j) {
176+
mParams[i][j] = 0.f;
177+
}
178+
mParams[i][0] = 1.f; // constant term = 1
179+
mChi2[i] = 0.f;
180+
mEntries[i] = 0;
181+
}
182+
mDims = 0;
183+
}

Detectors/DCS/src/DataPointCreator.cxx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ DataPointCompositeObject createDataPointCompositeObject(const std::string& alias
3737
template <>
3838
DataPointCompositeObject createDataPointCompositeObject(const std::string& alias, float val, uint32_t seconds, uint16_t msec, uint16_t flags)
3939
{
40-
float tmp[2];
41-
tmp[0] = val;
42-
tmp[1] = 0;
43-
return createDPCOM(alias, reinterpret_cast<const uint64_t*>(&tmp[0]), seconds, msec, flags, DeliveryType::DPVAL_FLOAT);
40+
uint64_t tmp = 0;
41+
memcpy(&tmp, &val, sizeof(val));
42+
return createDPCOM(alias, &tmp, seconds, msec, flags, DeliveryType::DPVAL_FLOAT);
4443
}
4544

4645
template <>
@@ -54,36 +53,38 @@ template <>
5453
DataPointCompositeObject createDataPointCompositeObject(const std::string& alias, uint32_t val, uint32_t seconds, uint16_t msec, uint16_t flags)
5554
{
5655
uint64_t tmp{val};
57-
return createDPCOM(alias, reinterpret_cast<const uint64_t*>(&tmp), seconds, msec, flags, DeliveryType::DPVAL_UINT);
56+
return createDPCOM(alias, &tmp, seconds, msec, flags, DeliveryType::DPVAL_UINT);
5857
}
5958

6059
template <>
6160
DataPointCompositeObject createDataPointCompositeObject(const std::string& alias, long long val, uint32_t seconds, uint16_t msec, uint16_t flags)
6261
{
6362
uint64_t tmp{static_cast<uint64_t>(val)};
64-
return createDPCOM(alias, reinterpret_cast<const uint64_t*>(&tmp), seconds, msec, flags, DeliveryType::DPVAL_UINT);
63+
return createDPCOM(alias, &tmp, seconds, msec, flags, DeliveryType::DPVAL_UINT);
6564
}
6665

6766
template <>
6867
DataPointCompositeObject createDataPointCompositeObject(const std::string& alias, char val, uint32_t seconds, uint16_t msec, uint16_t flags)
6968
{
70-
return createDPCOM(alias, reinterpret_cast<const uint64_t*>(&val), seconds, msec, flags, DeliveryType::DPVAL_CHAR);
69+
uint64_t tmp = 0;
70+
memcpy(&tmp, &val, 1);
71+
return createDPCOM(alias, &tmp, seconds, msec, flags, DeliveryType::DPVAL_CHAR);
7172
}
7273

7374
template <>
7475
DataPointCompositeObject createDataPointCompositeObject(const std::string& alias, bool val, uint32_t seconds, uint16_t msec, uint16_t flags)
7576
{
7677
uint64_t tmp{val};
77-
return createDPCOM(alias, reinterpret_cast<const uint64_t*>(&tmp), seconds, msec, flags, DeliveryType::DPVAL_BOOL);
78+
return createDPCOM(alias, &tmp, seconds, msec, flags, DeliveryType::DPVAL_BOOL);
7879
}
7980

8081
template <>
8182
DataPointCompositeObject createDataPointCompositeObject(const std::string& alias, std::string val, uint32_t seconds, uint16_t msec, uint16_t flags)
8283
{
8384
constexpr int N{56};
84-
char str[N];
85-
strncpy(str, val.c_str(), N);
86-
return createDPCOM(alias, reinterpret_cast<const uint64_t*>(&str[0]), seconds, msec, flags, DeliveryType::DPVAL_STRING);
85+
uint64_t tmp[N / sizeof(uint64_t)];
86+
strncpy((char*)tmp, val.c_str(), N);
87+
return createDPCOM(alias, tmp, seconds, msec, flags, DeliveryType::DPVAL_STRING);
8788
}
8889

8990
} // namespace o2::dcs

Detectors/GlobalTrackingWorkflow/src/StrangenessTrackingSpec.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717
#include "DataFormatsGlobalTracking/RecoContainer.h"
1818
#include "StrangenessTracking/StrangenessTrackingConfigParam.h"
1919
#include "GlobalTrackingWorkflow/StrangenessTrackingSpec.h"
20-
#include "ITSWorkflow/ClusterWriterSpec.h"
2120
#include "ITSWorkflow/TrackerSpec.h"
2221
#include "ITSWorkflow/TrackReaderSpec.h"
23-
#include "ITSMFTWorkflow/ClusterReaderSpec.h"
2422
#include "Framework/CCDBParamSpec.h"
2523
#include "DataFormatsParameters/GRPObject.h"
2624

Detectors/ITSMFT/ITS/workflow/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ o2_add_library(ITSWorkflow
1313
TARGETVARNAME targetName
1414
SOURCES src/RecoWorkflow.cxx
1515
src/ClusterWriterWorkflow.cxx
16-
src/ClustererSpec.cxx
17-
src/ClusterWriterSpec.cxx
1816
src/TrackerSpec.cxx
1917
src/TrackWriterSpec.cxx
2018
src/TrackReaderSpec.cxx

Detectors/ITSMFT/ITS/workflow/include/ITSWorkflow/ClustererSpec.h

Lines changed: 0 additions & 65 deletions
This file was deleted.

Detectors/ITSMFT/ITS/workflow/src/ClusterWriterSpec.cxx

Lines changed: 0 additions & 72 deletions
This file was deleted.

Detectors/ITSMFT/ITS/workflow/src/ClusterWriterWorkflow.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/// @file ClusterWriterWorkflow.cxx
1313

1414
#include "ITSWorkflow/ClusterWriterWorkflow.h"
15-
#include "ITSWorkflow/ClusterWriterSpec.h"
15+
#include "ITSMFTWorkflow/ClusterWriterSpec.h"
1616

1717
namespace o2
1818
{
@@ -26,7 +26,7 @@ framework::WorkflowSpec getWorkflow(bool useMC)
2626
{
2727
framework::WorkflowSpec specs;
2828

29-
specs.emplace_back(o2::its::getClusterWriterSpec(useMC));
29+
specs.emplace_back(o2::itsmft::getITSClusterWriterSpec(useMC));
3030

3131
return specs;
3232
}

0 commit comments

Comments
 (0)