test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
L1TCaloParamsCompare.cc File Reference
#include <vector>
#include "CondFormats/L1TObjects/interface/CaloParams.h"

Go to the source code of this file.

Classes

class  CaloParams_PUBLIC
 
class  LUT_PUBLIC
 

Functions

bool operator== (const std::vector< int > &a1, const std::vector< int > &a2)
 
bool operator== (const l1t::CaloParams::TowerParams &a1, const l1t::CaloParams::TowerParams &a2)
 
bool operator== (const l1t::LUT &b1, const l1t::LUT &b2)
 
bool operator== (const l1t::CaloParams::Node &a1, const l1t::CaloParams::Node &a2)
 
bool operator== (const std::vector< l1t::CaloParams::Node > &a1, const std::vector< l1t::CaloParams::Node > &a2)
 
bool operator== (const l1t::CaloParams &b1, const l1t::CaloParams &b2)
 

Function Documentation

bool operator== ( const std::vector< int > &  a1,
const std::vector< int > &  a2 
)

Definition at line 58 of file L1TCaloParamsCompare.cc.

References i.

58  {
59 if( a1.size() != a2.size() ) return false;
60 for(unsigned i=0; i<a1.size(); i++)
61  if( a1[i] != a2[i] ) return false;
62 return true;
63 }
int i
Definition: DBlmapReader.cc:9
bool operator== ( const l1t::CaloParams::TowerParams a1,
const l1t::CaloParams::TowerParams a2 
)

Definition at line 65 of file L1TCaloParamsCompare.cc.

References l1t::CaloParams::TowerParams::doEncoding_, l1t::CaloParams::TowerParams::lsbE_, l1t::CaloParams::TowerParams::lsbH_, l1t::CaloParams::TowerParams::lsbSum_, l1t::CaloParams::TowerParams::maskE_, l1t::CaloParams::TowerParams::maskH_, l1t::CaloParams::TowerParams::maskRatio_, l1t::CaloParams::TowerParams::maskSum_, l1t::CaloParams::TowerParams::nBitsE_, l1t::CaloParams::TowerParams::nBitsH_, l1t::CaloParams::TowerParams::nBitsRatio_, and l1t::CaloParams::TowerParams::nBitsSum_.

65  {
66  return (
67  a1.lsbH_ == a1.lsbH_ &&
68  a1.lsbE_ == a1.lsbE_ &&
69  a1.lsbSum_ == a1.lsbSum_ &&
70  a1.nBitsH_ == a1.nBitsH_ &&
71  a1.nBitsE_ == a1.nBitsE_ &&
72  a1.nBitsSum_ == a1.nBitsSum_ &&
73  a1.nBitsRatio_ == a1.nBitsRatio_ &&
74  a1.maskH_ == a1.maskH_ &&
75  a1.maskE_ == a1.maskE_ &&
76  a1.maskSum_ == a1.maskSum_ &&
77  a1.maskRatio_ == a1.maskRatio_ &&
78  a1.doEncoding_ == a1.doEncoding_ );
79 }
bool operator== ( const l1t::LUT b1,
const l1t::LUT b2 
)

Definition at line 81 of file L1TCaloParamsCompare.cc.

References a, LUT_PUBLIC::addressMask_, gather_cfg::cout, ztail::d, LUT_PUBLIC::data_, LUT_PUBLIC::dataMask_, visualization-live-secondInstance_cfg::m, LUT_PUBLIC::nrBitsAddress_, LUT_PUBLIC::nrBitsData_, and findQualityFiles::v.

81  {
82  const LUT_PUBLIC &a1 = reinterpret_cast<const LUT_PUBLIC&>(b1);
83  const LUT_PUBLIC &a2 = reinterpret_cast<const LUT_PUBLIC&>(b2);
84 
85  bool a = ( a1.nrBitsAddress_ == a2.nrBitsAddress_ );
86  bool d = ( a1.nrBitsData_ == a2.nrBitsData_ );
87  bool m = ( a1.addressMask_ == a2.addressMask_ ) ;
88  bool mm = ( a1.dataMask_ == a2.dataMask_ ) ;
89  bool v = (a1.data_ == a2.data_);
90  std::cout<<"a="<<a<<" d="<<d<<" m="<<m<<" mm="<<mm<<" v="<<v<<std::endl;
91  return a && d && m && mm && v;
92 }
unsigned int dataMask_
std::vector< int > data_
unsigned int nrBitsData_
unsigned int nrBitsAddress_
tuple d
Definition: ztail.py:151
unsigned int addressMask_
double a
Definition: hdecay.h:121
tuple cout
Definition: gather_cfg.py:145
bool operator== ( const l1t::CaloParams::Node a1,
const l1t::CaloParams::Node a2 
)

