44 TriggerMap &triggerMap)
const;
79 <<
"@SUB=analyze" <<
"Writing to DB to be done only once, set\n" 80 <<
"'process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))'\n" 81 <<
" next time. But your writing is fine.)";
120 for (std::vector<std::string>::const_iterator iKey = keys.begin(), endKey = keys.end();
121 iKey != endKey; ++iKey) {
122 if (triggerMap.find(*iKey) != triggerMap.end()) {
127 triggerMap.erase(*iKey);
129 throw cms::Exception(
"BadConfig") <<
"[AlCaRecoTriggerBitsRcdUpdate::removeKeysFromMap] " 130 <<
"Cannot remove key '" << *iKey <<
"' since not in " 131 <<
"list - typo in configuration?\n";
143 std::vector<std::pair<std::string,std::string> > keyPairs;
144 keyPairs.reserve(alcarecoReplace.size());
146 for(
auto &iSet : alcarecoReplace ){
149 keyPairs.push_back(std::make_pair(oldKey,newKey));
152 for(
auto& iKey : keyPairs){
153 if(triggerMap.find(iKey.first) != triggerMap.end() ){
154 std::string bitsToReplace = triggerMap[iKey.first];
155 triggerMap.erase(iKey.first);
156 triggerMap[iKey.second] = bitsToReplace;
158 edm::LogWarning(
"AlCaRecoTriggerBitsRcdUpdate") <<
"[AlCaRecoTriggerBitsRcdUpdate::replaceKeysFromMap] " 159 <<
"Cannot replace key '" << iKey.first <<
"with " << iKey.second <<
" since not in " 160 <<
"list - typo in configuration?\n";
174 for (std::vector<edm::ParameterSet>::const_iterator iSet = triggerListsAdd.begin();
175 iSet != triggerListsAdd.end(); ++iSet) {
177 const std::vector<std::string> paths(iSet->getParameter<std::vector<std::string> >(
"hltPaths"));
183 if (triggerMap.find(filter) != triggerMap.end()) {
184 throw cms::Exception(
"BadConfig") <<
"List name '" << filter <<
"' already in map, either " 185 <<
"remove from 'triggerListsAdd' or " 186 <<
" add to 'listNamesRemove'.\n";
188 triggerMap[
filter] = mergedPaths;
201 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available.\n";
213 throw cms::Exception(
"BadConfig") <<
"Tag already exists, can only append until infinity," 220 <<
" (< 0 meaning infinity)!";
AlCaRecoTriggerBits * createStartTriggerBits(bool startEmpty, const edm::EventSetup &evtSetup) const
std::map< std::string, std::string > m_alcarecoToTrig
#define DEFINE_FWK_MODULE(type)
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_
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
virtual 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)
~AlCaRecoTriggerBitsRcdUpdate()
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