Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ class AODProducerWorkflowDPL : public Task
std::shared_ptr<o2::utils::TreeStreamRedirector> mStreamer;

int mNThreads = 1;
bool mInitOnceDone = false;
bool mUseMC = true;
bool mUseSigFiltMC = false; // enable signal filtering for MC with embedding
bool mEnableSV = true; // enable secondary vertices
Expand Down
6 changes: 4 additions & 2 deletions Detectors/AOD/src/AODProducerWorkflowSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3176,7 +3176,7 @@ std::set<uint64_t> AODProducerWorkflowDPL::filterEMCALIncomplete(const gsl::span
void AODProducerWorkflowDPL::updateTimeDependentParams(ProcessingContext& pc)
{
o2::base::GRPGeomHelper::instance().checkUpdates(pc);
static bool initOnceDone = false;
auto& initOnceDone = mInitOnceDone;
if (!initOnceDone) { // this params need to be queried only once
initOnceDone = true;
// Note: DPLAlpideParam for ITS and MFT will be loaded by the RecoContainer
Expand All @@ -3185,11 +3185,13 @@ void AODProducerWorkflowDPL::updateTimeDependentParams(ProcessingContext& pc)
auto grpECS = o2::base::GRPGeomHelper::instance().getGRPECS();
o2::BunchFilling bcf = o2::base::GRPGeomHelper::instance().getGRPLHCIF()->getBunchFilling();
std::bitset<3564> bs = bcf.getBCPattern();
for (auto i = 0U; i < bs.size(); i++) {
static bool tofBCsDone = false; // o2::tof::Utils keeps one list for the process
for (auto i = 0U; !tofBCsDone && i < bs.size(); i++) {
if (bs.test(i)) {
o2::tof::Utils::addInteractionBC(i);
}
}
tofBCsDone = true;

const auto& alpParamsITS = o2::itsmft::DPLAlpideParam<o2::detectors::DetID::ITS>::Instance();
mITSROFrameHalfLengthNS = 0.5 * (grpECS->isDetContinuousReadOut(o2::detectors::DetID::ITS) ? alpParamsITS.roFrameLengthInBC * o2::constants::lhc::LHCBunchSpacingNS : alpParamsITS.roFrameLengthTrig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ class MatchTPCITS

///< do we use track Z difference to reject fake matches? makes sense for triggered mode only
bool mCompareTracksDZ = false;
bool mInitOnceDone = false;

float YMaxAtXMatchingRef = 999.; ///< max Y in the sector at reference X

Expand Down
2 changes: 1 addition & 1 deletion Detectors/GlobalTracking/src/MatchTPCITS.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ void MatchTPCITS::updateTimeDependentParams()
mBz = o2::base::Propagator::Instance()->getNominalBz();
mFieldON = std::abs(mBz) > 0.01;

static bool initOnceDone = false;
auto& initOnceDone = mInitOnceDone;
if (!initOnceDone) {
initOnceDone = true;
if (mParams->runAfterBurner) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class GlobalFwdMatchingDPL : public Task
const o2::itsmft::TopologyDictionary* mMFTDict = nullptr; // cluster patterns dictionary

bool mUseMC = true;
bool mInitOnceDone = false;
TStopwatch mTimer;
};

Expand Down Expand Up @@ -136,7 +137,7 @@ void GlobalFwdMatchingDPL::finaliseCCDB(ConcreteDataMatcher& matcher, void* obj)
void GlobalFwdMatchingDPL::updateTimeDependentParams(ProcessingContext& pc)
{
o2::base::GRPGeomHelper::instance().checkUpdates(pc);
static bool initOnceDone = false;
auto& initOnceDone = mInitOnceDone;
if (!initOnceDone) { // this params need to be queried only once
initOnceDone = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class PrimaryVertexingSpec : public Task
bool mValidateWithIR{false}; ///< require vertex validation with IR (e.g. from FT0)
float mITSROFrameLengthMUS = 0.;
float mITSROFBiasMUS = 0.;
bool mInitOnceDone = false;
TStopwatch mTimer;
};

Expand Down Expand Up @@ -253,7 +254,7 @@ void PrimaryVertexingSpec::finaliseCCDB(ConcreteDataMatcher& matcher, void* obj)
void PrimaryVertexingSpec::updateTimeDependentParams(ProcessingContext& pc)
{
o2::base::GRPGeomHelper::instance().checkUpdates(pc);
static bool initOnceDone = false;
auto& initOnceDone = mInitOnceDone;
if (!initOnceDone) { // this params need to be queried only once
initOnceDone = true;
// Note: reading of the ITS AlpideParam needed for ITS timing is done by the RecoContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class SecondaryVertexingSpec : public Task
const o2::gpu::TPCFastTransformPOD* mTPCCorrMaps{nullptr};
GTrackID::mask_t mSrc{};
bool mEnableCCDBParams = false;
bool mInitOnceDone = false;
bool mEnableCascades = false;
bool mEnable3BodyVertices = false;
bool mEnableStrangenessTracking = false;
Expand Down Expand Up @@ -207,7 +208,7 @@ void SecondaryVertexingSpec::updateTimeDependentParams(ProcessingContext& pc)
auto const& raw = pc.inputs().get<const char*>("corrMap");
mTPCCorrMaps = &gpu::TPCFastTransformPOD::get(raw);
}
static bool initOnceDone = false;
auto& initOnceDone = mInitOnceDone;
if (!initOnceDone) { // this params need to be queried only once
initOnceDone = true;
mVertexer.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class TPCITSMatchingDPL : public Task
const o2::gpu::TPCFastTransformPOD* mTPCCorrMaps{};
o2::globaltracking::MatchTPCITS mMatching; // matching engine
bool mUseFT0 = false;
bool mInitOnceDone = false;
bool mCalibMode = false;
bool mSkipTPCOnly = false; // to use only externally constrained tracks (for test only)
bool mUseMC = true;
Expand Down Expand Up @@ -204,7 +205,7 @@ void TPCITSMatchingDPL::updateTimeDependentParams(ProcessingContext& pc)
mTPCCorrMaps = &o2::gpu::TPCFastTransformPOD::get(raw);
float lumiCTP = mRequestCTPLumi ? pc.inputs().get<float>("lumiCTP") : 0;

static bool initOnceDone = false;
auto& initOnceDone = mInitOnceDone;
if (!initOnceDone) { // this params need to be queried only once
initOnceDone = true;
pc.inputs().get<o2::globaltracking::MatchTPCITSParams*>("MatchParam");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class VertexTrackMatcherSpec : public Task
std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
o2::tpc::VDriftHelper mTPCVDriftHelper{};
o2::vertexing::VertexTrackMatcher mMatcher;
bool mInitOnceDone = false;
TStopwatch mTimer;
};

Expand Down Expand Up @@ -90,7 +91,7 @@ void VertexTrackMatcherSpec::updateTimeDependentParams(ProcessingContext& pc)
{
o2::base::GRPGeomHelper::instance().checkUpdates(pc);
mTPCVDriftHelper.extractCCDBInputs(pc);
static bool initOnceDone = false;
auto& initOnceDone = mInitOnceDone;
if (!initOnceDone) { // this params need to be queried only once
initOnceDone = true;
// put here init-once stuff
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class TPCInterpolationDPL : public Task
bool mSendTrackData{false}; ///< if true, not only the clusters but also corresponding track data will be sent
uint32_t mSlotLength{600u}; ///< the length of one calibration slot required to calculate max number of tracks per TF
int mMatCorr{2}; ///< the material correction to be used for track interpolation
bool mInitOnceDone = false;
TStopwatch mTimer;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void TPCInterpolationDPL::updateTimeDependentParams(ProcessingContext& pc)
{
o2::base::GRPGeomHelper::instance().checkUpdates(pc);
mTPCVDriftHelper.extractCCDBInputs(pc);
static bool initOnceDone = false;
auto& initOnceDone = mInitOnceDone;
if (!initOnceDone) { // this params need to be queried only once
initOnceDone = true;
// other init-once stuff
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class ITSTrackingInterface
std::vector<o2::framework::InputSpec> mFilter;
TrackingMode::Type mMode = TrackingMode::Unset;
bool mOverrideBeamEstimation = false;
bool mInitOnceDone = false;
const o2::itsmft::TopologyDictionary* mDict = nullptr;
std::unique_ptr<TrackerN> mTracker = nullptr;
std::unique_ptr<VertexerN> mVertexer = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion Detectors/ITSMFT/ITS/tracking/src/TrackingInterface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ void ITSTrackingInterface::run(framework::ProcessingContext& pc)
void ITSTrackingInterface::updateTimeDependentParams(framework::ProcessingContext& pc)
{
o2::base::GRPGeomHelper::instance().checkUpdates(pc);
static bool initOnceDone = false;
auto& initOnceDone = mInitOnceDone;
if (mOverrideBeamEstimation) {
pc.inputs().get<o2::dataformats::MeanVertexObject*>("meanvtx");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class TrackerDPL : public o2::framework::Task
float mMFTROFrameLengthMUSInv = -1.; ///< MFT RO frame in \mus inverse
bool mUseMC = false;
bool mFieldOn = true;
bool mInitOnceDone = false;
int mNThreads = 4;
std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
const o2::itsmft::TopologyDictionary* mDict = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion Detectors/ITSMFT/MFT/workflow/src/TrackerSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ void TrackerDPL::endOfStream(EndOfStreamContext& ec)
void TrackerDPL::updateTimeDependentParams(ProcessingContext& pc)
{
o2::base::GRPGeomHelper::instance().checkUpdates(pc);
static bool initOnceDone = false;
auto& initOnceDone = mInitOnceDone;
if (!initOnceDone) { // this params need to be queried only once
initOnceDone = true;
if (pc.inputs().getPos("mftTGeo") >= 0) {
Expand Down
3 changes: 2 additions & 1 deletion Detectors/MUON/MID/Workflow/src/TrackerSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class TrackerDeviceDPL
{
// Triggers finalizeCCDB
o2::base::GRPGeomHelper::instance().checkUpdates(pc);
static bool initOnceDone = false;
auto& initOnceDone = mInitOnceDone;
if (!initOnceDone) {
initOnceDone = true;
auto geoTrans = createTransformationFromManager(gGeoManager);
Expand Down Expand Up @@ -166,6 +166,7 @@ class TrackerDeviceDPL
bool mIsMC = false;
bool mKeepAll = false;
bool mCheckMasked = false;
bool mInitOnceDone = false;
TrackLabeler mTrackLabeler{};
std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
std::unique_ptr<Tracker> mTracker{nullptr};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class TRDGlobalTracking : public o2::framework::Task
o2::dataformats::GlobalTrackID::mask_t mTrkMask; ///< seeding track sources (TPC, ITS-TPC)
bool mTrigRecFilter{false}; ///< if true, TRD trigger records without matching ITS IR are filtered out
bool mStrict{false}; ///< preliminary matching in strict mode
bool mInitOnceDone = false;
TStopwatch mTimer;
// temporary members -> should go into processor (GPUTRDTracker or additional refit processor?)
std::unique_ptr<o2::gpu::GPUO2InterfaceRefit> mTPCRefitter; ///< TPC refitter used for TPC tracks refit during the reconstruction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class TRDTrackletTransformerSpec : public o2::framework::Task
std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
bool mTrigRecFilterActive = false; ///< if true, transform only TRD tracklets for which ITS data is available
TrackletTransformer mTransformer;
bool mInitOnceDone = false;
};

o2::framework::DataProcessorSpec getTRDTrackletTransformerSpec(bool trigRecFilterActive);
Expand Down
2 changes: 1 addition & 1 deletion Detectors/TRD/workflow/src/TRDGlobalTrackingSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void TRDGlobalTracking::updateTimeDependentParams(ProcessingContext& pc)
float lumiCTP = mRequestCTPLumi ? pc.inputs().get<float>("lumiCTP") : 0;

// pc.inputs().get<TopologyDictionary*>("cldict"); // called by the RecoContainer to trigger finaliseCCDB
static bool initOnceDone = false;
auto& initOnceDone = mInitOnceDone;
if (!initOnceDone) { // this params need to be queried only once
initOnceDone = true;
// init-once stuff
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void TRDTrackletTransformerSpec::run(o2::framework::ProcessingContext& pc)
void TRDTrackletTransformerSpec::updateTimeDependentParams(ProcessingContext& pc)
{
o2::base::GRPGeomHelper::instance().checkUpdates(pc);
static bool initOnceDone = false;
auto& initOnceDone = mInitOnceDone;
if (!initOnceDone) { // this params need to be queried only once
initOnceDone = true;
// init-once stuff
Expand Down
3 changes: 2 additions & 1 deletion Detectors/TRD/workflow/src/TrackBasedCalibSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class TRDTrackBasedCalibDevice : public Task

bool mDoGainCalib{false};
bool mDoVdExBCalib{false};
bool mInitOnceDone = false;

std::shared_ptr<DataRequest> mDataRequest;
std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
Expand Down Expand Up @@ -99,7 +100,7 @@ void TRDTrackBasedCalibDevice::updateTimeDependentParams(ProcessingContext& pc)
if (mDoGainCalib) {
pc.inputs().get<o2::trd::LocalGainFactor*>("localgainfactors"); // just to trigger the finaliseCCDB
}
static bool initOnceDone = false;
auto& initOnceDone = mInitOnceDone;
if (!initOnceDone) { // this params need to be queried only once
initOnceDone = true;
// init-once stuff
Expand Down