Skip to content

Commit 916a94d

Browse files
authored
Merge branch 'AliceO2Group:dev' into tpc_cmc
2 parents 5ccb306 + e31bd4d commit 916a94d

462 files changed

Lines changed: 12862 additions & 10754 deletions

File tree

Some content is hidden

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

CCDB/include/CCDB/BasicCCDBManager.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class CCDBManagerInstance
5555
long endvalidity = -1;
5656
long cacheValidFrom = 0; // time for which the object was cached
5757
long cacheValidUntil = -1; // object is guaranteed to be valid till this time (modulo new updates)
58+
size_t size = 0;
5859
size_t minSize = -1ULL;
5960
size_t maxSize = 0;
6061
int queries = 0;
@@ -229,6 +230,7 @@ class CCDBManagerInstance
229230
long mCreatedNotBefore = 0; // lower limit for object creation timestamp (TimeMachine mode) - If-Not-Before HTTP header
230231
long mTimerMS = 0; // timer for queries
231232
size_t mFetchedSize = 0; // total fetched size
233+
size_t mRequestedSize = 0; // total requested size (fetched + served from cache)
232234
int mQueries = 0; // total number of object queries
233235
int mFetches = 0; // total number of succesful fetches from CCDB
234236
int mFailures = 0; // total number of failed fetches
@@ -258,6 +260,7 @@ T* CCDBManagerInstance::getForTimeStamp(std::string const& path, long timestamp,
258260
if (sh != mHeaders.end()) {
259261
size_t s = atol(sh->second.c_str());
260262
mFetchedSize += s;
263+
mRequestedSize += s;
261264
}
262265
}
263266

