Skip to content

Commit 36d4255

Browse files
authored
HBFUtils.nHBFperTF is stored in GRP, re-set default to 256 (#5901)
* HBFUtils.nHBFperTF is stored in GRP, re-set default to 256 * dummy commit to trigger CI Co-authored-by: shahoian <ruben.shahoyan@cern.ch>
1 parent 321f716 commit 36d4255

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

DataFormats/Parameters/include/DataFormatsParameters/GRPObject.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ class GRPObject
5353
void setTimeStart(timePoint t) { mTimeStart = t; }
5454
void setTimeEnd(timePoint t) { mTimeEnd = t; }
5555

56+
void setNHBFPerTF(uint32_t n) { mNHBFPerTF = n; }
57+
uint32_t getNHBFPerTF() const { return mNHBFPerTF; }
58+
5659
void setFirstOrbit(uint32_t o) { mFirstOrbit = o; }
5760
uint32_t getFirstOrbit() const { return mFirstOrbit; }
5861

@@ -138,10 +141,11 @@ class GRPObject
138141
static GRPObject* loadFrom(const std::string& grpFileName, const std::string& grpName = "GRP");
139142

140143
private:
141-
timePoint mTimeStart = 0; ///< DAQ_time_start entry from DAQ logbook
142-
timePoint mTimeEnd = 0; ///< DAQ_time_end entry from DAQ logbook
144+
timePoint mTimeStart = 0; ///< DAQ_time_start entry from DAQ logbook
145+
timePoint mTimeEnd = LONG_MAX; ///< DAQ_time_end entry from DAQ logbook
143146

144-
uint32_t mFirstOrbit = 0; /// 1st orbit of the 1st TF, in the MC set at digitization // RS Not sure it will stay in GRP, may go to some CTP object
147+
uint32_t mFirstOrbit = 0; /// 1st orbit of the 1st TF, in the MC set at digitization // RS Not sure it will stay in GRP, may go to some CTP object
148+
uint32_t mNHBFPerTF = 256; /// Number of HBFrames per TF
145149

146150
DetID::mask_t mDetsReadout; ///< mask of detectors which are read out
147151
DetID::mask_t mDetsContinuousRO; ///< mask of detectors read out in continuos mode

DataFormats/Parameters/src/GRPObject.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void GRPObject::print() const
5050
printf("Start: %s", std::ctime(&t));
5151
t = mTimeEnd; // system_clock::to_time_t(mTimeEnd);
5252
printf("End : %s", std::ctime(&t));
53-
printf("1st orbit: %u\n", mFirstOrbit);
53+
printf("1st orbit: %u, %u orbits per TF\n", mFirstOrbit, mNHBFPerTF);
5454
printf("Beam0: Z:A = %3d:%3d, Energy = %.3f\n", getBeamZ(BeamClockWise), getBeamA(BeamClockWise),
5555
getBeamEnergyPerNucleon(BeamClockWise));
5656
printf("Beam1: Z:A = %3d:%3d, Energy = %.3f\n", getBeamZ(BeamAntiClockWise), getBeamA(BeamAntiClockWise),

Detectors/Raw/include/DetectorsRaw/HBFUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ struct HBFUtils : public o2::conf::ConfigurableParamHelper<HBFUtils> {
125125

126126
void print() const { printKeyValues(true); }
127127

128-
int nHBFPerTF = 128; ///< number of orbits per BC
128+
int nHBFPerTF = 256; ///< number of orbits per BC
129129
uint32_t orbitFirst = 0; ///< orbit of 1st TF of the run
130130

131131
// used for MC

Steer/DigitizerWorkflow/src/GRPUpdaterSpec.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class GRPDPLUpdatedTask
5252

5353
TFile flGRP(mGRPFileName.c_str(), "update");
5454
if (flGRP.IsZombie()) {
55-
LOG(ERROR) << "Failed to open in update mode " << mGRPFileName;
55+
LOG(ERROR) << "Failed to open in update mode " << mGRPFileName;
5656
return;
5757
}
5858
std::unique_ptr<GRP> grp(static_cast<GRP*>(flGRP.GetObjectChecked(grpName.c_str(), GRP::Class())));
@@ -65,6 +65,7 @@ class GRPDPLUpdatedTask
6565
grp->setDetROMode(det, roMode);
6666
}
6767
grp->setFirstOrbit(o2::raw::HBFUtils::Instance().orbitFirst);
68+
grp->setNHBFPerTF(o2::raw::HBFUtils::Instance().nHBFPerTF);
6869
LOG(INFO) << "Updated GRP in " << mGRPFileName << " for detectors RO mode and 1st orbit of the run";
6970
grp->print();
7071
flGRP.WriteObjectAny(grp.get(), grp->Class(), grpName.c_str());

0 commit comments

Comments
 (0)