#include <InitMsgCollection.h>
Public Member Functions | |
bool | addIfUnique (InitMsgView const &initMsgView) |
void | clear () |
InitMsgSharedPtr | getElementAt (const unsigned int index) const |
InitMsgSharedPtr | getElementForOutputModule (const std::string &requestedOMLabel) const |
InitMsgSharedPtr | getLastElement () const |
std::string | getOutputModuleName (const uint32_t outputModuleId) const |
std::string | getSelectionHelpString () const |
InitMsgCollection () | |
size_t | initMsgCount (const std::string &outputModuleLabel) const |
size_t | maxMsgCount () const |
size_t | size () const |
~InitMsgCollection () | |
Static Public Member Functions | |
static std::string | stringsToText (Strings const &list, unsigned int maxCount=0) |
Private Types | |
typedef std::vector < InitMsgPtrAndCount > | InitMsgList |
typedef std::pair < InitMsgSharedPtr, size_t > | InitMsgPtrAndCount |
typedef std::map< uint32_t, std::string > | OutModTable |
Private Member Functions | |
void | add (InitMsgView const &initMsgView) |
Private Attributes | |
InitMsgList | initMsgList_ |
boost::mutex | listLock_ |
OutModTable | outModNameTable_ |
Definition at line 32 of file InitMsgCollection.h.
|
private |
Definition at line 168 of file InitMsgCollection.h.
|
private |
Definition at line 167 of file InitMsgCollection.h.
|
private |
Definition at line 171 of file InitMsgCollection.h.
InitMsgCollection::InitMsgCollection | ( | ) |
InitMsgCollection::~InitMsgCollection | ( | ) |
|
private |
Adds the specified INIT message to the collection (unconditionally).
initMsgView | The INIT message to add to the collection. |
Definition at line 301 of file InitMsgCollection.cc.
References filterCSVwithJSON::copy, InitMsgView::outputModuleId(), InitMsgView::outputModuleLabel(), InitMsgView::size(), and InitMsgView::startAddress().
bool InitMsgCollection::addIfUnique | ( | InitMsgView const & | initMsgView | ) |
Adds the specified INIT message to the collection if it has a unique HLT output module label.
If we already have an INIT message with the same output module label as the input INIT message, the duplicate message is not added to the collection, and this method returns false.
If the output module label inside the INIT message is empty, an exception is thrown.
initMsgView | The INIT message to be added to the collection. |
cms::Exception | if one of the consistency checks fails. |
Definition at line 31 of file InitMsgCollection.cc.
References Clusterizer1DCommons::add(), edm::hlt::Exception, and InitMsgView::outputModuleLabel().
void InitMsgCollection::clear | ( | void | ) |
Removes all entries from the collection.
Definition at line 159 of file InitMsgCollection.cc.
Referenced by python.Vispa.Views.WidgetView.WidgetView::closeEvent(), python.Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), python.Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), python.Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), python.Vispa.Views.WidgetView.WidgetView::setDataObjects(), python.Vispa.Views.TreeView.TreeView::updateContent(), python.Vispa.Views.TableView.TableView::updateContent(), python.Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), and python.Vispa.Views.PropertyView.PropertyView::updateContent().
InitMsgSharedPtr InitMsgCollection::getElementAt | ( | const unsigned int | index | ) | const |
Returns a shared pointer to the requested element in the collection or an empty pointer if the requested index if out of bounds.
index | The index of the requested element. |
Definition at line 143 of file InitMsgCollection.cc.
InitMsgSharedPtr InitMsgCollection::getElementForOutputModule | ( | const std::string & | requestedOMLabel | ) | const |
Fetches the single INIT message that matches the requested HLT output module label. If no messages match the request, an empty pointer is returned.
If the requested HLT output module label is empty, and there is only one INIT message in the collection, that INIT message is returned. However, if there is more than one INIT message in the collection, and an empty request is passed into this method, an exception will be thrown. (How can we decide which is the best match when we have nothing to work with?)
requestedOMLabel | The HLT output module label of the INIT message to be returned. |
cms::Exception | if the input HLT output module label string is empty and there is more than one INIT message in the collection. |
Definition at line 86 of file InitMsgCollection.cc.
References edm::hlt::Exception, runTheMatrix::msg, and InitMsgView::outputModuleLabel().
InitMsgSharedPtr InitMsgCollection::getLastElement | ( | ) | const |
Returns a shared pointer to the last element in the collection or an empty pointer if the collection has no elements.
Definition at line 131 of file InitMsgCollection.cc.
std::string InitMsgCollection::getOutputModuleName | ( | const uint32_t | outputModuleId | ) | const |
Returns the name of the output module with the specified module ID, or an empty string of the specified module ID is not known.
Definition at line 264 of file InitMsgCollection.cc.
std::string InitMsgCollection::getSelectionHelpString | ( | ) | const |
Returns a string with information on which selections are available.
Definition at line 214 of file InitMsgCollection.cc.
References InitMsgView::hltTriggerNames(), InitMsgView::hltTriggerSelections(), and InitMsgView::outputModuleLabel().
size_t InitMsgCollection::initMsgCount | ( | const std::string & | outputModuleLabel | ) | const |
Returns the number of identical INIT messages received for the given module name
Definition at line 174 of file InitMsgCollection.cc.
References InitMsgView::outputModuleLabel().
size_t InitMsgCollection::maxMsgCount | ( | ) | const |
Returns the maximum number of identical INIT messages received for any output module
Definition at line 196 of file InitMsgCollection.cc.
size_t InitMsgCollection::size | ( | void | ) | const |
Returns the number of unique INIT messages in the collection.
Definition at line 167 of file InitMsgCollection.cc.
|
static |
Creates a single text string from the elements in the specified list of strings. The specified maximum number of elements are included, however a zero value for the maximum number will include all elements.
list | the list of strings to include (std::vector of strings); |
maxCount | the maximum number of list elements to include. |
Definition at line 280 of file InitMsgCollection.cc.
|
private |
Definition at line 169 of file InitMsgCollection.h.
|
mutableprivate |
Definition at line 173 of file InitMsgCollection.h.
|
private |
Definition at line 172 of file InitMsgCollection.h.