42 bool replaceKeysFromMap(
const std::vector<edm::ParameterSet> &alcarecoReplace, TriggerMap &triggerMap)
const;
73 <<
"Writing to DB to be done only once, set\n" 74 <<
"'process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))'\n" 75 <<
" next time. But your writing is fine.)";
110 for (std::vector<std::string>::const_iterator iKey = keys.begin(), endKey = keys.end(); iKey != endKey; ++iKey) {
111 if (triggerMap.find(*iKey) != triggerMap.end()) {
116 triggerMap.erase(*iKey);
118 throw cms::Exception(
"BadConfig") <<
"[AlCaRecoTriggerBitsRcdUpdate::removeKeysFromMap] " 119 <<
"Cannot remove key '" << *iKey <<
"' since not in " 120 <<
"list - typo in configuration?\n";
130 std::vector<std::pair<std::string, std::string> > keyPairs;
131 keyPairs.reserve(alcarecoReplace.size());
133 for (
auto &iSet : alcarecoReplace) {
136 keyPairs.push_back(std::make_pair(oldKey, newKey));
139 for (
auto &iKey : keyPairs) {
140 if (triggerMap.find(iKey.first) != triggerMap.end()) {
141 std::string bitsToReplace = triggerMap[iKey.first];
142 triggerMap.erase(iKey.first);
143 triggerMap[iKey.second] = bitsToReplace;
146 <<
"[AlCaRecoTriggerBitsRcdUpdate::replaceKeysFromMap] " 147 <<
"Cannot replace key '" << iKey.first <<
"with " << iKey.second <<
" since not in " 148 <<
"list - typo in configuration?\n";
161 for (std::vector<edm::ParameterSet>::const_iterator iSet = triggerListsAdd.begin(); iSet != triggerListsAdd.end();
163 const std::vector<std::string>
paths(iSet->getParameter<std::vector<std::string> >(
"hltPaths"));
169 if (triggerMap.find(filter) != triggerMap.end()) {
170 throw cms::Exception(
"BadConfig") <<
"List name '" << filter <<
"' already in map, either " 171 <<
"remove from 'triggerListsAdd' or " 172 <<
" add to 'listNamesRemove'.\n";
174 triggerMap[
filter] = mergedPaths;
186 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available.\n";
198 throw cms::Exception(
"BadConfig") <<
"Tag already exists, can only append until infinity," AlCaRecoTriggerBits * createStartTriggerBits(bool startEmpty, const edm::EventSetup &evtSetup) const
std::map< std::string, std::string > m_alcarecoToTrig
bool addTriggerLists(const std::vector< edm::ParameterSet > &triggerListsAdd, AlCaRecoTriggerBits &bits) const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
unsigned int nEventCalls_
std::map< std::string, std::string > TriggerMap
const std::vector< edm::ParameterSet > triggerListsAdd_
~AlCaRecoTriggerBitsRcdUpdate() override
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
#define DEFINE_FWK_MODULE(type)
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
unsigned long long Time_t
const std::vector< edm::ParameterSet > alcarecoReplace_
bool isNewTagRequest(const std::string &recordName)
const unsigned int firstRunIOV_
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
std::string compose(const std::vector< std::string > &paths) const
Compose several paths into one string :
bool removeKeysFromMap(const std::vector< std::string > &keys, TriggerMap &triggerMap) const
cond::Time_t endOfTime() const
AlCaRecoTriggerBitsRcdUpdate(const edm::ParameterSet &cfg)
const std::vector< std::string > listNamesRemove_
void writeBitsToDB(AlCaRecoTriggerBits *bitsToWrite) const
Takes over memory uresponsibility for 'bitsToWrite'.
bool replaceKeysFromMap(const std::vector< edm::ParameterSet > &alcarecoReplace, TriggerMap &triggerMap) const