CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes
HLTCommonConfig Class Reference

Classes

class  View
 

Public Types

enum  Index { Index::First = 0, Index::Second = 1 }
 

Public Member Functions

View const & getView (Index index) const
 
 HLTCommonConfig (HLTConfigDataEx const &first, HLTConfigDataEx const &second)
 
std::string const & moduleLabel (Index index, unsigned int trigger, unsigned int module) const
 
std::string const & moduleType (Index index, unsigned int trigger, unsigned int module) const
 
bool prescaler (Index index, unsigned int trigger, unsigned int module) const
 
std::string const & processName (Index index) const
 
unsigned int size (Index index) const
 
unsigned int size (Index index, unsigned int trigger) const
 
unsigned int triggerIndex (Index index, unsigned int trigger) const
 
std::string const & triggerName (Index index, unsigned int trigger) const
 

Private Attributes

HLTConfigDataEx const & first_
 
View firstView_
 
HLTConfigDataEx const & second_
 
View secondView_
 
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
 

Detailed Description

Definition at line 115 of file hltDiff.cc.

Member Enumeration Documentation

◆ Index

Enumerator
First 
Second 

Definition at line 117 of file hltDiff.cc.

117 { First = 0, Second = 1 };

Constructor & Destructor Documentation

◆ HLTCommonConfig()

HLTCommonConfig::HLTCommonConfig ( HLTConfigDataEx const &  first,
HLTConfigDataEx const &  second 
)
inline

Definition at line 137 of file hltDiff.cc.

References f, first, alignCSCRings::s, edm::second(), and triggerIndices_.

139  for (unsigned int f = 0; f < first.size(); ++f)
140  for (unsigned int s = 0; s < second.size(); ++s)
141  if (first.triggerName(f) == second.triggerName(s)) {
142  triggerIndices_.push_back(std::make_pair(f, s));
143  break;
144  }
145  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:212
View secondView_
Definition: hltDiff.cc:210
U second(std::pair< T, U > const &p)
HLTConfigDataEx const & second_
Definition: hltDiff.cc:207
double f[11][100]
HLTConfigDataEx const & first_
Definition: hltDiff.cc:206

Member Function Documentation

◆ getView()

View const& HLTCommonConfig::getView ( Index  index) const
inline

Definition at line 147 of file hltDiff.cc.

References First, firstView_, and secondView_.

147  {
148  if (index == Index::First)
149  return firstView_;
150  else
151  return secondView_;
152  }
View secondView_
Definition: hltDiff.cc:210

◆ moduleLabel()

std::string const& HLTCommonConfig::moduleLabel ( Index  index,
unsigned int  trigger,
unsigned int  module 
) const
inline

Definition at line 184 of file hltDiff.cc.

References First, first_, callgraph::module, HLTConfigDataEx::moduleLabel(), second_, and triggerIndices_.

