CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
CSCTriggerContainer< T > Class Template Reference

#include <CSCTriggerContainer.h>

Public Member Functions

void clear ()
 
 CSCTriggerContainer ()
 
 CSCTriggerContainer (const CSCTriggerContainer &cpy)
 
 CSCTriggerContainer (const std::vector< T > &)
 
std::vector< Tget () const
 
std::vector< Tget (const unsigned &endcap, const unsigned &station, const unsigned &tsector, const unsigned &tsubsector, const unsigned &cscid, const int &BX) const
 
std::vector< Tget (const unsigned &endcap, const unsigned &station, const unsigned &tsector, const unsigned &tsubsector, const int &BX) const
 
std::vector< Tget (const unsigned &endcap, const unsigned &sector, const int &BX) const
 
std::vector< Tget (const unsigned &endcap, const unsigned &sector) const
 For objects which span multiple stations. More...
 
std::vector< Tget (const int &BX) const
 
CSCTriggerContaineroperator= (const CSCTriggerContainer &)
 
CSCTriggerContaineroperator= (const std::vector< T > &)
 
void push_back (const T &data)
 
void push_many (const std::vector< T > &data)
 
void push_many (const CSCTriggerContainer< T > &data)
 

Private Attributes

std::vector< T_objs
 

Detailed Description

template<class T>
class CSCTriggerContainer< T >

Author
L. Gray

A container class to make things more manageable for a Trigger Processor. DigiCollections make per-BX processing complicated, this class makes it easier.

Any class T must have the following functions: // inherit from base class! T(const T&) operator= station() sector() subsector() BX()

Definition at line 23 of file CSCTriggerContainer.h.

Constructor & Destructor Documentation

template<class T>
CSCTriggerContainer< T >::CSCTriggerContainer ( )
inline

Definition at line 25 of file CSCTriggerContainer.h.

25 {}
template<class T>
CSCTriggerContainer< T >::CSCTriggerContainer ( const CSCTriggerContainer< T > &  cpy)
inline

Definition at line 26 of file CSCTriggerContainer.h.

26 { _objs = cpy._objs; }
std::vector< T > _objs
template<class T>
CSCTriggerContainer< T >::CSCTriggerContainer ( const std::vector< T > &  parent)

Definition at line 64 of file CSCTriggerContainer.h.

References SpecificationBuilder_cfi::parent().

64  {
65  _objs = parent;
66 }
std::vector< T > _objs

Member Function Documentation

template<class T>
void CSCTriggerContainer< T >::clear ( void  )
inline
template<class T >
std::vector< T > CSCTriggerContainer< T >::get ( ) const
template<class T >
std::vector< T > CSCTriggerContainer< T >::get ( const unsigned &  endcap,
const unsigned &  station,
const unsigned &  tsector,
const unsigned &  tsubsector,
const unsigned &  cscid,
const int &  BX 
) const

Definition at line 88 of file CSCTriggerContainer.h.

References L1TStage2uGTEmulatorClient_cff::BX, Reference_intrackfit_cff::endcap, mps_fire::i, and mps_fire::result.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

93  {
94  std::vector<T> result;
95 
96  for (unsigned i = 0; i < _objs.size(); i++)
97  if (_objs[i].endcap() == endcap && _objs[i].station() == station && _objs[i].sector() == tsector &&
98  (station != 1 || _objs[i].subsector() == tsubsector) && _objs[i].cscid() == cscid && _objs[i].BX() == BX)
99  result.push_back(_objs[i]);
100 
101  return result;
102 }
std::vector< T > _objs
tuple result
Definition: mps_fire.py:311
template<class T >
std::vector< T > CSCTriggerContainer< T >::get ( const unsigned &  endcap,
const unsigned &  station,
const unsigned &  tsector,
const unsigned &  tsubsector,
const int &  BX 
) const

For a specific chamber in a station.

Parameters
tsubsectorFor a specific station in a sector.

