You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -49,6 +49,12 @@ class TPCScalerSpec : public Task
49
49
pc.inputs().get<TTree*>("tpcscaler");
50
50
}
51
51
52
+
if (mEnableWeights) {
53
+
if (pc.inputs().isValid("tpcscalerw")) {
54
+
pc.inputs().get<TPCScalerWeights*>("tpcscalerw");
55
+
}
56
+
}
57
+
52
58
if (pc.services().get<o2::framework::TimingInfo>().runNumber != mTPCScaler.getRun()) {
53
59
LOGP(error, "Run number {} of processed data and run number {} of loaded TPC scaler doesnt match!", pc.services().get<o2::framework::TimingInfo>().runNumber, mTPCScaler.getRun());
54
60
}
@@ -73,19 +79,35 @@ class TPCScalerSpec : public Task
73
79
LOGP(info, "Setting ion drift time to: {}", mIonDriftTimeMS);
74
80
mTPCScaler.setIonDriftTimeMS(mIonDriftTimeMS);
75
81
}
82
+
if (mScalerWeights.isValid()) {
83
+
LOGP(info, "Setting TPC scaler weights");
84
+
mTPCScaler.setScalerWeights(mScalerWeights);
85
+
mTPCScaler.useWeights(true);
86
+
}
87
+
}
88
+
if (matcher == ConcreteDataMatcher(o2::header::gDataOriginTPC, "TPCSCALERWCCDB", 0)) {
89
+
LOGP(info, "Updating TPC scaler weights");
90
+
mScalerWeights = *(TPCScalerWeights*)obj;
91
+
mTPCScaler.setScalerWeights(mScalerWeights);
92
+
mTPCScaler.useWeights(true);
76
93
}
77
94
}
78
95
79
96
private:
80
97
std::shared_ptr<o2::base::GRPGeomRequest> mCCDBRequest; ///< info for CCDB request
98
+
constboolmEnableWeights{false}; ///< use weights for TPC scalers
0 commit comments