CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
pat::PATTriggerProducer::ModuleLabelToPathAndFlags Class Reference

Classes

struct  PathAndFlags
 

Public Member Functions

void clear ()
 
void init (const HLTConfigProvider &)
 
const std::vector< PathAndFlags > & operator[] (const std::string &filter) const
 

Private Member Functions

void insert (const std::string &filter, const std::string &path, unsigned int pathIndex, bool lastFilter, bool l3Filter)
 

Private Attributes

const std::vector< PathAndFlagsempty_ = {}
 
std::map< std::string, std::vector< PathAndFlags > > map_
 

Detailed Description

Definition at line 121 of file PATTriggerProducer.h.

Member Function Documentation

◆ clear()

void pat::PATTriggerProducer::ModuleLabelToPathAndFlags::clear ( void  )
inline

Definition at line 133 of file PATTriggerProducer.h.

133 { map_.clear(); }

References map_.

Referenced by init().

◆ init()

void PATTriggerProducer::ModuleLabelToPathAndFlags::init ( const HLTConfigProvider hltConfig)

Definition at line 1193 of file PATTriggerProducer.cc.

1193  {
1194  clear();
1195  const std::vector<std::string>& pathNames = hltConfig.triggerNames();
1196  unsigned int sizePaths = pathNames.size();
1197  for (unsigned int indexPath = 0; indexPath < sizePaths; ++indexPath) {
1198  const std::string& namePath = pathNames[indexPath];
1199 
1200  const std::vector<std::string>& nameModules = hltConfig.moduleLabels(indexPath);
1201  unsigned int sizeModulesPath = nameModules.size();
1202  bool lastFilter = true;
1203  unsigned int iM = sizeModulesPath;
1204  while (iM > 0) {
1205  const std::string& nameFilter = nameModules[--iM];
1206  if (hltConfig.moduleEDMType(nameFilter) != "EDFilter")
1207  continue;
1208  if (hltConfig.moduleType(nameFilter) == "HLTBool")
1209  continue;
1210  bool saveTags = hltConfig.saveTags(nameFilter);
1211  insert(nameFilter, namePath, indexPath, lastFilter, saveTags);
1212  if (saveTags)
1213  lastFilter = false; // FIXME: rather always?
1214  }
1215  }
1216 }

References clear(), HltComparatorCreateWorkflow::hltConfig, insert(), BeamBkgSkim_cff::saveTags, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by pat::PATTriggerProducer::beginRun().

◆ insert()

void pat::PATTriggerProducer::ModuleLabelToPathAndFlags::insert ( const std::string &  filter,
const std::string &  path,
unsigned int  pathIndex,
bool  lastFilter,
bool  l3Filter 
)
inlineprivate

Definition at line 140 of file PATTriggerProducer.h.

141  {
142  map_[filter].push_back(PathAndFlags(path, pathIndex, lastFilter, l3Filter));
143  }

References ALCARECOTkAlBeamHalo_cff::filter, map_, and castor_dqm_sourceclient_file_cfg::path.

Referenced by init().

◆ operator[]()

const std::vector<PathAndFlags>& pat::PATTriggerProducer::ModuleLabelToPathAndFlags::operator[] ( const std::string &  filter) const
inline

Definition at line 134 of file PATTriggerProducer.h.

134  {
135  std::map<std::string, std::vector<PathAndFlags> >::const_iterator it = map_.find(filter);
136  return (it == map_.end() ? empty_ : it->second);
137  }

References empty_, ALCARECOTkAlBeamHalo_cff::filter, and map_.

Member Data Documentation

◆ empty_

const std::vector<PathAndFlags> pat::PATTriggerProducer::ModuleLabelToPathAndFlags::empty_ = {}
private

Definition at line 145 of file PATTriggerProducer.h.

Referenced by operator[]().

◆ map_

std::map<std::string, std::vector<PathAndFlags> > pat::PATTriggerProducer::ModuleLabelToPathAndFlags::map_
private

Definition at line 144 of file PATTriggerProducer.h.

Referenced by clear(), insert(), and operator[]().

pat::PATTriggerProducer::ModuleLabelToPathAndFlags::empty_
const std::vector< PathAndFlags > empty_
Definition: PATTriggerProducer.h:145
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::map_
std::map< std::string, std::vector< PathAndFlags > > map_
Definition: PATTriggerProducer.h:144
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::clear
void clear()
Definition: PATTriggerProducer.h:133
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::insert
void insert(const std::string &filter, const std::string &path, unsigned int pathIndex, bool lastFilter, bool l3Filter)
Definition: PATTriggerProducer.h:140
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
BeamBkgSkim_cff.saveTags
saveTags
Definition: BeamBkgSkim_cff.py:9
HltComparatorCreateWorkflow.hltConfig
hltConfig
Definition: HltComparatorCreateWorkflow.py:161
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37