CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 &conf)
 
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 105 of file PATTriggerProducer.h.

Member Function Documentation

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

Definition at line 116 of file PATTriggerProducer.h.

References map_.

Referenced by init().

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

Definition at line 956 of file PATTriggerProducer.cc.

References clear(), insert(), HLTConfigProvider::moduleEDMType(), HLTConfigProvider::moduleLabels(), HLTConfigProvider::moduleType(), CommPDSkim_cfg::saveTags, HLTConfigProvider::saveTags(), and HLTConfigProvider::triggerNames().

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

956  {
957  clear();
958  const std::vector<std::string> & pathNames = hltConfig_.triggerNames();
959  unsigned int sizePaths = pathNames.size();
960  for ( unsigned int indexPath = 0; indexPath < sizePaths; ++indexPath ) {
961  const std::string & namePath = pathNames[indexPath];
962 
963  const std::vector<std::string> & nameModules = hltConfig_.moduleLabels(indexPath);
964  unsigned int sizeModulesPath = nameModules.size();
965  bool lastFilter = true;
966  unsigned int iM = sizeModulesPath;
967  while (iM > 0) {
968  const std::string & nameFilter = nameModules[--iM];
969  if (hltConfig_.moduleEDMType(nameFilter) != "EDFilter") continue;
970  if (hltConfig_.moduleType(nameFilter) == "HLTBool") continue;
971  bool saveTags = hltConfig_.saveTags(nameFilter);
972  insert( nameFilter, namePath, indexPath, lastFilter, saveTags );
973  if (saveTags) lastFilter = false; // FIXME: rather always?
974  }
975  }
976 }
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.
HLTConfigProvider hltConfig_
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 122 of file PATTriggerProducer.h.

References alcazmumu_cfi::filter, and map_.

Referenced by init().

122  {
123  map_[filter].push_back(PathAndFlags(path, pathIndex, lastFilter, l3Filter));
124  }
list path
Definition: scaleCards.py:51
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 117 of file PATTriggerProducer.h.

References empty_, and map_.

117  {
118  std::map<std::string,std::vector<PathAndFlags> >::const_iterator it = map_.find(filter);
119  return (it == map_.end() ? empty_ : it->second);
120  }
std::map< std::string, std::vector< PathAndFlags > > map_

Member Data Documentation

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

Definition at line 126 of file PATTriggerProducer.h.

Referenced by operator[]().

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

Definition at line 125 of file PATTriggerProducer.h.

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