15 #include "boost/algorithm/string/trim.hpp"
34 boost::mutex::scoped_lock sl(listLock_);
38 InitMsgMap::iterator
pos = initMsgMap_.lower_bound(outputModuleId);
39 if ( pos != initMsgMap_.end() && !(initMsgMap_.key_comp()(outputModuleId, pos->first)))
42 checkOutputModuleLabel(initMsgView);
49 &(*serializedProds)[0]
59 boost::mutex::scoped_lock sl(listLock_);
63 InitMsgMap::iterator
pos = initMsgMap_.lower_bound(outputModuleId);
64 if ( pos != initMsgMap_.end() && !(initMsgMap_.key_comp()(outputModuleId, pos->first)))
72 checkOutputModuleLabel(initMsgView);
84 const std::string trimmedOMLabel = boost::algorithm::trim_copy(inputOMLabel);
85 if (trimmedOMLabel.empty()) {
87 <<
"Invalid INIT message: the HLT output module label is empty!"
96 boost::mutex::scoped_lock sl(listLock_);
99 InitMsgMap::const_iterator it = initMsgMap_.find(requestedOutputModuleId);
100 if (it != initMsgMap_.end())
101 serializedProds = it->second;
103 return serializedProds;
110 boost::mutex::scoped_lock sl(listLock_);
117 if (requestedOutputModuleLabel.empty()) {
118 if (initMsgMap_.size() == 1) {
119 serializedProds = initMsgMap_.begin()->second;
121 else if (initMsgMap_.size() > 1) {
123 msg.append(
"HLT output module label is empty but there are multiple ");
124 msg.append(
"HLT output modules to choose from.");
125 throw cms::Exception(
"InitMsgCollection",
"getElementForOutputModule:")
132 for (InitMsgMap::const_iterator msgIter = initMsgMap_.begin(),
133 msgIterEnd = initMsgMap_.end();
134 msgIter != msgIterEnd;
138 InitMsgView existingInitMsg(&(*workingMessage)[0]);
142 if (requestedOutputModuleLabel == existingOMLabel) {
143 serializedProds = workingMessage;
149 return serializedProds;
155 boost::mutex::scoped_lock sl(listLock_);
160 ptrToElement = initMsgMap_.at(index);
162 catch (std::out_of_range&
e)
171 boost::mutex::scoped_lock sl(listLock_);
178 boost::mutex::scoped_lock sl(listLock_);
179 return initMsgMap_.size();
185 boost::mutex::scoped_lock sl(listLock_);
188 if (initMsgMap_.empty()) {
189 return "No information is available about the available triggers.";
194 helpString.append(
"The full list of trigger paths is the following:");
199 InitMsgView existingInitMsg(&(*serializedProds)[0]);
202 for (
unsigned int idx = 0;
idx < existingTriggerList.size();
idx++) {
203 helpString.append(
"\n " + existingTriggerList[
idx]);
207 helpString.append(
"\nThe registered HLT output modules and their ");
208 helpString.append(
"trigger selections are the following:");
211 for (InitMsgMap::const_iterator msgIter = initMsgMap_.begin(),
212 msgIterEnd = initMsgMap_.end();
213 msgIter != msgIterEnd;
216 serializedProds = msgIter->second;
217 InitMsgView workingInitMsg(&(*serializedProds)[0]);
218 helpString.append(
"\n *** Output module \"");
220 helpString.append(
"\" ***");
223 for (
unsigned int idx = 0;
idx < workingSelectionList.size();
idx++) {
224 helpString.append(
"\n " + workingSelectionList[
idx]);
235 boost::mutex::scoped_lock sl(listLock_);
237 InitMsgMap::const_iterator it = initMsgMap_.find(outputModuleId);
239 if (it == initMsgMap_.end())
245 const InitMsgView initMsgView(&(*serializedProds)[0]);
252 unsigned int maxCount)
255 unsigned int elementCount = list.size();
256 if (maxCount > 0 && maxCount < elementCount) {elementCount = maxCount;}
257 for (
unsigned int idx = 0;
idx < elementCount;
idx++)
259 resultString.append(list[
idx]);
260 if (idx < (elementCount-1)) {
261 resultString.append(
", ");
264 if (elementCount < list.size())
266 resultString.append(
", ...");
std::vector< unsigned char > InitMsgBuffer
InitMsgSharedPtr getElementAt(const unsigned int index) const
InitMsgSharedPtr getElementForOutputModuleId(const uint32_t &) const
boost::shared_ptr< InitMsgBuffer > InitMsgSharedPtr
void hltTriggerNames(Strings &save_here) const
std::string getOutputModuleName(const uint32_t outputModuleId) const
uint8 * startAddress() const
void checkOutputModuleLabel(InitMsgView const &) const
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
InitMsgSharedPtr getElementForOutputModuleLabel(const std::string &) const
Container::value_type value_type
std::string getSelectionHelpString() const
unsigned int copyFragmentsIntoBuffer(std::vector< unsigned char > &buff) const
std::string outputModuleLabel() const
bool addIfUnique(InitMsgView const &initMsgView)
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
unsigned long totalDataSize() const
uint32 outputModuleId() const
static std::string stringsToText(Strings const &list, unsigned int maxCount=0)
void hltTriggerSelections(Strings &save_here) 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 and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
uint32_t outputModuleId() const