Skip to content

Commit bc9658e

Browse files
authored
Merge a9bfe6c into sapling-pr-archive-ehellbar
2 parents 6f96ebb + a9bfe6c commit bc9658e

File tree

213 files changed

+6529
-9223
lines changed

Some content is hidden

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

213 files changed

+6529
-9223
lines changed

CCDB/include/CCDB/BasicCCDBManager.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include "CommonUtils/NameConf.h"
2121
#include "Framework/DataTakingContext.h"
2222
#include "Framework/DefaultsHelpers.h"
23+
#include "Framework/ServiceRegistryRef.h"
24+
#include "Framework/DataProcessingStats.h"
2325
#include <string>
2426
#include <chrono>
2527
#include <map>
@@ -340,6 +342,13 @@ T* CCDBManagerInstance::getForTimeStamp(std::string const& path, long timestamp,
340342
}
341343
auto end = std::chrono::system_clock::now();
342344
mTimerMS += std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
345+
auto *ref = o2::framework::ServiceRegistryRef::globalDeviceRef();
346+
if (ref && ref->active<framework::DataProcessingStats>()) {
347+
auto& stats = ref->get<o2::framework::DataProcessingStats>();
348+
stats.updateStats({(int)o2::framework::ProcessingStatsId::CCDB_CACHE_HIT, o2::framework::DataProcessingStats::Op::Set, (int64_t)mQueries - mFailures - mFetches});
349+
stats.updateStats({(int)o2::framework::ProcessingStatsId::CCDB_CACHE_MISS, o2::framework::DataProcessingStats::Op::Set, (int64_t)mFetches});
350+
stats.updateStats({(int)o2::framework::ProcessingStatsId::CCDB_CACHE_FAILURE, o2::framework::DataProcessingStats::Op::Set, (int64_t)mFailures});
351+
}
343352
return ptr;
344353
}
345354

@@ -391,4 +400,4 @@ class BasicCCDBManager : public CCDBManagerInstance
391400

392401
} // namespace o2::ccdb
393402

394-
#endif //O2_BASICCCDBMANAGER_H
403+
#endif // O2_BASICCCDBMANAGER_H

CCDB/src/BasicCCDBManager.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// Created by Sandro Wenzel on 2019-08-14.
1414
//
1515
#include "CCDB/BasicCCDBManager.h"
16+
#include "Framework/ServiceRegistryRef.h"
17+
#include "Framework/DataProcessingStats.h"
1618
#include <boost/lexical_cast.hpp>
1719
#include <fairlogger/Logger.h>
1820
#include <string>

Common/SimConfig/include/SimConfig/G4Params.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,22 @@ enum class EG4Physics {
3333
kUSER = 8 /* allows to give own string combination */
3434
};
3535

36+
// enumerating possible geometry navigation modes
37+
// (understanding that geometry description is always done with TGeo)
38+
enum class EG4Nav {
39+
kTGeo = 0, /* navigate with TGeo */
40+
kG4 = 1 /* navigate with G4 native geometry */
41+
};
42+
3643
// parameters to influence the G4 engine
3744
struct G4Params : public o2::conf::ConfigurableParamHelper<G4Params> {
3845
EG4Physics physicsmode = EG4Physics::kFTFP_BERT_EMV_optical; // default physics mode with which to configure G4
3946

4047
std::string configMacroFile = ""; // a user provided g4Config.in file (otherwise standard one fill be taken)
4148
std::string userPhysicsList = ""; // possibility to directly give physics list as string
4249

50+
EG4Nav navmode = EG4Nav::kTGeo; // geometry navigation mode (default TGeo)
51+
4352
std::string const& getPhysicsConfigString() const;
4453

4554
O2ParamDef(G4Params, "G4");

Common/SimConfig/src/SimConfigLinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#pragma link C++ class o2::conf::ConfigurableParamHelper < o2::conf::DigiParams> + ;
3030

3131
#pragma link C++ enum o2::conf::EG4Physics;
32+
#pragma link C++ enum o2::conf::EG4Nav;
3233
#pragma link C++ enum o2::conf::SimFieldMode;
3334
#pragma link C++ struct o2::conf::G4Params + ;
3435
#pragma link C++ class o2::conf::ConfigurableParamHelper < o2::conf::G4Params> + ;

DataFormats/Detectors/CTP/include/DataFormatsCTP/Configuration.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ struct CtpCfg {
214214
uint32_t orbitShift = 0;
215215
uint32_t irInputs_1_24 = 0;
216216
uint32_t irInputs_25_48 = 0;
217-
ClassDefNV(CtpCfg, 1)
217+
std::vector<int> listOfUsedInputs();
218+
ClassDefNV(CtpCfg, 2)
218219
};
219220
} // namespace ctp
220221
} // namespace o2

