#include <InitMsgCollection.h>
Public Member Functions | |
bool | addIfUnique (InitMsgView const &initMsgView) |
bool | addIfUnique (I2OChain const &, InitMsgSharedPtr &) |
void | clear () |
InitMsgSharedPtr | getElementAt (const unsigned int index) const |
InitMsgSharedPtr | getElementForOutputModuleId (const uint32_t &) const |
InitMsgSharedPtr | getElementForOutputModuleLabel (const std::string &) const |
std::string | getOutputModuleName (const uint32_t outputModuleId) const |
std::string | getSelectionHelpString () const |
InitMsgCollection () | |
size_t | size () const |
~InitMsgCollection () | |
Static Public Member Functions | |
static std::string | stringsToText (Strings const &list, unsigned int maxCount=0) |
Private Types | |
typedef std::map< uint32_t, InitMsgSharedPtr > | InitMsgMap |
Private Member Functions | |
void | checkOutputModuleLabel (InitMsgView const &) const |
Private Attributes | |
InitMsgMap | initMsgMap_ |
boost::mutex | listLock_ |
Definition at line 35 of file InitMsgCollection.h.
|
private |
Definition at line 174 of file InitMsgCollection.h.
InitMsgCollection::InitMsgCollection | ( | ) |
InitMsgCollection constructor.
Definition at line 21 of file InitMsgCollection.cc.
References hitfit::clear().
InitMsgCollection::~InitMsgCollection | ( | ) |
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 32 of file InitMsgCollection.cc.
References filterCSVwithJSON::copy, InitMsgView::outputModuleId(), pos, InitMsgView::size(), and InitMsgView::startAddress().
bool InitMsgCollection::addIfUnique | ( | I2OChain const & | i2oChain, |
InitMsgSharedPtr & | serializedProds | ||
) |
Adds the INIT message contained in the specified I2OChain 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 INIT message is new, the InitMsgView will contain the view of INIT message and the method returns true.
If the output module label inside the INIT message is empty, an exception is thrown.
i2oChain | the I2OChain containing an INIT message |
initMsgView | the INIT view which was added to the collection. |
cms::Exception | if one of the consistency checks fails. |
Definition at line 57 of file InitMsgCollection.cc.
References stor::I2OChain::copyFragmentsIntoBuffer(), stor::I2OChain::outputModuleId(), pos, and stor::I2OChain::totalDataSize().
|
private |
Definition at line 81 of file InitMsgCollection.cc.
References edm::hlt::Exception, InitMsgView::outputModuleLabel(), and AlCaHLTBitMon_QueryRunRegistry::string.
void InitMsgCollection::clear | ( | void | ) |
Removes all entries from the collection.
Definition at line 169 of file InitMsgCollection.cc.
Referenced by Vispa.Views.WidgetView.WidgetView::closeEvent(), Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), Vispa.Views.WidgetView.WidgetView::setDataObjects(), Vispa.Views.TreeView.TreeView::updateContent(), Vispa.Views.TableView.TableView::updateContent(), Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), and 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 153 of file InitMsgCollection.cc.
References alignCSCRings::e.
InitMsgSharedPtr InitMsgCollection::getElementForOutputModuleId | ( | const uint32_t & | requestedOutputModuleId | ) | const |
Fetches the single INIT message that matches the requested HLT output module id. If no messages match the request, an empty pointer is returned.
requestedOutputModuleId | The HLT output module id of the INIT message to be returned. |
Definition at line 94 of file InitMsgCollection.cc.
InitMsgSharedPtr InitMsgCollection::getElementForOutputModuleLabel | ( | const std::string & | requestedOutputModuleLabel | ) | 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?)
requestedOutputModuleLabel | 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 108 of file InitMsgCollection.cc.
References edm::hlt::Exception, lumiQueryAPI::msg, InitMsgView::outputModuleLabel(), and AlCaHLTBitMon_QueryRunRegistry::string.
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 233 of file InitMsgCollection.cc.
References InitMsgView::outputModuleLabel().
std::string InitMsgCollection::getSelectionHelpString | ( | ) | const |
Returns a string with information on which selections are available.
Definition at line 183 of file InitMsgCollection.cc.
References InitMsgView::hltTriggerNames(), InitMsgView::hltTriggerSelections(), customizeTrackingMonitorSeedNumber::idx, InitMsgView::outputModuleLabel(), and AlCaHLTBitMon_QueryRunRegistry::string.
size_t InitMsgCollection::size | ( | void | ) | const |
Returns the number of unique INIT messages in the collection.
Definition at line 176 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 251 of file InitMsgCollection.cc.
References customizeTrackingMonitorSeedNumber::idx, and AlCaHLTBitMon_QueryRunRegistry::string.
|
private |
Definition at line 175 of file InitMsgCollection.h.
|
mutableprivate |
Definition at line 176 of file InitMsgCollection.h.