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 confdb::parent.

56 {
57  _objs = parent;
58 }
parent
Definition: confdb.py:1052
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
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 rpcdqm::BX, Reference_intrackfit_cff::endcap, i, and query::result.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), rrapi.RRApi::columns(), rrapi.RRApi::count(), rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), 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 }
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
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.

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