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 125 of file PATTriggerProducer.h.

Member Function Documentation

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

Definition at line 136 of file PATTriggerProducer.h.

References map_.

136 { map_.clear(); }
std::map< std::string, std::vector< PathAndFlags > > map_
void PATTriggerProducer::ModuleLabelToPathAndFlags::init ( const HLTConfigProvider hltConfig)

Definition at line 1033 of file PATTriggerProducer.cc.

References hitfit::clear(), DEFINE_FWK_MODULE, edm::eventsetup::heterocontainer::insert(), HLTConfigProvider::moduleEDMType(), HLTConfigProvider::moduleLabels(), HLTConfigProvider::moduleType(), HLTConfigProvider::saveTags(), AlCaHLTBitMon_QueryRunRegistry::string, and HLTConfigProvider::triggerNames().

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

1033  {
1034  clear();
1035  const std::vector<std::string> & pathNames = hltConfig.triggerNames();
1036  unsigned int sizePaths = pathNames.size();
1037  for ( unsigned int indexPath = 0; indexPath < sizePaths; ++indexPath ) {
1038  const std::string & namePath = pathNames[indexPath];
1039 
1040  const std::vector<std::string> & nameModules = hltConfig.moduleLabels(indexPath);
1041  unsigned int sizeModulesPath = nameModules.size();
1042  bool lastFilter = true;
1043  unsigned int iM = sizeModulesPath;
1044  while (iM > 0) {
1045  const std::string & nameFilter = nameModules[--iM];
1046  if (hltConfig.moduleEDMType(nameFilter) != "EDFilter") continue;
1047  if (hltConfig.moduleType(nameFilter) == "HLTBool") continue;
1048  bool saveTags = hltConfig.saveTags(nameFilter);
1049  insert( nameFilter, namePath, indexPath, lastFilter, saveTags );
1050  if (saveTags) lastFilter = false; // FIXME: rather always?
1051  }
1052  }
1053 }
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
const std::string moduleType(const std::string &module) const
C++ class name of module.
const std::vector< std::string > & triggerNames() const
names of trigger paths
void insert(const std::string &filter, const std::string &path, unsigned int pathIndex, bool lastFilter, bool l3Filter)
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
void pat::PATTriggerProducer::ModuleLabelToPathAndFlags::insert ( const std::string &  filter,
const std::string &  path,
unsigned int  pathIndex,
bool  lastFilter,
bool  l3Filter 
)
inlineprivate

Definition at line 142 of file PATTriggerProducer.h.

References ALCARECOTkAlBeamHalo_cff::filter, map_, and pat::PATTriggerProducer::ModuleLabelToPathAndFlags::PathAndFlags::PathAndFlags().

142  {
143  map_[filter].push_back(PathAndFlags(path, pathIndex, lastFilter, l3Filter));
144  }
std::map< std::string, std::vector< PathAndFlags > > map_
const std::vector<PathAndFlags>& pat::PATTriggerProducer::ModuleLabelToPathAndFlags::operator[] ( const std::string &  filter) const
inline

Definition at line 137 of file PATTriggerProducer.h.

References empty_, and map_.

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

Member Data Documentation

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

Definition at line 146 of file PATTriggerProducer.h.

Referenced by operator[]().

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

Definition at line 145 of file PATTriggerProducer.h.

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