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 138 of file PATTriggerProducer.cc.

Member Function Documentation

◆ clear()

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

Definition at line 150 of file PATTriggerProducer.cc.

References map_.

Referenced by init().

150 { map_.clear(); }
std::map< std::string, std::vector< PathAndFlags > > map_

◆ init()

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

Definition at line 1326 of file PATTriggerProducer.cc.

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

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

1326  {
1327  clear();
1328  const std::vector<std::string>& pathNames = hltConfig.triggerNames();
1329  unsigned int sizePaths = pathNames.size();
1330  for (unsigned int indexPath = 0; indexPath < sizePaths; ++indexPath) {
1331  const std::string& namePath = pathNames[indexPath];
1332 
1333  const std::vector<std::string>& nameModules = hltConfig.moduleLabels(indexPath);
1334  unsigned int sizeModulesPath = nameModules.size();
1335  bool lastFilter = true;
1336  unsigned int iM = sizeModulesPath;
1337  while (iM > 0) {
1338  const std::string& nameFilter = nameModules[--iM];
1339  if (hltConfig.moduleEDMType(nameFilter) != "EDFilter")
1340  continue;
1341  if (hltConfig.moduleType(nameFilter) == "HLTBool")
1342  continue;
1343  bool saveTags = hltConfig.saveTags(nameFilter);
1344  insert(nameFilter, namePath, indexPath, lastFilter, saveTags);
1345  if (saveTags)
1346  lastFilter = false; // FIXME: rather always?
1347  }
1348  }
1349 }
void insert(const std::string &filter, const std::string &path, unsigned int pathIndex, bool lastFilter, bool l3Filter)

◆ 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 157 of file PATTriggerProducer.cc.

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

Referenced by init().

158  {
159  map_[filter].push_back(PathAndFlags(path, pathIndex, lastFilter, l3Filter));
160  }
std::map< std::string, std::vector< PathAndFlags > > map_

◆ operator[]()

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

Definition at line 151 of file PATTriggerProducer.cc.

References empty_, ALCARECOTkAlBeamHalo_cff::filter, and map_.

151  {
152  std::map<std::string, std::vector<PathAndFlags> >::const_iterator it = map_.find(filter);
153  return (it == map_.end() ? empty_ : it->second);
154  }
std::map< std::string, std::vector< PathAndFlags > > map_

Member Data Documentation

◆ empty_

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

Definition at line 162 of file PATTriggerProducer.cc.

Referenced by operator[]().

◆ map_

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

Definition at line 161 of file PATTriggerProducer.cc.

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