![]() |
![]() |
#include <ProductHolderIndexHelper.h>
Classes | |
class | IndexAndNames |
class | Item |
class | Matches |
class | Range |
Public Member Functions | |
unsigned int | beginElements () const |
ProductHolderIndex | index (KindOfType kindOfType, TypeID const &typeID, char const *moduleLabel, char const *instance, char const *process=0) const |
std::vector< IndexAndNames > const & | indexAndNames () const |
unsigned int | indexToIndexAndNames (KindOfType kindOfType, TypeID const &typeID, char const *moduleLabel, char const *instance, char const *process) const |
unsigned int | indexToType (KindOfType kindOfType, TypeID const &typeID) const |
ProductHolderIndex | insert (TypeID const &typeID, char const *moduleLabel, char const *instance, char const *process, TypeID const &containedTypeID) |
ProductHolderIndex | insert (TypeID const &typeID, char const *moduleLabel, char const *instance, char const *process) |
std::vector< std::string > const & | lookupProcessNames () const |
ProductHolderIndex | nextIndexValue () const |
void | print (std::ostream &os) const |
unsigned int | processIndex (char const *process) const |
std::vector< char > const & | processNames () const |
ProductHolderIndexHelper () | |
std::vector< Range > const & | ranges () const |
Matches | relatedIndexes (KindOfType kindOfType, TypeID const &typeID, char const *moduleLabel, char const *instance) const |
Matches | relatedIndexes (KindOfType kindOfType, TypeID const &typeID) const |
void | sanityCheck () const |
void | setFrozen () |
std::vector< TypeID > const & | sortedTypeIDs () const |
Private Attributes | |
unsigned int | beginElements_ |
std::vector< char > | bigNamesContainer_ |
std::vector< IndexAndNames > | indexAndNames_ |
edm::propagate_const < std::unique_ptr< std::set < Item > > > | items_ |
std::vector< std::string > | lookupProcessNames_ |
ProductHolderIndex | nextIndexValue_ |
edm::propagate_const < std::unique_ptr< std::set < std::string > > > | processItems_ |
std::vector< char > | processNames_ |
std::vector< Range > | ranges_ |
std::vector< TypeID > | sortedTypeIDs_ |
This class assigns and gets the ProductHolderIndex associated with a type, module label, instance, and process. The ProductHolderIndex is used to tell the Principal where to store a ProductHolder and how to find it quickly.
One can also look up the same ProductHolderIndex's using the type or base type of an element in a container in the product (if the product is a container). In this case the KindOfType argument to the Principal::getByLabel function is ELEMENT_TYPE, whereas normally it is PRODUCT_TYPE.
There are also special ProductHolderIndex's generated where the process name is empty. These indexes refer to a special ProductHolders that search for a matching product from the most recent process that has a matching type, label and instance. There is ProductHolderIndex generated for each type/label/instance combination which has at least one entry in the tables in this class. Both PRODUCT_TYPEs and ELEMENT_TYPEs get these special ProductHolders.
The ProductHolderIndex for a particular product will not change during a process after the ProductRegistry has been frozen. Nor will any of the other member data of this class. Multiple threads can access it concurrently without problems. The ProductHolderIndexes can be safely cached in InputTags and possibly other places, because they never change within a process. The ProductHolderIndex for a particular product is not intended to be persistent and will be different in different processes.
The ProductHolderIndex is used to order the placement of the ProductHolders in the Principal that are either present in the input or produced in the current process. Be aware that there are other ProductHolders for products that come after ProductHolders placed by this class. For example, the placement of dropped products is not handled by this class, instead by the ProductRegistry. The reason for this distinction is that those other ProductHolders can change and be added as a process runs. The content of this class never changes after the ProductRegistry is frozen.
Definition at line 85 of file ProductHolderIndexHelper.h.
edm::ProductHolderIndexHelper::ProductHolderIndexHelper | ( | ) |
Definition at line 60 of file ProductHolderIndexHelper.cc.
|
inline |
Definition at line 219 of file ProductHolderIndexHelper.h.
ProductHolderIndex edm::ProductHolderIndexHelper::index | ( | KindOfType | kindOfType, |
TypeID const & | typeID, | ||
char const * | moduleLabel, | ||
char const * | instance, | ||
char const * | process = 0 |
||
) | const |
Definition at line 68 of file ProductHolderIndexHelper.cc.
|
inline |
Definition at line 222 of file ProductHolderIndexHelper.h.
unsigned int edm::ProductHolderIndexHelper::indexToIndexAndNames | ( | KindOfType | kindOfType, |
TypeID const & | typeID, | ||
char const * | moduleLabel, | ||
char const * | instance, | ||
char const * | process | ||
) | const |
Definition at line 420 of file ProductHolderIndexHelper.cc.
unsigned int edm::ProductHolderIndexHelper::indexToType | ( | KindOfType | kindOfType, |
TypeID const & | typeID | ||
) | const |
Definition at line 504 of file ProductHolderIndexHelper.cc.
ProductHolderIndex edm::ProductHolderIndexHelper::insert | ( | TypeID const & | typeID, |
char const * | moduleLabel, | ||
char const * | instance, | ||
char const * | process, | ||
TypeID const & | containedTypeID | ||
) |
Definition at line 183 of file ProductHolderIndexHelper.cc.
|
inline |
Definition at line 182 of file ProductHolderIndexHelper.h.
std::vector< std::string > const & edm::ProductHolderIndexHelper::lookupProcessNames | ( | ) | const |
Definition at line 411 of file ProductHolderIndexHelper.cc.
|
inline |
Definition at line 247 of file ProductHolderIndexHelper.h.
void edm::ProductHolderIndexHelper::print | ( | std::ostream & | os | ) | const |
Definition at line 631 of file ProductHolderIndexHelper.cc.
unsigned int edm::ProductHolderIndexHelper::processIndex | ( | char const * | process | ) | const |
Definition at line 528 of file ProductHolderIndexHelper.cc.
|
inline |
Definition at line 223 of file ProductHolderIndexHelper.h.
|
inline |
Definition at line 221 of file ProductHolderIndexHelper.h.
ProductHolderIndexHelper::Matches edm::ProductHolderIndexHelper::relatedIndexes | ( | KindOfType | kindOfType, |
TypeID const & | typeID, | ||
char const * | moduleLabel, | ||
char const * | instance | ||
) | const |
Definition at line 137 of file ProductHolderIndexHelper.cc.
ProductHolderIndexHelper::Matches edm::ProductHolderIndexHelper::relatedIndexes | ( | KindOfType | kindOfType, |
TypeID const & | typeID | ||
) | const |
Definition at line 163 of file ProductHolderIndexHelper.cc.
void edm::ProductHolderIndexHelper::sanityCheck | ( | ) | const |
Definition at line 552 of file ProductHolderIndexHelper.cc.
void edm::ProductHolderIndexHelper::setFrozen | ( | ) |
Definition at line 270 of file ProductHolderIndexHelper.cc.
|
inline |
Definition at line 220 of file ProductHolderIndexHelper.h.
|
private |
Definition at line 261 of file ProductHolderIndexHelper.h.
|
private |
Definition at line 299 of file ProductHolderIndexHelper.h.
|
private |
Definition at line 287 of file ProductHolderIndexHelper.h.
|
private |
Definition at line 338 of file ProductHolderIndexHelper.h.
|
private |
Definition at line 304 of file ProductHolderIndexHelper.h.
|
private |
Definition at line 256 of file ProductHolderIndexHelper.h.
|
private |
Definition at line 340 of file ProductHolderIndexHelper.h.
|
private |
Definition at line 300 of file ProductHolderIndexHelper.h.
|
private |
Definition at line 275 of file ProductHolderIndexHelper.h.
|
private |
Definition at line 268 of file ProductHolderIndexHelper.h.