CMS 3D CMS Logo

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.

Referenced by CSCTriggerContainer< csc::L1Track >::CSCTriggerContainer().

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 CSCTriggerContainer< T >::_objs, and class-composition::parent.

56 {
57  _objs = parent;
58 }
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 84 of file CSCTriggerContainer.h.

References CSCTriggerContainer< T >::_objs, rpcdqm::BX, makeMuonMisalignmentScenario::endcap, mps_fire::i, and mps_fire::result.

Referenced by Options.Options::__getitem__(), betterConfigParser.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::getResultingSection(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

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 }
std::vector< T > _objs
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 CSCTriggerContainer< T >::_objs, rpcdqm::BX, makeMuonMisalignmentScenario::endcap, mps_fire::i, and mps_fire::result.

Referenced by Options.Options::__getitem__(), betterConfigParser.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::getResultingSection(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

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 }
std::vector< T > _objs
template<class T >
std::vector< T > CSCTriggerContainer< T >::get ( const unsigned &  endcap,
const unsigned &  sector,
const int &  BX 
) const
template<class T >
std::vector< T > CSCTriggerContainer< T >::get ( const unsigned &  endcap,
const unsigned &  sector 
) const
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 61 of file CSCTriggerContainer.h.

References CSCTriggerContainer< T >::_objs.

Referenced by CSCTriggerContainer< csc::L1Track >::CSCTriggerContainer().

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.

References CSCTriggerContainer< T >::_objs.

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