CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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
 in a station. More...
 
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 27 of file CSCTriggerContainer.h.

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

Definition at line 28 of file CSCTriggerContainer.h.

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

Definition at line 55 of file CSCTriggerContainer.h.

References dbtoconf::parent.

56 {
57  _objs = parent;
58 }
list parent
Definition: dbtoconf.py:74
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 ( void  ) 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 84 of file CSCTriggerContainer.h.

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

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

87 {
88  std::vector<T> result;
89 
90  for(unsigned i = 0; i < _objs.size(); i++)
91  if(_objs[i].endcap() == endcap && _objs[i].station() == station &&
92  _objs[i].sector() == tsector && (station != 1 || _objs[i].subsector() == tsubsector) &&
93  _objs[i].cscid() == cscid && _objs[i].BX() == BX)
94  result.push_back(_objs[i]);
95 
96  return result;
97 }
int i
Definition: DBlmapReader.cc:9
std::vector< T > _objs
tuple result
Definition: query.py:137
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

in a station.

For a specific chamber

Parameters
tsubsectorFor a specific station in a sector.

Definition at line 100 of file CSCTriggerContainer.h.

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

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

103 {
104  std::vector<T> result;
105 
106  for(unsigned i = 0; i < _objs.size(); ++i)
107  if(_objs[i].endcap() == endcap && _objs[i].station() == station &&
108  _objs[i].sector() == tsector && (station != 1 || _objs[i].subsector() == tsubsector)
109  && _objs[i].BX() == BX)
110  result.push_back(_objs[i]);
111 
112  return result;
113 }
int i
Definition: DBlmapReader.cc:9
std::vector< T > _objs
tuple result
Definition: query.py:137
template<class T >
std::vector< T > CSCTriggerContainer< T >::get ( const unsigned &  endcap,
const unsigned &  sector,
const int &  BX 
) const

Definition at line 116 of file CSCTriggerContainer.h.

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

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

118 {
119  std::vector<T> result;
120 
121  for(unsigned i = 0; i < _objs.size(); ++i)
122  if(_objs[i].endcap() == endcap && _objs[i].sector() == sector && _objs[i].BX() == BX)
123  result.push_back(_objs[i]);
124 
125  return result;
126 }
int i
Definition: DBlmapReader.cc:9
std::vector< T > _objs
tuple result
Definition: query.py:137
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 129 of file CSCTriggerContainer.h.

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

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

130 {
131  std::vector<T> result;
132 
133  for(unsigned i = 0; i < _objs.size(); ++i)
134  if(_objs[i].endcap() == endcap && _objs[i].sector() == sector)
135  result.push_back(_objs[i]);
136 
137  return result;
138 }
int i
Definition: DBlmapReader.cc:9
std::vector< T > _objs
tuple result
Definition: query.py:137
template<class T >
std::vector< T > CSCTriggerContainer< T >::get ( const int &  BX) const

Definition at line 141 of file CSCTriggerContainer.h.

References i, and query::result.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

142 {
143  std::vector<T> result;
144 
145  for(unsigned i = 0; i < _objs.size(); ++i)
146  if(_objs[i].BX() == BX) result.push_back(_objs[i]);
147 
148  return result;
149 }
int i
Definition: DBlmapReader.cc:9
std::vector< T > _objs
tuple result
Definition: query.py:137
template<class T >
CSCTriggerContainer< T > & CSCTriggerContainer< T >::operator= ( const CSCTriggerContainer< T > &  rhs)

Definition at line 61 of file CSCTriggerContainer.h.

References CSCTriggerContainer< T >::_objs.

62 {
63  if(this != &rhs)
64  {
65  _objs = rhs._objs;
66  }
67  return *this;
68 }
std::vector< T > _objs
template<class T>
CSCTriggerContainer< T > & CSCTriggerContainer< T >::operator= ( const std::vector< T > &  rhs)

Definition at line 71 of file CSCTriggerContainer.h.

72 {
73  _objs = rhs;
74  return *this;
75 }
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 45 of file CSCTriggerContainer.h.

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

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

Definition at line 46 of file CSCTriggerContainer.h.

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

Member Data Documentation

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