@@ -272,6 +275,7 @@ T* CCDBManagerInstance::getForTimeStamp(std::string const& path, long timestamp,
272275
if (headers) {
273276
*headers = cached.cacheOfHeaders;
274277
}
278+
mRequestedSize += cached.size;
275279
return reinterpret_cast<T*>(cached.noCleanupPtr ? cached.noCleanupPtr : cached.objPtr.get());
276280
}
277281
ptr = mCCDBAccessor.retrieveFromTFileAny<T>(path, mMetaData, timestamp, &mHeaders, cached.uuid,
@@ -318,6 +322,8 @@ T* CCDBManagerInstance::getForTimeStamp(std::string const& path, long timestamp,
318322
if (sh != mHeaders.end()) {
319323
size_t s = atol(sh->second.c_str());
320324
mFetchedSize += s;
325+
mRequestedSize += s;
326+
cached.size = s;
321327
cached.minSize = std::min(s, cached.minSize);
322328
cached.maxSize = std::max(s, cached.minSize);
323329
}
@@ -342,12 +348,14 @@ T* CCDBManagerInstance::getForTimeStamp(std::string const& path, long timestamp,
342348
}
343349
auto end = std::chrono::system_clock::now();
344350
mTimerMS += std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
345-
auto *ref = o2::framework::ServiceRegistryRef::globalDeviceRef();
351+
auto* ref = o2::framework::ServiceRegistryRef::globalDeviceRef();
346352
if (ref && ref->active<framework::DataProcessingStats>()) {
347353
auto& stats = ref->get<o2::framework::DataProcessingStats>();
348354
stats.updateStats({(int)o2::framework::ProcessingStatsId::CCDB_CACHE_HIT, o2::framework::DataProcessingStats::Op::Set, (int64_t)mQueries - mFailures - mFetches});
349355
stats.updateStats({(int)o2::framework::ProcessingStatsId::CCDB_CACHE_MISS, o2::framework::DataProcessingStats::Op::Set, (int64_t)mFetches});
350356
stats.updateStats({(int)o2::framework::ProcessingStatsId::CCDB_CACHE_FAILURE, o2::framework::DataProcessingStats::Op::Set, (int64_t)mFailures});
357+
stats.updateStats({(int)o2::framework::ProcessingStatsId::CCDB_CACHE_FETCHED_BYTES, o2::framework::DataProcessingStats::Op::Set, (int64_t)mFetchedSize});
358+
stats.updateStats({(int)o2::framework::ProcessingStatsId::CCDB_CACHE_REQUESTED_BYTES, o2::framework::DataProcessingStats::Op::Set, (int64_t)mRequestedSize});
351359
}
352360
return ptr;
353361
}

CCDB/src/BasicCCDBManager.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ std::pair<int64_t, int64_t> CCDBManagerInstance::getRunDuration(int runnumber, b
101101

102102
std::string CCDBManagerInstance::getSummaryString() const
103103
{
104-
std::string res = fmt::format("{} queries, {} bytes", mQueries, fmt::group_digits(mFetchedSize));
104+
std::string res = fmt::format("{} queries, {} fetched / {} requested bytes", mQueries, fmt::group_digits(mFetchedSize), fmt::group_digits(mRequestedSize));
105105
if (mCachingEnabled) {
106106
res += fmt::format(" for {} objects", mCache.size());
107107
}

Common/Field/src/MagFieldFast.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616
#include "Field/MagFieldFast.h"
1717
#include <GPUCommonLogger.h>
1818

19-
#ifndef GPUCA_GPUCODE_DEVICE
2019
#include <cmath>
2120
#include <fstream>
2221
#include <sstream>
2322
using namespace std;
24-
#endif
2523

2624
using namespace o2::field;
2725

Common/MathUtils/include/MathUtils/detail/Bracket.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#define ALICEO2_BRACKET_H
1818

1919
#include <GPUCommonRtypes.h>
20-
#ifndef GPUCA_ALIGPUCODE
20+
#ifndef GPUCA_GPUCODE_DEVICE
2121
#include <string>
2222
#include <sstream>
2323
#endif
@@ -76,7 +76,7 @@ class Bracket
7676
Relation isOutside(T t, T tErr) const;
7777
Relation isOutside(T t) const;
7878

79-
#ifndef GPUCA_ALIGPUCODE
79+
#ifndef GPUCA_GPUCODE_DEVICE
8080
std::string asString() const;
8181
#endif
8282

@@ -247,7 +247,7 @@ inline typename Bracket<T>::Relation Bracket<T>::isOutside(T t) const
247247
return t < mMin ? Below : (t > mMax ? Above : Inside);
248248
}
249249

250-
#ifndef GPUCA_ALIGPUCODE
250+
#ifndef GPUCA_GPUCODE_DEVICE
251251
template <typename T>
252252
std::string Bracket<T>::asString() const
253253
{

Common/Utils/src/DebugStreamer.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@
1010
// or submit itself to any jurisdiction.
1111

1212
#include "CommonUtils/DebugStreamer.h"
13-
#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE)
1413
#include <thread>
1514
#include <fmt/format.h>
1615
#include "TROOT.h"
1716
#include "TKey.h"
1817
#include <random>
1918
#include "Framework/Logger.h"
20-
#endif
2119

2220
O2ParamImpl(o2::utils::ParameterDebugStreamer);
2321

24-
#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE) && defined(DEBUG_STREAMER)
22+
#if defined(DEBUG_STREAMER)
2523

2624
o2::utils::DebugStreamer::DebugStreamer()
2725
{

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,12 @@ class CalibdEdxCorrection
4242
static constexpr int FitSize = 288; ///< Number of fitted corrections
4343
static constexpr int ParamSize = 8; ///< Number of params per fit
4444

45-
#if !defined(GPUCA_ALIGPUCODE)
45+
#if !defined(GPUCA_GPUCODE)
4646
CalibdEdxCorrection()
4747
{
4848
clear();
4949
}
5050
CalibdEdxCorrection(std::string_view fileName) { loadFromFile(fileName); }
51-
#else
52-
CalibdEdxCorrection() = default;
5351
#endif
5452
~CalibdEdxCorrection() = default;
5553

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace constants
2828
constexpr int MAXSECTOR = 36;
2929

3030
// the number of global pad rows
31-
#if defined(GPUCA_STANDALONE) && !defined(GPUCA_O2_LIB) && !defined(GPUCA_TPC_GEOMETRY_O2)
31+
#if defined(GPUCA_STANDALONE) && defined(GPUCA_RUN2)
3232
constexpr int MAXGLOBALPADROW = 159; // Number of pad rows in Run 2, used for GPU TPC tests with Run 2 data
3333
#else
3434
constexpr int MAXGLOBALPADROW = 152; // Correct number of pad rows in Run 3

DataFormats/Detectors/TPC/src/CalibdEdxCorrection.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414
#include <algorithm>
1515
#include <string_view>
1616

17+
#ifndef GPUCA_STANDALONE
1718
// o2 includes
1819
#include "Framework/Logger.h"
1920
#include "DataFormatsTPC/Defs.h"
2021
#include "CommonUtils/TreeStreamRedirector.h"
2122

2223
// root includes
2324
#include "TFile.h"
25+
#endif
2426

2527
using namespace o2::tpc;
2628

@@ -37,6 +39,8 @@ void CalibdEdxCorrection::clear()
3739
mDims = -1;
3840
}
3941

42+
#ifndef GPUCA_STANDALONE
43+
4044
void CalibdEdxCorrection::writeToFile(std::string_view fileName, std::string_view objName) const
4145
{
4246
std::unique_ptr<TFile> file(TFile::Open(fileName.data(), "recreate"));
@@ -181,3 +185,5 @@ void CalibdEdxCorrection::setUnity()
181185
}
182186
mDims = 0;
183187
}
188+
189+
#endif // GPUCA_STANDALONE

DataFormats/Detectors/TRD/include/DataFormatsTRD/TrackTRD.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define O2_DATAFORMATS_TRACK_TRD_H
1717

1818
#include "GPUTRDTrack.h"
19+
#include "ReconstructionDataFormats/GlobalTrackID.h"
1920

2021
namespace o2
2122
{

DataFormats/Detectors/TRD/src/Tracklet64.cxx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ void Tracklet64::print() const
2525
HelperMethods::getSector(getDetector()), HelperMethods::getStack(getDetector()), HelperMethods::getLayer(getDetector()), getROB(), getMCM(), getPadRow(), getPadCol(), getPosition(), getSlope(), getPID(), getQ0(), getQ1(), getQ2(), getFormat());
2626
}
2727

28-
#ifndef GPUCA_GPUCODE_DEVICE
2928
void Tracklet64::printStream(std::ostream& stream) const
3029
{
3130
stream << "Tracklet64 : 0x" << std::hex << getTrackletWord();
@@ -50,7 +49,5 @@ bool operator<(const Tracklet64& lhs, const Tracklet64& rhs)
5049
(lhs.getDetector() == rhs.getDetector() && lhs.getROB() == rhs.getROB() && lhs.getMCM() == rhs.getMCM() && lhs.getPadRow() == rhs.getPadRow() && lhs.getPadCol() < rhs.getPadCol());
5150
}
5251

53-
#endif // GPUCA_GPUCODE_DEVICE
54-
5552
} // namespace trd
5653
} // namespace o2

0 commit comments

Comments
 (0)