Skip to content

Commit c08efdd

Browse files
Ankur YadavAnkur Yadav
authored andcommitted
Removed the ccdb check for q-vector calib objects from tableMaker_withAssoc. Just use a bool configurable to check if they exist
1 parent 4ee4ed2 commit c08efdd

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

PWGDQ/TableProducer/tableMaker_withAssoc.cxx

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ struct TableMaker {
297297
//
298298
struct : ConfigurableGroup {
299299
Configurable<bool> fConfigFT0CCumulant{"cfgFT0CCumulant", false, "If true, compute RefFlow cumulants from FT0C amplitudes (requires FT0s subscription)"};
300-
Configurable<std::string> fConfigQvecCalibPath{"cfgQvecCalibPath", "Analysis/EventPlane/QVecCorrections", "CCDB path for qvector calibration objects; used only to check availability per run"};
300+
Configurable<bool> fConfigQvectCalibAvailable{"cfgQvectCalibAvailable", false, "If true, qvector calibration objects are available in CCDB for this run"};
301301
} fConfigQvector;
302302

303303
struct : ConfigurableGroup {
@@ -335,7 +335,6 @@ struct TableMaker {
335335

336336
bool fDoDetailedQA = false; // Bool to set detailed QA true, if QA is set true
337337
int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc.
338-
bool fQvectCalibAvailable = false; // Whether the Q-vector calibration is available for the current run
339338

340339
// maps used to store index info; NOTE: std::map are sorted in ascending order by default (needed for track to collision indices)
341340
std::map<uint32_t, uint32_t> fCollIndexMap; // key: old collision index, value: skimmed collision index
@@ -1191,7 +1190,7 @@ struct TableMaker {
11911190
eventInfo(collision.globalIndex());
11921191

11931192
if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionQvectCentr) > 0) {
1194-
if (fQvectCalibAvailable) {
1193+
if (fConfigQvector.fConfigQvectCalibAvailable) {
11951194
qvecGroup.eventQvectorCentr(collision.qvecFT0ARe(), collision.qvecFT0AIm(), collision.qvecFT0CRe(), collision.qvecFT0CIm(), collision.qvecFT0MRe(), collision.qvecFT0MIm(), collision.qvecFV0ARe(), collision.qvecFV0AIm(), collision.qvecTPCposRe(), collision.qvecTPCposIm(), collision.qvecTPCnegRe(), collision.qvecTPCnegIm(),
11961195
collision.sumAmplFT0A(), collision.sumAmplFT0C(), collision.sumAmplFT0M(), collision.sumAmplFV0A(), collision.nTrkTPCpos(), collision.nTrkTPCneg());
11971196
qvecGroup.eventQvectorCentrExtra(collision.qvecTPCallRe(), collision.qvecTPCallIm(), collision.nTrkTPCall());
@@ -1773,29 +1772,6 @@ struct TableMaker {
17731772
}
17741773
std::map<std::string, std::string> metadataRCT, header;
17751774
header = fCCDBApi.retrieveHeaders(Form("RCT/Info/RunInformation/%i", bcs.begin().runNumber()), metadataRCT, -1);
1776-
1777-
// Check if qvector calibration objects are available in CCDB for this run
1778-
if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionQvectCentr) > 0) {
1779-
std::map<std::string, std::string> metadataQvect;
1780-
const std::array<std::string, 3> subfolders = {"v2", "v3", "v4"};
1781-
bool anyFound = false;
1782-
for (const auto& sub : subfolders) {
1783-
std::string fullPath = fConfigQvector.fConfigQvecCalibPath.value + "/" + sub;
1784-
auto headers = fCCDBApi.retrieveHeaders(fullPath, metadataQvect, bcs.begin().timestamp());
1785-
if (headers.empty()) {
1786-
LOG(warn) << "Qvector calibration not found at CCDB path '" << fullPath
1787-
<< "' for run " << bcs.begin().runNumber();
1788-
} else {
1789-
anyFound = true;
1790-
}
1791-
}
1792-
fQvectCalibAvailable = anyFound;
1793-
if (!fQvectCalibAvailable) {
1794-
LOG(warn) << "No qvector calibration found in any subfolder under '"
1795-
<< fConfigQvector.fConfigQvecCalibPath.value
1796-
<< "' — qvector tables will not be filled for this run.";
1797-
}
1798-
}
17991775
uint64_t sor = std::atol(header["SOR"].c_str());
18001776
uint64_t eor = std::atol(header["EOR"].c_str());
18011777
VarManager::SetSORandEOR(sor, eor);

0 commit comments

Comments
 (0)