1 #ifndef HLTReco_TriggerEvent_h 2 #define HLTReco_TriggerEvent_h 62 TriggerEvent(): usedProcessName_(), collectionTags_(), collectionKeys_(), triggerObjects_(), triggerFilters_() { }
64 usedProcessName_(usedProcessName),
70 collectionTags_.reserve(nc); collectionKeys_.reserve(nc);
71 triggerObjects_.reserve(no); triggerFilters_.reserve(nf);
78 assert(collectionTags.size()==collectionKeys.size());
81 collectionTags_.push_back(collectionTags[
i].
encode());
83 collectionKeys_.insert(collectionKeys_.end(), collectionKeys.begin(), collectionKeys.end());
87 assert(collectionTags.size()==collectionKeys.size());
88 collectionTags_.insert(collectionTags_.end(), collectionTags.begin(), collectionTags.end());
89 collectionKeys_.insert(collectionKeys_.end(), collectionKeys.begin(), collectionKeys.end());
108 return (idx == std::string::npos ? tag : tag.substr(0,idx));
118 if (encodedCollectionTag==collectionTags_[
i]) {
return i;}
127 if (encodedFilterTag==triggerFilters_[
i].
filterTag_) {
return i;}
const std::string & collectionTagEncoded(trigger::size_type index) const
const std::vector< std::string > & collectionTags() const
The single EDProduct to be saved for each event (AOD case)
trigger::size_type sizeFilters() const
trigger::size_type collectionKey(trigger::size_type index) const
const Keys & filterKeys(trigger::size_type index) const
TriggerFilterObject(const edm::InputTag &filterTag)
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
std::vector< std::string > collectionTags_
Input tags of packed up collections.
void addCollections(const std::vector< edm::InputTag > &collectionTags, const Keys &collectionKeys)
void addCollections(const std::vector< std::string > &collectionTags, const Keys &collectionKeys)
TriggerObjectCollection triggerObjects_
collection of all unique physics objects (linearised vector)
const Keys & collectionKeys() const
const Vids & filterIds(trigger::size_type index) const
const TriggerObjectCollection & getObjects() const
TriggerFilterObject()
constructors
const std::string & usedProcessName() const
getters
std::string filterLabel(trigger::size_type index) const
void addFilter(const edm::InputTag &filterTag, const Vids &filterIds, const Keys &filterKeys)
TriggerFilterObject(const edm::InputTag &filterTag, const Vids &filterIds, const Keys &filterKeys)
const edm::InputTag collectionTag(trigger::size_type index) const
std::string filterTag_
encoded InputTag of filter product
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Keys collectionKeys_
1-past-end indices into linearised vector
const edm::InputTag filterTag(trigger::size_type index) const
std::string usedProcessName_
data members
trigger::size_type collectionIndex(const edm::InputTag &collectionTag) const
find index of collection from collection tag
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
trigger::size_type sizeObjects() const
std::vector< size_type > Keys
Vids filterIds_
physics object type as per filter
trigger::size_type sizeCollections() const
other
Keys filterKeys_
indices pointing into collection of unique TriggerObjects
void addObjects(const TriggerObjectCollection &triggerObjects)
setters
Helper class: recording trigger objects firing a single filter.
const std::string & filterTagEncoded(trigger::size_type index) const
TriggerEvent(const std::string &usedProcessName, trigger::size_type nc, trigger::size_type no, trigger::size_type nf)