DataFormats/Detectors/CTP/src/Configuration.cxx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,9 +1227,24 @@ int CtpCfg::readAndSave(std::string& path)
12271227
}
12281228
return 0;
12291229
}
1230-
1230+
std::vector<int> CtpCfg::listOfUsedInputs()
1231+
{
1232+
std::cout << std::hex << "0x" << irInputs_1_24 << " " << irInputs_25_48 << std::dec << std::endl;
1233+
std::vector<int> inputList;
1234+
for (int i = 0; i < 24; i++) {
1235+
if ((1ul << i) & irInputs_1_24) {
1236+
inputList.push_back(i);
1237+
}
1238+
}
1239+
for (int i = 0; i < 24; i++) {
1240+
if ((1ul << i) & irInputs_25_48) {
1241+
inputList.push_back(i + 24);
1242+
}
1243+
}
1244+
return inputList;
1245+
}
12311246
std::ostream& o2::ctp::operator<<(std::ostream& in, const o2::ctp::CTPConfiguration& conf)
12321247
{
12331248
conf.printStream(in);
12341249
return in;
1235-
}
1250+
}

DataFormats/Detectors/EMCAL/include/DataFormatsEMCAL/EMCALChannelData.h

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

DataFormats/Detectors/FIT/FT0/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ o2_target_root_dictionary(DataFormatsFT0
4747
include/DataFormatsFT0/GlobalOffsetsCalibrationObject.h
4848
include/DataFormatsFT0/SpectraInfoObject.h
4949
include/DataFormatsFT0/SlewingCoef.h
50+
include/DataFormatsFT0/EventsPerBc.h
5051
)

Detectors/FIT/FT0/workflow/src/FT0DataReaderDPLSpec.cxx renamed to DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/EventsPerBc.h

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
/// @file FT0DataReaderDPLSpec.cxx
12+
#ifndef _FT0_EVENTS_PER_BC_CALIB_OBJECT
13+
#define _FT0_EVENTS_PER_BC_CALIB_OBJECT
1314

14-
#include "FT0Workflow/FT0DataReaderDPLSpec.h"
15+
#include "CommonConstants/LHCConstants.h"
16+
#include <Rtypes.h>
1517

16-
using namespace o2::framework;
17-
18-
namespace o2
19-
{
20-
namespace ft0
18+
namespace o2::ft0
2119
{
22-
23-
} // namespace ft0
24-
} // namespace o2
20+
struct EventsPerBc {
21+
std::array<double, o2::constants::lhc::LHCMaxBunches> histogram;
22+
ClassDefNV(EventsPerBc, 1);
23+
};
24+
} // namespace o2::ft0
25+
#endif

DataFormats/Detectors/FIT/FT0/src/DataFormatsFT0LinkDef.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,6 @@
5656
#pragma link C++ class std::pair < std::vector < double>, std::vector < double>> + ;
5757
#pragma link C++ class o2::ft0::SlewingCoef + ;
5858

59+
#pragma link C++ class o2::ft0::EventsPerBc + ;
60+
5961
#endif

0 commit comments

Comments
 (0)