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

Member Enumeration Documentation

Enumerator
First 
Second 

Definition at line 174 of file hltDiff.cc.

174  {
175  First = 0,
176  Second = 1
177  };

Constructor & Destructor Documentation

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

Definition at line 201 of file hltDiff.cc.

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

Referenced by compare().

201  :
202  first_(first),
203  second_(second),
204  firstView_(*this, Index::First),
205  secondView_(*this, Index::Second)
206  {
207  for (unsigned int f = 0; f < first.size(); ++f)
208  for (unsigned int s = 0; s < second.size(); ++s)
209  if (first.triggerName(f) == second.triggerName(s)) {
210  triggerIndices_.push_back(std::make_pair(f, s));
211  break;
212  }
213  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:282
View secondView_
Definition: hltDiff.cc:280
U second(std::pair< T, U > const &p)
HLTConfigDataEx const & second_
Definition: hltDiff.cc:277
double f[11][100]
HLTConfigDataEx const & first_
Definition: hltDiff.cc:276

Member Function Documentation

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

Definition at line 215 of file hltDiff.cc.

References First, firstView_, and secondView_.

215  {
216  if (index == Index::First)
217  return firstView_;
218  else
219  return secondView_;
220  }
View secondView_
Definition: hltDiff.cc:280
std::string const& HLTCommonConfig::moduleLabel ( Index  index,
unsigned int  trigger,
unsigned int  module 
) const
inline

Definition at line 254 of file hltDiff.cc.

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

254  {
255  if (index == Index::First)
256  return first_.moduleLabel(triggerIndices_.at(trigger).first, module);
257  else
258  return second_.moduleLabel(triggerIndices_.at(trigger).second, module);
259  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:282
virtual std::string const & moduleLabel(unsigned int trigger, unsigned int module) const override
Definition: hltDiff.cc:147
HLTConfigDataEx const & second_
Definition: hltDiff.cc:277
HLTConfigDataEx const & first_
Definition: hltDiff.cc:276
std::string const& HLTCommonConfig::moduleType ( Index  index,
unsigned int  trigger,
unsigned int  module 
) const
inline

Definition at line 261 of file hltDiff.cc.

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

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

Definition at line 268 of file hltDiff.cc.

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

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

Definition at line 222 of file hltDiff.cc.

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

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

222  {
223  if (index == Index::First)
224  return first_.processName();
225  else
226  return second_.processName();
227  }
virtual std::string const & processName() const override
Definition: hltDiff.cc:123
HLTConfigDataEx const & second_
Definition: hltDiff.cc:277
HLTConfigDataEx const & first_
Definition: hltDiff.cc:276
unsigned int HLTCommonConfig::size ( Index  index) const
inline

Definition at line 229 of file hltDiff.cc.

References triggerIndices_.

229  {
230  return triggerIndices_.size();
231  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:282
unsigned int HLTCommonConfig::size ( Index  index,
unsigned int  trigger 
) const
inline

Definition at line 233 of file hltDiff.cc.

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

233  {
234  if (index == Index::First)
235  return first_.size(trigger);
236  else
237  return second_.size(trigger);
238  }
HLTConfigDataEx const & second_
Definition: hltDiff.cc:277
virtual unsigned int size() const override
Definition: hltDiff.cc:127
HLTConfigDataEx const & first_
Definition: hltDiff.cc:276
unsigned int HLTCommonConfig::triggerIndex ( Index  index,
unsigned int  trigger 
) const
inline

Definition at line 247 of file hltDiff.cc.

References First, and triggerIndices_.

247  {
248  if (index == Index::First)
249  return triggerIndices_.at(trigger).first;
250  else
251  return triggerIndices_.at(trigger).second;
252  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:282
std::string const& HLTCommonConfig::triggerName ( Index  index,
unsigned int  trigger 
) const
inline

Definition at line 240 of file hltDiff.cc.

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

240  {
241  if (index == Index::First)
242  return first_.triggerName(triggerIndices_.at(trigger).first);
243  else
244  return second_.triggerName(triggerIndices_.at(trigger).second);
245  }
std::vector< std::pair< unsigned int, unsigned int > > triggerIndices_
Definition: hltDiff.cc:282
virtual std::string const & triggerName(unsigned int trigger) const override
Definition: hltDiff.cc:139
HLTConfigDataEx const & second_
Definition: hltDiff.cc:277
HLTConfigDataEx const & first_
Definition: hltDiff.cc:276

Member Data Documentation

HLTConfigDataEx const& HLTCommonConfig::first_
private

Definition at line 276 of file hltDiff.cc.

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

View HLTCommonConfig::firstView_
private

Definition at line 279 of file hltDiff.cc.

Referenced by getView().

HLTConfigDataEx const& HLTCommonConfig::second_
private

Definition at line 277 of file hltDiff.cc.

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

View HLTCommonConfig::secondView_
private

Definition at line 280 of file hltDiff.cc.

Referenced by getView().

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