CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/L1Trigger/DTTraco/src/DTTracoTrig.cc

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00003 //   Class: DTTracoTrig
00004 //
00005 //   Description: TRACO Trigger Data
00006 //
00007 //
00008 //   Author List:
00009 //   C. Grandi
00010 //   Modifications: 
00011 //   22/VI/04 SV: last trigger code update
00012 //
00013 //
00014 //--------------------------------------------------
00015 
00016 // #include "Utilities/Configuration/interface/Architecture.h"
00017 
00018 //-----------------------
00019 // This Class's Header --
00020 //-----------------------
00021 #include "L1Trigger/DTTraco/interface/DTTracoTrig.h"
00022 
00023 //-------------------------------
00024 // Collaborating Class Headers --
00025 //-------------------------------
00026 #include "L1Trigger/DTBti/interface/DTBtiTrigData.h"
00027 #include "L1Trigger/DTTraco/interface/DTTracoChip.h"
00028 
00029 //---------------
00030 // C++ Headers --
00031 //---------------
00032 
00033 using namespace std;
00034 
00035 //----------------
00036 // Constructors --
00037 //----------------
00038 DTTracoTrig::DTTracoTrig() {
00039 
00040   // reserve the appropriate amount of space for vectors
00041   _btitrig.reserve(2);
00042   clear();
00043 
00044 }
00045 
00046 DTTracoTrig::DTTracoTrig(DTTracoChip* tparent, int step) : 
00047                                                    _tparent(tparent)     {
00048 
00049   // reserve the appropriate amount of space for vectors
00050   _btitrig.reserve(2);
00051   clear();
00052 
00053   // data part of the trigger
00054   _data.setStep(step);
00055   _data.setParent(tparent->id());
00056 
00057 }
00058 
00059 DTTracoTrig::DTTracoTrig(DTTracoChip* parent , 
00060                                  DTTracoTrigData data) : 
00061                                  _tparent(parent), _data(data) {
00062 
00063   // reserve the appropriate amount of space for vectors
00064   _btitrig.reserve(2);
00065 
00066 }
00067 
00068 //--------------
00069 // Destructor --
00070 //--------------
00071 DTTracoTrig::~DTTracoTrig() {
00072 }
00073 
00074 
00075 bool
00076 DTTracoTrig::operator == (const DTTracoTrig& tt) const {
00077   if(qdec()==7 && tt.qdec()==7)
00078     return true;
00079 
00080   if ( !(  isFirst()     == tt.isFirst())     ||
00081        !(  pvK()         == tt.pvK())         ||
00082        (  (fmod(double(pvCode()),8.)==0) ^ (fmod(double(tt.pvCode()),8.)==0) )  ||
00083        !(  pvCorr()      == tt.pvCorr())      ||
00084        !(  psiR()        == tt.psiR())        ||
00085        !(  DeltaPsiR()   == tt.DeltaPsiR())   ||
00086        !(  qdec()        == tt.qdec())        ||
00087        !(  data().pvIO() == tt.data().pvIO())
00088                                                         ){
00089 
00090 
00091     cout<<"fs:"<<isFirst() <<","<< tt.isFirst() <<endl;
00092     cout<<"pvCode:"<<pvCode()<<","<<tt.pvCode()<<endl;
00093     cout<<"pvK:"<< pvK() <<","<<tt.pvK()<<endl;
00094     cout<<"pvCorr:"<<pvCorr()<<","<<tt.pvCorr()<<endl;
00095     cout<<"psiR:"<<psiR()<<","<<tt.psiR()<<endl;
00096     cout<<"DeltaPsiR:"<<DeltaPsiR()<<","<<tt.DeltaPsiR()<<endl;
00097     cout<<"qdec:"<<qdec()<<","<<tt.qdec()<<endl;
00098     cout<<"data().pvIO:"<<data().pvIO()<<","<<tt.data().pvIO()<<endl;
00099 
00100      return false;
00101   }
00102   return true;
00103 }