Definition at line 94 of file L1TCaloParamsCompare.cc.

References gather_cfg::cout, ztail::d, l1t::CaloParams::Node::dparams_, i, l1t::CaloParams::Node::iparams_, cmsLHEtoEOSManager::l, l1t::CaloParams::Node::LUT_, alignCSCRings::s, l1t::CaloParams::Node::sparams_, lumiQTWidget::t, l1t::CaloParams::Node::type_, l1t::CaloParams::Node::uparams_, findQualityFiles::v, and l1t::CaloParams::Node::version_.

94  {
95  bool t = ( a1.type_ == a2.type_ );
96  bool v = ( a1.version_ == a2.version_ );
97  bool l = ( a1.LUT_ == a2.LUT_ );
98  bool d = ( a1.dparams_ == a2.dparams_) ;
99  bool u = ( a1.uparams_ == a2.uparams_) ;
100  bool i = ( a1.iparams_ == a2.iparams_) ;
101  bool s = ( a1.sparams_ == a2.sparams_) ;
102  std::cout<<"t="<<t<<" v="<<v<<" l="<<l<<" d="<<d<<" u="<<u<<" i="<<i<<" s="<<s<<std::endl;
103  return t && v && l && d && u && i && s;
104 }
int i
Definition: DBlmapReader.cc:9
std::string type_
Definition: CaloParams.h:34
tuple d
Definition: ztail.py:151
std::vector< double > dparams_
Definition: CaloParams.h:37
std::vector< std::string > sparams_
Definition: CaloParams.h:40
std::vector< unsigned > uparams_
Definition: CaloParams.h:38
std::vector< int > iparams_
Definition: CaloParams.h:39
tuple cout
Definition: gather_cfg.py:145
bool operator== ( const std::vector< l1t::CaloParams::Node > &  a1,
const std::vector< l1t::CaloParams::Node > &  a2 
)

Definition at line 106 of file L1TCaloParamsCompare.cc.

References i.

106  {
107 if( a1.size() != a2.size() ) return false;
108 for(unsigned i=0; i<a1.size(); i++){
109 
110  if( !(a1[i] == a2[i]) ) return false;
111 }
112 return true;
113 }
int i
Definition: DBlmapReader.cc:9
bool operator== ( const l1t::CaloParams b1,
const l1t::CaloParams b2 
)

Definition at line 115 of file L1TCaloParamsCompare.cc.

References gather_cfg::cout, CaloParams_PUBLIC::egp_, CaloParams_PUBLIC::etSumEtaMax_, CaloParams_PUBLIC::etSumEtaMin_, CaloParams_PUBLIC::etSumEtThreshold_, CaloParams_PUBLIC::etSumLsb_, l1t::CaloParams::EgParams::hcalThreshold_, l1t::CaloParams::EgParams::isoAreaNrTowersEta_, l1t::CaloParams::EgParams::isoAreaNrTowersPhi_, l1t::CaloParams::EgParams::isoVetoNrTowersPhi_, CaloParams_PUBLIC::jetp_, l1t::CaloParams::EgParams::lsb_, l1t::CaloParams::JetParams::lsb_, l1t::CaloParams::EgParams::maxHcalEt_, l1t::CaloParams::EgParams::maxPtHOverE_, l1t::CaloParams::EgParams::maxPtJetIsolation_, l1t::CaloParams::EgParams::minPtJetIsolation_, l1t::CaloParams::EgParams::neighbourThreshold_, l1t::CaloParams::JetParams::neighbourThreshold_, CaloParams_PUBLIC::pnode_, CaloParams_PUBLIC::regionLsb_, l1t::CaloParams::EgParams::seedThreshold_, l1t::CaloParams::JetParams::seedThreshold_, CaloParams_PUBLIC::taup_, CaloParams_PUBLIC::towerp_, findQualityFiles::v, and CaloParams_PUBLIC::version_.

