diff --git a/EventFiltering/macros/uploadOTSobjects.C b/EventFiltering/macros/uploadOTSobjects.C index 2a9be2de17e..8e4c6c27136 100644 --- a/EventFiltering/macros/uploadOTSobjects.C +++ b/EventFiltering/macros/uploadOTSobjects.C @@ -67,6 +67,13 @@ void uploadOTSobjects(std::string inputList, std::string passName, bool useAlien api.storeAsTFile(scalers, baseCCDBpath + "FilterCounters", metadata, duration.first, duration.second + 1); api.storeAsTFile(filters, baseCCDBpath + "SelectionCounters", metadata, duration.first, duration.second + 1); TH1* hCounterTVX = static_cast(scalersFile->Get("bc-selection-task/hCounterTVX")); + if (!hCounterTVX) { + hCounterTVX = static_cast(scalersFile->Get("lumi-task/hCounterTVX")); + if (!hCounterTVX) { + std::cout << "No hCounterTVX histogram found in the file, skipping upload for run " << runString << std::endl; + continue; + } + } api.storeAsTFile(hCounterTVX, baseCCDBpath + "InspectedTVX", metadata, duration.first, duration.second + 1); std::vector zorroHelpers;