Definition at line 105 of file CSCTriggerContainer.h.

References L1TStage2uGTEmulatorClient_cff::BX, Reference_intrackfit_cff::endcap, mps_fire::i, and mps_fire::result.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

109  {
110  std::vector<T> result;
111 
112  for (unsigned i = 0; i < _objs.size(); ++i)
113  if (_objs[i].endcap() == endcap && _objs[i].station() == station && _objs[i].sector() == tsector &&
114  (station != 1 || _objs[i].subsector() == tsubsector) && _objs[i].BX() == BX)
115  result.push_back(_objs[i]);
116 
117  return result;
118 }
std::vector< T > _objs
tuple result
Definition: mps_fire.py:311
template<class T >
std::vector< T > CSCTriggerContainer< T >::get ( const unsigned &  endcap,
const unsigned &  sector,
const int &  BX 
) const

Definition at line 121 of file CSCTriggerContainer.h.

References L1TStage2uGTEmulatorClient_cff::BX, Reference_intrackfit_cff::endcap, mps_fire::i, and mps_fire::result.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

121  {
122  std::vector<T> result;
123 
124  for (unsigned i = 0; i < _objs.size(); ++i)
125  if (_objs[i].endcap() == endcap && _objs[i].sector() == sector && _objs[i].BX() == BX)
126  result.push_back(_objs[i]);
127 
128  return result;
129 }
std::vector< T > _objs
tuple result
Definition: mps_fire.py:311
template<class T >
std::vector< T > CSCTriggerContainer< T >::get ( const unsigned &  endcap,
const unsigned &  sector 
) const

For objects which span multiple stations.

Definition at line 132 of file CSCTriggerContainer.h.

References Reference_intrackfit_cff::endcap, mps_fire::i, and mps_fire::result.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

132  {
133  std::vector<T> result;
134 
135  for (unsigned i = 0; i < _objs.size(); ++i)
136  if (_objs[i].endcap() == endcap && _objs[i].sector() == sector)
137  result.push_back(_objs[i]);
138 
139  return result;
140 }
std::vector< T > _objs
tuple result
Definition: mps_fire.py:311
template<class T >
std::vector< T > CSCTriggerContainer< T >::get ( const int &  BX) const
template<class T >
CSCTriggerContainer< T > & CSCTriggerContainer< T >::operator= ( const CSCTriggerContainer< T > &  rhs)

Definition at line 69 of file CSCTriggerContainer.h.

References CSCTriggerContainer< T >::_objs.

69  {
70  if (this != &rhs) {
71  _objs = rhs._objs;
72  }
73  return *this;
74 }
std::vector< T > _objs
template<class T>
CSCTriggerContainer< T > & CSCTriggerContainer< T >::operator= ( const std::vector< T > &  rhs)

Definition at line 77 of file CSCTriggerContainer.h.

77  {
78  _objs = rhs;
79  return *this;
80 }
std::vector< T > _objs
template<class T>
void CSCTriggerContainer< T >::push_back ( const T data)
inline
template<class T>
void CSCTriggerContainer< T >::push_many ( const std::vector< T > &  data)
inline

Definition at line 52 of file CSCTriggerContainer.h.

Referenced by L1TdeCSCTF::analyze(), CSCTFTrackBuilder::buildTracks(), CSCTFTrackProducer::produce(), and CSCTFSectorProcessor::run().

52 { _objs.insert(_objs.end(), data.begin(), data.end()); }
std::vector< T > _objs
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
template<class T>
void CSCTriggerContainer< T >::push_many ( const CSCTriggerContainer< T > &  data)
inline

Definition at line 53 of file CSCTriggerContainer.h.

53  {
54  std::vector<T> vec = data.get();
55  _objs.insert(_objs.end(), vec.begin(), vec.end());
56  }
std::vector< T > get() const
std::vector< T > _objs

Member Data Documentation

template<class T>
std::vector<T> CSCTriggerContainer< T >::_objs
private