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 167 of file hltDiff.cc.

Member Enumeration Documentation

Enumerator
First 
Second 

Definition at line 169 of file hltDiff.cc.

169  {
170  First = 0,
171  Second = 1
172  };

Constructor & Destructor Documentation

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

Definition at line 196 of file hltDiff.cc.

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

Referenced by compare().

196  :
197  first_(first),
198  second_(second),
199  firstView_(*this, Index::First),
200  secondView_(*this, Index::Second)
201  {
202  for (unsigned int f = 0; f < first.size(); ++f)
203  for (unsigned int s = 0; s < second.size(); ++s)
204  if (first.triggerName(f) == second.triggerName(s)) {
205  triggerIndices_.push_back(std::make_pair(f, s));
206  break;
207  }
208  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:277
View secondView_
Definition: hltDiff.cc:275
U second(std::pair< T, U > const &p)
HLTConfigDataEx const & second_
Definition: hltDiff.cc:272
double f[11][100]
HLTConfigDataEx const & first_
Definition: hltDiff.cc:271

Member Function Documentation

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

Definition at line 210 of file hltDiff.cc.

References First, firstView_, and secondView_.

210  {
211  if (index == Index::First)
212  return firstView_;
213  else
214  return secondView_;
215  }
View secondView_
Definition: hltDiff.cc:275
std::string const& HLTCommonConfig::moduleLabel ( Index  index,
unsigned int  trigger,
unsigned int  module 
) const
inline

Definition at line 249 of file hltDiff.cc.

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

249  {
250  if (index == Index::First)
251  return first_.moduleLabel(triggerIndices_.at(trigger).first, module);
252  else
253  return second_.moduleLabel(triggerIndices_.at(trigger).second, module);
254  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:277
virtual std::string const & moduleLabel(unsigned int trigger, unsigned int module) const override
Definition: hltDiff.cc:142
HLTConfigDataEx const & second_
Definition: hltDiff.cc:272
HLTConfigDataEx const & first_
Definition: hltDiff.cc:271
std::string const& HLTCommonConfig::moduleType ( Index  index,
unsigned int  trigger,
unsigned int  module 
) const
inline

Definition at line 256 of file hltDiff.cc.

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

256  {
257  if (index == Index::First)
258  return first_.moduleType(triggerIndices_.at(trigger).first, module);
259  else
260  return second_.moduleType(triggerIndices_.at(trigger).second, module);
261  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:277
HLTConfigDataEx const & second_
Definition: hltDiff.cc:272
HLTConfigDataEx const & first_
Definition: hltDiff.cc:271
virtual std::string const & moduleType(unsigned int trigger, unsigned int module) const override
Definition: hltDiff.cc:146
bool HLTCommonConfig::prescaler ( Index  index,
unsigned int  trigger,
unsigned int  module 
) const
inline

Definition at line 263 of file hltDiff.cc.

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

263  {
264  if (index == Index::First)
265  return first_.prescaler(triggerIndices_.at(trigger).first, module);
266  else
267  return second_.prescaler(triggerIndices_.at(trigger).second, module);
268  }
virtual bool prescaler(unsigned int trigger, unsigned int module) const override
Definition: hltDiff.cc:150
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:277
HLTConfigDataEx const & second_
Definition: hltDiff.cc:272
HLTConfigDataEx const & first_
Definition: hltDiff.cc:271
std::string const& HLTCommonConfig::processName ( Index  index) const
inline

Definition at line 217 of file hltDiff.cc.

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

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

217  {
218  if (index == Index::First)
219  return first_.processName();
220  else
221  return second_.processName();
222  }
virtual std::string const & processName() const override
Definition: hltDiff.cc:118
HLTConfigDataEx const & second_
Definition: hltDiff.cc:272
HLTConfigDataEx const & first_
Definition: hltDiff.cc:271
unsigned int HLTCommonConfig::size ( Index  index) const
inline

Definition at line 224 of file hltDiff.cc.

References triggerIndices_.

224  {
225  return triggerIndices_.size();
226  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:277
unsigned int HLTCommonConfig::size ( Index  index,
unsigned int  trigger 
) const
inline

Definition at line 228 of file hltDiff.cc.

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

228  {
229  if (index == Index::First)
230  return first_.size(trigger);
231  else
232  return second_.size(trigger);
233  }
HLTConfigDataEx const & second_
Definition: hltDiff.cc:272
virtual unsigned int size() const override
Definition: hltDiff.cc:122
HLTConfigDataEx const & first_
Definition: hltDiff.cc:271
unsigned int HLTCommonConfig::triggerIndex ( Index  index,
unsigned int  trigger 
) const
inline

Definition at line 242 of file hltDiff.cc.

References First, and triggerIndices_.

242  {
243  if (index == Index::First)
244  return triggerIndices_.at(trigger).first;
245  else
246  return triggerIndices_.at(trigger).second;
247  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:277
std::string const& HLTCommonConfig::triggerName ( Index  index,
unsigned int  trigger 
) const
inline

Definition at line 235 of file hltDiff.cc.

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

235  {
236  if (index == Index::First)
237  return first_.triggerName(triggerIndices_.at(trigger).first);
238  else
239  return second_.triggerName(triggerIndices_.at(trigger).second);
240  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:277
virtual std::string const & triggerName(unsigned int trigger) const override
Definition: hltDiff.cc:134
HLTConfigDataEx const & second_
Definition: hltDiff.cc:272
HLTConfigDataEx const & first_
Definition: hltDiff.cc:271

Member Data Documentation

HLTConfigDataEx const& HLTCommonConfig::first_
private

Definition at line 271 of file hltDiff.cc.

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

View HLTCommonConfig::firstView_
private

Definition at line 274 of file hltDiff.cc.

Referenced by getView().

HLTConfigDataEx const& HLTCommonConfig::second_
private

Definition at line 272 of file hltDiff.cc.

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

View HLTCommonConfig::secondView_
private

Definition at line 275 of file hltDiff.cc.

Referenced by getView().

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