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 const &)
 
TriggerNamesoperator= (TriggerNames &&)=default
 
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
 
 TriggerNames ()=default
 
 TriggerNames (edm::ParameterSet const &pset)
 
 TriggerNames (TriggerNames const &)
 
 TriggerNames (TriggerNames &&)=default
 
Strings const & 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.

References muonDTDigis_cfi::pset.

23  : psetID_{pset.id()}, triggerNames_{pset.getParameter<Strings>("@trigger_paths")} {
25  }
std::vector< std::string > Strings
Definition: TriggerNames.h:58
void initializeTriggerIndex()
Definition: TriggerNames.cc:38
Strings triggerNames_
Definition: TriggerNames.h:93
ParameterSetID psetID_
Definition: TriggerNames.h:91

◆ TriggerNames() [3/4]

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

Definition at line 27 of file TriggerNames.cc.

References psetID_.

28  : psetID_{iOther.psetID_}, triggerNames_{iOther.triggerNames_} {
30  }
void initializeTriggerIndex()
Definition: TriggerNames.cc:38
Strings triggerNames_
Definition: TriggerNames.h:93
ParameterSetID psetID_
Definition: TriggerNames.h:91

◆ TriggerNames() [4/4]

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

Member Function Documentation

◆ initializeTriggerIndex()

void edm::TriggerNames::initializeTriggerIndex ( )

Definition at line 38 of file TriggerNames.cc.

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

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  }
IndexMap indexMap_
Definition: TriggerNames.h:94
Strings triggerNames_
Definition: TriggerNames.h:93

◆ operator=() [1/2]

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

Definition at line 32 of file TriggerNames.cc.

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

32  {
33  TriggerNames temp(iOther);
34  *this = std::move(temp);
35  return *this;
36  }
TriggerNames()=default
def move(src, dest)
Definition: eostools.py:511

◆ operator=() [2/2]

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

◆ parameterSetID()

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

Definition at line 61 of file TriggerNames.cc.

References psetID_.

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

61 { return psetID_; }
ParameterSetID psetID_
Definition: TriggerNames.h:91

◆ 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().