62 firstRunIOV_(cfg.getParameter<unsigned int>(
"firstRunIOV")),
63 lastRunIOV_(cfg.getParameter<int>(
"lastRunIOV")),
64 startEmpty_(cfg.getParameter<bool>(
"startEmpty")),
65 listNamesRemove_(cfg.getParameter<std::vector<std::string> >(
"listNamesRemove")),
66 triggerListsAdd_(cfg.getParameter<std::vector<edm::
ParameterSet> >(
"triggerListsAdd"))
75 <<
"@SUB=analyze" <<
"Writing to DB to be done only once, set\n"
76 <<
"'process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))'\n"
77 <<
" next time. But your writing is fine.)";
113 for (std::vector<std::string>::const_iterator iKey = keys.begin(), endKey = keys.end();
114 iKey != endKey; ++iKey) {
115 if (triggerMap.find(*iKey) != triggerMap.end()) {
120 triggerMap.erase(*iKey);
122 throw cms::Exception(
"BadConfig") <<
"[AlCaRecoTriggerBitsRcdUpdate::removeKeysFromMap] "
123 <<
"Cannot remove key '" << *iKey <<
"' since not in "
124 <<
"list - typo in configuration?\n";
138 for (std::vector<edm::ParameterSet>::const_iterator iSet = triggerListsAdd.begin();
139 iSet != triggerListsAdd.end(); ++iSet) {
141 const std::vector<std::string>
paths(iSet->getParameter<std::vector<std::string> >(
"hltPaths"));
144 const std::string mergedPaths = bits.
compose(paths);
146 const std::string
filter(iSet->getParameter<std::string>(
"listName"));
147 if (triggerMap.find(filter) != triggerMap.end()) {
148 throw cms::Exception(
"BadConfig") <<
"List name '" << filter <<
"' already in map, either "
149 <<
"remove from 'triggerListsAdd' or "
150 <<
" add to 'listNamesRemove'.\n";
152 triggerMap[
filter] = mergedPaths;
165 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available.\n";
170 const std::string
recordName(
"AlCaRecoTriggerBitsRcd");
177 throw cms::Exception(
"BadConfig") <<
"Tag already exists, can only append until infinity,"
184 <<
" (< 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)
unsigned long long Time_t
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)
virtual void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup)
~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'.