184  {
185  if (index == Index::First)
186  return first_.moduleLabel(triggerIndices_.at(trigger).first, module);
187  else
188  return second_.moduleLabel(triggerIndices_.at(trigger).second, module);
189  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:212
HLTConfigDataEx const & second_
Definition: hltDiff.cc:207
std::string const & moduleLabel(unsigned int trigger, unsigned int module) const override
Definition: hltDiff.cc:94
HLTConfigDataEx const & first_
Definition: hltDiff.cc:206

◆ moduleType()

std::string const& HLTCommonConfig::moduleType ( Index  index,
unsigned int  trigger,
unsigned int  module 
) const
inline

Definition at line 191 of file hltDiff.cc.

References First, first_, callgraph::module, HLTConfigDataEx::moduleType(), second_, and triggerIndices_.

191  {
192  if (index == Index::First)
193  return first_.moduleType(triggerIndices_.at(trigger).first, module);
194  else
195  return second_.moduleType(triggerIndices_.at(trigger).second, module);
196  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:212
HLTConfigDataEx const & second_
Definition: hltDiff.cc:207
HLTConfigDataEx const & first_
Definition: hltDiff.cc:206
std::string const & moduleType(unsigned int trigger, unsigned int module) const override
Definition: hltDiff.cc:98

◆ prescaler()

bool HLTCommonConfig::prescaler ( Index  index,
unsigned int  trigger,
unsigned int  module 
) const
inline

Definition at line 198 of file hltDiff.cc.

References First, first_, callgraph::module, HLTConfigDataEx::prescaler(), second_, and triggerIndices_.

198  {
199  if (index == Index::First)
200  return first_.prescaler(triggerIndices_.at(trigger).first, module);
201  else
202  return second_.prescaler(triggerIndices_.at(trigger).second, module);
203  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:212
bool prescaler(unsigned int trigger, unsigned int module) const override
Definition: hltDiff.cc:102
HLTConfigDataEx const & second_
Definition: hltDiff.cc:207
HLTConfigDataEx const & first_
Definition: hltDiff.cc:206

◆ processName()

std::string const& HLTCommonConfig::processName ( Index  index) const
inline

Definition at line 154 of file hltDiff.cc.

References First, first_, HLTConfigDataEx::processName(), and second_.

Referenced by HLTCommonConfig::View::processName().

154  {
155  if (index == Index::First)
156  return first_.processName();
157  else
158  return second_.processName();
159  }
std::string const & processName() const override
Definition: hltDiff.cc:82
HLTConfigDataEx const & second_
Definition: hltDiff.cc:207
HLTConfigDataEx const & first_
Definition: hltDiff.cc:206

◆ size() [1/2]

unsigned int HLTCommonConfig::size ( Index  index) const
inline

Definition at line 161 of file hltDiff.cc.

References triggerIndices_.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

161 { return triggerIndices_.size(); }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:212

◆ size() [2/2]

unsigned int HLTCommonConfig::size ( Index  index,
unsigned int  trigger 
) const
inline

Definition at line 163 of file hltDiff.cc.

References First, first_, second_, and HLTConfigDataEx::size().

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

163  {
164  if (index == Index::First)
165  return first_.size(trigger);
166  else
167  return second_.size(trigger);
168  }
HLTConfigDataEx const & second_
Definition: hltDiff.cc:207
unsigned int size() const override
Definition: hltDiff.cc:84
HLTConfigDataEx const & first_
Definition: hltDiff.cc:206

◆ triggerIndex()

unsigned int HLTCommonConfig::triggerIndex ( Index  index,
unsigned int  trigger 
) const
inline

Definition at line 177 of file hltDiff.cc.

References First, and triggerIndices_.

177  {
178  if (index == Index::First)
179  return triggerIndices_.at(trigger).first;
180  else
181  return triggerIndices_.at(trigger).second;
182  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:212

◆ triggerName()

std::string const& HLTCommonConfig::triggerName ( Index  index,
unsigned int  trigger 
) const
inline

Definition at line 170 of file hltDiff.cc.

References First, first_, second_, triggerIndices_, and HLTConfigDataEx::triggerName().

170  {
171  if (index == Index::First)
172  return first_.triggerName(triggerIndices_.at(trigger).first);
173  else
174  return second_.triggerName(triggerIndices_.at(trigger).second);
175  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:212
HLTConfigDataEx const & second_
Definition: hltDiff.cc:207
HLTConfigDataEx const & first_
Definition: hltDiff.cc:206
std::string const & triggerName(unsigned int trigger) const override
Definition: hltDiff.cc:90

Member Data Documentation

◆ first_

HLTConfigDataEx const& HLTCommonConfig::first_
private

Definition at line 206 of file hltDiff.cc.

Referenced by moduleLabel(), moduleType(), prescaler(), processName(), size(), and triggerName().

◆ firstView_

View HLTCommonConfig::firstView_
private

Definition at line 209 of file hltDiff.cc.

Referenced by getView().

◆ second_

HLTConfigDataEx const& HLTCommonConfig::second_
private

Definition at line 207 of file hltDiff.cc.

Referenced by moduleLabel(), moduleType(), prescaler(), processName(), size(), and triggerName().

◆ secondView_

View HLTCommonConfig::secondView_
private

Definition at line 210 of file hltDiff.cc.

Referenced by getView().

◆ triggerIndices_

std::vector<std::pair<unsigned int, unsigned int> > HLTCommonConfig::triggerIndices_
private