CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DataFormats/L1DTTrackFinder/src/L1MuDTChambThContainer.cc

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00003 //   Class L1MuDTChambThContainer
00004 //
00005 //   Description: input data for ETTF trigger
00006 //
00007 //
00008 //   Author List: Jorge Troconiz  UAM Madrid
00009 //
00010 //
00011 //--------------------------------------------------
00012 
00013 //-----------------------
00014 // This Class's Header --
00015 //-----------------------
00016 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
00017 
00018 //-------------------------------
00019 // Collaborating Class Headers --
00020 //-------------------------------
00021 
00022 
00023 //---------------
00024 // C++ Headers --
00025 //---------------
00026 using namespace std;
00027 
00028 //-------------------
00029 // Initializations --
00030 //-------------------
00031 
00032 
00033 //----------------
00034 // Constructors --
00035 //----------------
00036 L1MuDTChambThContainer::L1MuDTChambThContainer() {}
00037 
00038 //--------------
00039 // Destructor --
00040 //--------------
00041 L1MuDTChambThContainer::~L1MuDTChambThContainer() {}
00042 
00043 //--------------
00044 // Operations --
00045 //--------------
00046 void L1MuDTChambThContainer::setContainer(The_Container inputSegments) {
00047 
00048   theSegments = inputSegments;
00049 }
00050 
00051 L1MuDTChambThContainer::The_Container* L1MuDTChambThContainer::getContainer() const {
00052 
00053   The_Container* rT=0;
00054 
00055   rT = const_cast<The_Container*>(&theSegments);
00056 
00057   return(rT);
00058 }
00059 
00060 bool L1MuDTChambThContainer::bxEmpty(int step) const {
00061 
00062   bool empty = true;
00063 
00064   for ( The_iterator i  = theSegments.begin();
00065                      i != theSegments.end();
00066                      i++ ) {
00067     if  (step == i->bxNum()) empty = false;
00068   }
00069 
00070   return(empty);
00071 }
00072 
00073 int L1MuDTChambThContainer::bxSize(int step1, int step2) const {
00074 
00075   int size = 0;
00076 
00077   for ( The_iterator i  = theSegments.begin();
00078                      i != theSegments.end();
00079                      i++ ) {
00080     if  (step1 <= i->bxNum() && step2 >= i->bxNum()) size++;
00081   }
00082 
00083   return(size);
00084 }
00085 
00086 L1MuDTChambThDigi* L1MuDTChambThContainer::chThetaSegm(int wheel, int stat, int sect, int step) const {
00087 
00088   L1MuDTChambThDigi* rT=0;
00089 
00090   for ( The_iterator i  = theSegments.begin();
00091                      i != theSegments.end();
00092                      i++ ) {
00093     if  (step == i->bxNum() && wheel == i->whNum() && sect == i->scNum()
00094       && stat == i->stNum() )
00095       rT = const_cast<L1MuDTChambThDigi*>(&(*i));
00096   }
00097 
00098   return(rT);
00099 }
00100