Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:37

0001 /** \file
0002  * 
0003  *
0004  * \author Ilaria Segoni
0005  *
0006  * modified by Borislav Pavlov - University of Sofia
0007  * modification to be used for upgrade and for "pseudodigi"
0008  *
0009  *
0010  */
0011 
0012 #include "DataFormats/RPCDigi/interface/RPCDigi.h"
0013 #include <iostream>
0014 
0015 RPCDigi::RPCDigi(int strip, int bx)
0016     : strip_(strip),
0017       bx_(bx),
0018       time_(0),
0019       coordinateX_(0),
0020       coordinateY_(0),
0021       deltaTime_(0),
0022       deltaX_(0),
0023       deltaY_(0),
0024       hasTime_(false),
0025       hasX_(false),
0026       hasY_(false) {}
0027 
0028 RPCDigi::RPCDigi()
0029     : strip_(0),
0030       bx_(0),
0031       time_(0),
0032       coordinateX_(0),
0033       coordinateY_(0),
0034       deltaTime_(0),
0035       deltaX_(0),
0036       deltaY_(0),
0037       hasTime_(false),
0038       hasX_(false),
0039       hasY_(false) {}
0040 
0041 // Comparison
0042 bool RPCDigi::operator==(const RPCDigi& digi) const {
0043   if (strip_ != digi.strip() || bx_ != digi.bx())
0044     return false;
0045   return true;
0046 }
0047 
0048 ///Precedence operator
0049 bool RPCDigi::operator<(const RPCDigi& digi) const {
0050   if (digi.bx() == this->bx())
0051     return digi.strip() < this->strip();
0052   else
0053     return digi.bx() < this->bx();
0054 }
0055 
0056 std::ostream& operator<<(std::ostream& o, const RPCDigi& digi) { return o << " " << digi.strip() << " " << digi.bx(); }
0057 
0058 void RPCDigi::print() const { std::cout << "Strip " << strip() << " bx " << bx() << std::endl; }