test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 139 of file hltDiff.cc.

Member Enumeration Documentation

Enumerator
First 
Second 

Definition at line 141 of file hltDiff.cc.

141  {
142  First = 0,
143  Second = 1
144  };

Constructor & Destructor Documentation

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

Definition at line 168 of file hltDiff.cc.

References f, alignCSCRings::s, HLTConfigDataEx::size(), triggerIndices_, and HLTConfigDataEx::triggerName().

Referenced by HltDiff::compare().

168  :
169  first_(first),
170  second_(second),
171  firstView_(*this, Index::First),
172  secondView_(*this, Index::Second)
173  {
174  for (unsigned int f = 0; f < first.size(); ++f)
175  for (unsigned int s = 0; s < second.size(); ++s)
176  if (first.triggerName(f) == second.triggerName(s)) {
177  triggerIndices_.push_back(std::make_pair(f, s));
178  break;
179  }
180  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:249
View secondView_
Definition: hltDiff.cc:247
U second(std::pair< T, U > const &p)
HLTConfigDataEx const & second_
Definition: hltDiff.cc:244
double f[11][100]
HLTConfigDataEx const & first_
Definition: hltDiff.cc:243

Member Function Documentation

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

Definition at line 182 of file hltDiff.cc.

References First, firstView_, and secondView_.

182  {
183  if (index == Index::First)
184  return firstView_;
185  else
186  return secondView_;
187  }
View secondView_
Definition: hltDiff.cc:247
std::string const& HLTCommonConfig::moduleLabel ( Index  index,
unsigned int  trigger,
unsigned int  module 
) const
inline

Definition at line 221 of file hltDiff.cc.

References First, first_, python.rootplot.argparse::module, HLTConfigDataEx::moduleLabel(), second_, and triggerIndices_.

221  {
222  if (index == Index::First)
223  return first_.moduleLabel(triggerIndices_.at(trigger).first, module);
224  else
225  return second_.moduleLabel(triggerIndices_.at(trigger).second, module);
226  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:249
virtual std::string const & moduleLabel(unsigned int trigger, unsigned int module) const override
Definition: hltDiff.cc:114
HLTConfigDataEx const & second_
Definition: hltDiff.cc:244
HLTConfigDataEx const & first_
Definition: hltDiff.cc:243
std::string const& HLTCommonConfig::moduleType ( Index  index,
unsigned int  trigger,
unsigned int  module 
) const
inline

Definition at line 228 of file hltDiff.cc.

References First, first_, python.rootplot.argparse::module, HLTConfigDataEx::moduleType(), second_, and triggerIndices_.

228  {
229  if (index == Index::First)
230  return first_.moduleType(triggerIndices_.at(trigger).first, module);
231  else
232  return second_.moduleType(triggerIndices_.at(trigger).second, module);
233  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:249
HLTConfigDataEx const & second_
Definition: hltDiff.cc:244
HLTConfigDataEx const & first_
Definition: hltDiff.cc:243
virtual std::string const & moduleType(unsigned int trigger, unsigned int module) const override
Definition: hltDiff.cc:118
bool HLTCommonConfig::prescaler ( Index  index,
unsigned int  trigger,
unsigned int  module 
) const
inline

Definition at line 235 of file hltDiff.cc.

References First, first_, python.rootplot.argparse::module, HLTConfigDataEx::prescaler(), second_, and triggerIndices_.

235  {
236  if (index == Index::First)
237  return first_.prescaler(triggerIndices_.at(trigger).first, module);
238  else
239  return second_.prescaler(triggerIndices_.at(trigger).second, module);
240  }
virtual bool prescaler(unsigned int trigger, unsigned int module) const override
Definition: hltDiff.cc:122
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:249
HLTConfigDataEx const & second_
Definition: hltDiff.cc:244
HLTConfigDataEx const & first_
Definition: hltDiff.cc:243
std::string const& HLTCommonConfig::processName ( Index  index) const
inline

Definition at line 189 of file hltDiff.cc.

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

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

189  {
190  if (index == Index::First)
191  return first_.processName();
192  else
193  return second_.processName();
194  }
virtual std::string const & processName() const override
Definition: hltDiff.cc:90
HLTConfigDataEx const & second_
Definition: hltDiff.cc:244
HLTConfigDataEx const & first_
Definition: hltDiff.cc:243
unsigned int HLTCommonConfig::size ( Index  index) const
inline

Definition at line 196 of file hltDiff.cc.

References triggerIndices_.

196  {
197  return triggerIndices_.size();
198  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:249
unsigned int HLTCommonConfig::size ( Index  index,
unsigned int  trigger 
) const
inline

Definition at line 200 of file hltDiff.cc.

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

200  {
201  if (index == Index::First)
202  return first_.size(trigger);
203  else
204  return second_.size(trigger);
205  }
HLTConfigDataEx const & second_
Definition: hltDiff.cc:244
virtual unsigned int size() const override
Definition: hltDiff.cc:94
HLTConfigDataEx const & first_
Definition: hltDiff.cc:243
unsigned int HLTCommonConfig::triggerIndex ( Index  index,
unsigned int  trigger 
) const
inline

Definition at line 214 of file hltDiff.cc.

References First, and triggerIndices_.

214  {
215  if (index == Index::First)
216  return triggerIndices_.at(trigger).first;
217  else
218  return triggerIndices_.at(trigger).second;
219  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:249
std::string const& HLTCommonConfig::triggerName ( Index  index,
unsigned int  trigger 
) const
inline

Definition at line 207 of file hltDiff.cc.

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

207  {
208  if (index == Index::First)
209  return first_.triggerName(triggerIndices_.at(trigger).first);
210  else
211  return second_.triggerName(triggerIndices_.at(trigger).second);
212  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:249
virtual std::string const & triggerName(unsigned int trigger) const override
Definition: hltDiff.cc:106
HLTConfigDataEx const & second_
Definition: hltDiff.cc:244
HLTConfigDataEx const & first_
Definition: hltDiff.cc:243

Member Data Documentation

HLTConfigDataEx const& HLTCommonConfig::first_
private

Definition at line 243 of file hltDiff.cc.

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

View HLTCommonConfig::firstView_
private

Definition at line 246 of file hltDiff.cc.

Referenced by getView().

HLTConfigDataEx const& HLTCommonConfig::second_
private

Definition at line 244 of file hltDiff.cc.

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

View HLTCommonConfig::secondView_
private

Definition at line 247 of file hltDiff.cc.

Referenced by getView().

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