115  {
116 
117  CaloParams_PUBLIC a1(b1);
118  CaloParams_PUBLIC a2(b2);
119 
120  bool v = (a1.version_ == a2.version_);
121  std::cout<<" version_: " << v << std::endl;
122 
123  bool pn = (a1.pnode_[1] == a2.pnode_[1]);
124  std::cout<<" pnode_: " << pn << std::endl;
125 
126  bool tp = (a1.towerp_ == a2.towerp_);
127  std::cout<<" towerp_: " << tp << std::endl;
128  bool rlsb = (a1.regionLsb_ == a2.regionLsb_);
129  std::cout<<" regionLsb_: "<< rlsb << std::endl;
130 
131  bool egp = ((a1.egp_.lsb_ == a2.egp_.lsb_) &&
132  (a1.egp_.seedThreshold_ == a2.egp_.seedThreshold_) &&
133  (a1.egp_.neighbourThreshold_== a2.egp_.neighbourThreshold_) &&
134  (a1.egp_.hcalThreshold_ == a2.egp_.hcalThreshold_) &&
135  (a1.egp_.maxHcalEt_== a2.egp_.maxHcalEt_) &&
136  (a1.egp_.maxPtHOverE_== a2.egp_.maxPtHOverE_) &&
137  (a1.egp_.minPtJetIsolation_== a2.egp_.minPtJetIsolation_) &&
138  (a1.egp_.maxPtJetIsolation_== a2.egp_.maxPtJetIsolation_) &&
139  (a1.egp_.isoAreaNrTowersEta_== a2.egp_.isoAreaNrTowersEta_) &&
140  (a1.egp_.isoAreaNrTowersPhi_== a2.egp_.isoAreaNrTowersPhi_) &&
141  (a1.egp_.isoVetoNrTowersPhi_== a2.egp_.isoVetoNrTowersPhi_) );
142  std::cout<<" egp_: "<< egp << std::endl;
143 
144  bool taup = ((a1.taup_.lsb_ == a2.taup_.lsb_) &&
145  (a1.taup_.seedThreshold_ == a2.taup_.seedThreshold_) &&
146  (a1.taup_.neighbourThreshold_ == a2.taup_.neighbourThreshold_) &&
147  (a1.taup_.maxPtTauVeto_ == a2.taup_.maxPtTauVeto_) &&
148  (a1.taup_.minPtJetIsolationB_ == a2.taup_.minPtJetIsolationB_) &&
149  (a1.taup_.maxJetIsolationB_ == a2.taup_.maxJetIsolationB_) &&
150  (a1.taup_.maxJetIsolationA_ == a2.taup_.maxJetIsolationA_) &&
151  (a1.taup_.isoEtaMin_ == a2.taup_.isoEtaMin_) &&
152  (a1.taup_.isoEtaMax_ == a2.taup_.isoEtaMax_) &&
153  (a1.taup_.isoAreaNrTowersEta_== a2.taup_.isoAreaNrTowersEta_) &&
154  (a1.taup_.isoAreaNrTowersPhi_== a2.taup_.isoAreaNrTowersPhi_) &&
155  (a1.taup_.isoVetoNrTowersPhi_== a2.taup_.isoVetoNrTowersPhi_));
156  std::cout<<" taup_: "<< taup << std::endl;
157 
158  bool jetp = ((a1.jetp_.lsb_ == a2.jetp_.lsb_) &&
159  (a1.jetp_.seedThreshold_ == a2.jetp_.seedThreshold_) &&
160  (a1.jetp_.neighbourThreshold_ == a2.jetp_.neighbourThreshold_));
161  std::cout<<" jetp_: " << jetp << std::endl;
162 
163  bool etslsb = (a1.etSumLsb_ == a2.etSumLsb_);
164  std::cout<<" etSumLsb_: "<< etslsb << std::endl;
165  bool etsemn = (a1.etSumEtaMin_ == a2.etSumEtaMin_);
166  std::cout<<" etSumEtaMin_: "<< etsemn << std::endl;
167 
168  bool etsemx = (a1.etSumEtaMax_ == a2.etSumEtaMax_);
169  std::cout<<" etSumEtaMax_: "<< etsemx << std::endl;
170  bool sett = (a1.etSumEtThreshold_ == a2.etSumEtThreshold_);
171  std::cout<<" etSumEtThreshold_: "<< sett << std::endl;
172 
173  return v && pn && tp && rlsb && egp && taup && jetp && etslsb && etsemn && etsemx && sett;
174 }
tuple cout
Definition: gather_cfg.py:145