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

Member Enumeration Documentation

Enumerator
First 
Second 

Definition at line 142 of file hltDiff.cc.

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

Constructor & Destructor Documentation

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

Definition at line 169 of file hltDiff.cc.

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

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

Member Function Documentation

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

Definition at line 183 of file hltDiff.cc.

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

Definition at line 222 of file hltDiff.cc.

References python.rootplot.argparse::module.

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

Definition at line 229 of file hltDiff.cc.

References python.rootplot.argparse::module.

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

Definition at line 236 of file hltDiff.cc.

References python.rootplot.argparse::module.

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

Definition at line 190 of file hltDiff.cc.

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

Definition at line 197 of file hltDiff.cc.

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

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

Definition at line 201 of file hltDiff.cc.

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

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

Definition at line 215 of file hltDiff.cc.

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

Definition at line 208 of file hltDiff.cc.

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

Member Data Documentation

HLTConfigDataEx const& HLTCommonConfig::first_
private

Definition at line 244 of file hltDiff.cc.

View HLTCommonConfig::firstView_
private

Definition at line 247 of file hltDiff.cc.

HLTConfigDataEx const& HLTCommonConfig::second_
private

Definition at line 245 of file hltDiff.cc.

View HLTCommonConfig::secondView_
private

Definition at line 248 of file hltDiff.cc.

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

Definition at line 250 of file hltDiff.cc.