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

Member Enumeration Documentation

Enumerator
First 
Second 

Definition at line 143 of file hltDiff.cc.

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

Constructor & Destructor Documentation

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

Definition at line 170 of file hltDiff.cc.

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

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

Member Function Documentation

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

Definition at line 184 of file hltDiff.cc.

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

Definition at line 223 of file hltDiff.cc.

References python.rootplot.argparse::module.

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

Definition at line 230 of file hltDiff.cc.

References python.rootplot.argparse::module.

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

Definition at line 237 of file hltDiff.cc.

References python.rootplot.argparse::module.

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

Definition at line 191 of file hltDiff.cc.

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

Definition at line 198 of file hltDiff.cc.

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

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

Definition at line 202 of file hltDiff.cc.

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

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

Definition at line 216 of file hltDiff.cc.

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

Definition at line 209 of file hltDiff.cc.

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

Member Data Documentation

HLTConfigDataEx const& HLTCommonConfig::first_
private

Definition at line 245 of file hltDiff.cc.

View HLTCommonConfig::firstView_
private

Definition at line 248 of file hltDiff.cc.

HLTConfigDataEx const& HLTCommonConfig::second_
private

Definition at line 246 of file hltDiff.cc.

View HLTCommonConfig::secondView_
private

Definition at line 249 of file hltDiff.cc.

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

Definition at line 251 of file hltDiff.cc.