CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
edm::TriggerNames Class Reference

#include <TriggerNames.h>

Public Types

using IndexMap = std::vector< std::pair< std::string_view, unsigned int > >
 
using Strings = std::vector< std::string >
 

Public Member Functions

void initializeTriggerIndex ()
 
TriggerNamesoperator= (TriggerNames &&)=default
 
TriggerNamesoperator= (TriggerNames const &)
 
ParameterSetID const & parameterSetID () const
 
std::size_t size () const
 
unsigned int triggerIndex (std::string_view name) const
 
std::string const & triggerName (unsigned int index) const
 
Strings const & triggerNames () const
 
 TriggerNames ()=default
 
 TriggerNames (edm::ParameterSet const &pset)
 
 TriggerNames (TriggerNames &&)=default
 
 TriggerNames (TriggerNames const &)
 

Private Attributes

IndexMap indexMap_
 
ParameterSetID psetID_
 
Strings triggerNames_
 

Detailed Description

Definition at line 55 of file TriggerNames.h.

Member Typedef Documentation

◆ IndexMap

using edm::TriggerNames::IndexMap = std::vector<std::pair<std::string_view, unsigned int> >

Definition at line 57 of file TriggerNames.h.

◆ Strings

using edm::TriggerNames::Strings = std::vector<std::string>

Definition at line 58 of file TriggerNames.h.

Constructor & Destructor Documentation

◆ TriggerNames() [1/4]

edm::TriggerNames::TriggerNames ( )
default

◆ TriggerNames() [2/4]

edm::TriggerNames::TriggerNames ( edm::ParameterSet const &  pset)
explicit

Definition at line 22 of file TriggerNames.cc.

23  : psetID_{pset.id()}, triggerNames_{pset.getParameter<Strings>("@trigger_paths")} {
25  }

References muonDTDigis_cfi::pset.

◆ TriggerNames() [3/4]

edm::TriggerNames::TriggerNames ( TriggerNames const &  iOther)

Definition at line 27 of file TriggerNames.cc.

28  : psetID_{iOther.psetID_}, triggerNames_{iOther.triggerNames_} {
30  }

References psetID_.

◆ TriggerNames() [4/4]

edm::TriggerNames::TriggerNames ( TriggerNames &&  )
default

Member Function Documentation

◆ initializeTriggerIndex()

void edm::TriggerNames::initializeTriggerIndex ( )

Definition at line 38 of file TriggerNames.cc.

38  {
39  unsigned int index = 0;
40  indexMap_.reserve(triggerNames_.size());
41  for (auto const& name : triggerNames_) {
42  indexMap_.emplace_back(name, index);
43  ++index;
44  }
45  std::sort(indexMap_.begin(), indexMap_.end(), PairSort());
46  }

References indexMap_, Skims_PA_cff::name, jetUpdater_cfi::sort, and triggerNames_.

◆ operator=() [1/2]

TriggerNames& edm::TriggerNames::operator= ( TriggerNames &&  )
default

◆ operator=() [2/2]

TriggerNames & edm::TriggerNames::operator= ( TriggerNames const &  iOther)

Definition at line 32 of file TriggerNames.cc.

32  {
33  TriggerNames temp(iOther);
34  *this = std::move(temp);
35  return *this;
36  }

References eostools::move(), and groupFilesInBlocks::temp.

◆ parameterSetID()

ParameterSetID const & edm::TriggerNames::parameterSetID ( ) const

Definition at line 61 of file TriggerNames.cc.

61 { return psetID_; }

References psetID_.

Referenced by triggerExpression::Data::setEvent(), and edm::TriggerResultsByName::TriggerResultsByName().

◆ size()

std::size_t edm::TriggerNames::size ( void  ) const

◆ triggerIndex()

unsigned int edm::TriggerNames::triggerIndex ( std::string_view  name) const

◆ triggerName()

std::string const & edm::TriggerNames::triggerName ( unsigned int  index) const

◆ triggerNames()

TriggerNames::Strings const & edm::TriggerNames::triggerNames ( ) const

Member Data Documentation

◆ indexMap_

IndexMap edm::TriggerNames::indexMap_
private

Definition at line 94 of file TriggerNames.h.

Referenced by initializeTriggerIndex(), and triggerIndex().

◆ psetID_

ParameterSetID edm::TriggerNames::psetID_
private

Definition at line 91 of file TriggerNames.h.

Referenced by parameterSetID(), and TriggerNames().

◆ triggerNames_

Strings edm::TriggerNames::triggerNames_
private

Definition at line 93 of file TriggerNames.h.

Referenced by initializeTriggerIndex(), size(), triggerName(), and triggerNames().

edm::TriggerNames::TriggerNames
TriggerNames()=default
edm::TriggerNames::triggerNames_
Strings triggerNames_
Definition: TriggerNames.h:93
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
Strings
std::vector< std::string > Strings
Definition: MsgTools.h:18
edm::TriggerNames::indexMap_
IndexMap indexMap_
Definition: TriggerNames.h:94
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
edm::TriggerNames::psetID_
ParameterSetID psetID_
Definition: TriggerNames.h:91
eostools.move
def move(src, dest)
Definition: eostools.py:511
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
edm::TriggerNames::initializeTriggerIndex
void initializeTriggerIndex()
Definition: TriggerNames.cc:38