CMS 3D CMS Logo

Macros | Functions | Variables
vlib.cc File Reference
#include <L1Trigger/CSCCommonTrigger/interface/vlib.h>

Go to the source code of this file.

Macros

#define binop(op, cop)
 
#define compop(op, cop)
 
#define dbgmsg(a)   std::cerr << a << " Set breakpoint at " << __FILE__ << ":" << __LINE__ << "\n";
 
#define unop(op, cop)
 

Functions

std::ostream & operator<< (std::ostream &stream, Signal s)
 
Signal rand (Signal arg)
 
Signal ror (Signal arg)
 
Signal rxor (Signal arg)
 

Variables

globcontrol glc
 
char const * obnames [] = {"none ", "reg ", "wire ", "input ", "output ", "inout ", "num ", "temp "}
 

Macro Definition Documentation

◆ binop

#define binop (   op,
  cop 
)
Value:
Signal Signal::op(Signal arg) { \
Signal t; \
int ln = h - l; \
int aln = arg.h - arg.l; \
t.init((ln > aln) ? ln : aln, 0, ""); \
t.r = t.mask & (getval() cop arg.getval()); \
return t; \
}

Definition at line 294 of file vlib.cc.

◆ compop

#define compop (   op,
  cop 
)
Value:
Signal Signal::op(Signal arg) { \
Signal t; \
t.init(""); \
t.r = (getval() cop arg.getval()); \
return t; \
}

Definition at line 352 of file vlib.cc.

◆ dbgmsg

#define dbgmsg (   a)    std::cerr << a << " Set breakpoint at " << __FILE__ << ":" << __LINE__ << "\n";

Definition at line 9 of file vlib.cc.

◆ unop

#define unop (   op,
  cop 
)
Value:
Signal Signal::op() { \
Signal t; \
t.init(h, l, ""); \
t.r = mask & (cop getval()); \
return t; \
}

Definition at line 265 of file vlib.cc.

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  stream,
Signal  s 
)

Definition at line 538 of file vlib.cc.

538  {
539  stream << s.getr();
540  s.setprintable(0);
541  return stream;
542 }

References alignCSCRings::s, and cms::cuda::stream.

◆ rand()

Signal rand ( Signal  arg)

Definition at line 379 of file vlib.cc.

379  {
380  Signal t;
381  rval tr;
382 #ifdef VGEN
383  t.name = "&" + arg.lb + arg.name + arg.rb;
384  arg.printable = 0;
385 #else
386  t.init("");
387 #endif
388  tr = (arg.getval()) & arg.mask;
389  t.r = (tr == arg.mask) ? 1 : 0;
390  return t;
391 }

References OrderedSet::t.

Referenced by EcalTrivialObjectAnalyzer::analyze(), SiStripDetVOffFakeBuilder::analyze(), SiStripFedCablingBuilderFromDb::buildFecCablingFromDetIds(), HFCherenkov::computeNPE(), HFCherenkov::computeNPEinPMT(), HFCherenkov::computeNPhTrapped(), HiCentralityBiasFilter::filter(), EcalTestDevDB::generateEcalADCToGeVConstant(), EcalTestDevDB::generateEcalGainRatios(), EcalTestDevDB::generateEcalIntercalibConstants(), EcalTestDevDB::generateEcalPedestals(), EcalTestDevDB::generateEcalTBWeights(), HCAL_HLX::TCPReceiver::GenerateRandomData(), Exhume::Event::GetLastSeed(), Qjets::GetNextDistance(), HcalAssistant::getRandomQuote(), cond::auth::KeyGenerator::make(), cond::auth::KeyGenerator::makeWithRandomSize(), RandArrayFunction::MapRandom(), Phase2TrackerDigitizerAlgorithm::pixel_inefficiency(), SiPixelDigitizerAlgorithm::pixel_inefficiency(), CSCCrosstalkConditions::prefillCrosstalk(), CSCFakeCrosstalkConditions::prefillCrosstalk(), CSCFakeDBCrosstalk::prefillDBCrosstalk(), CSCFakeDBGains::prefillDBGains(), CSCFakeDBPedestals::prefillDBPedestals(), CSCGainsConditions::prefillGains(), CSCFakeGainsConditions::prefillGains(), CSCFakePedestalsConditions::prefillPedestals(), L1ExtraParticleMapProd::produce(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibConstantsMC(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalLinearCorrections(), EcalTrivialConditionRetriever::produceEcalTimeCalibConstants(), ESTrivialConditionRetriever::produceESIntercalibConstants(), cond::randomChar(), L1RCT::randomInput(), L1RCTReceiverCard::randomInput(), CmsShowCommon::randomizeColors(), emtf::shuffle(), and HcalLutManager::test_xml_access().

◆ ror()

Signal ror ( Signal  arg)

Definition at line 365 of file vlib.cc.

365  {
366  Signal t;
367  rval tr;
368 #ifdef VGEN
369  t.name = "|" + arg.lb + arg.name + arg.rb;
370  arg.printable = 0;
371 #else
372  t.init("");
373 #endif
374  tr = (arg.getval()) & arg.mask;
375  t.r = (tr != 0) ? 1 : 0;
376  return t;
377 }

References OrderedSet::t.

◆ rxor()

Signal rxor ( Signal  arg)

Definition at line 393 of file vlib.cc.

393  {
394  Signal t;
395  rval tr;
396  int i;
397 #ifdef VGEN
398  t.name = "^" + arg.lb + arg.name + arg.rb;
399  arg.printable = 0;
400 #else
401  t.init("");
402 #endif
403  tr = (arg.getval()) & arg.mask;
404  t.r = 0;
405  for (i = 0; i < arg.h - arg.l + 1; ++i) {
406  t.r = ((tr & 1) != 0) ? !t.r : t.r;
407  tr = tr >> 1;
408  }
409  t.r = t.r & 1;
410  return t;
411 }

References cms::cuda::for(), mps_fire::i, and OrderedSet::t.

Variable Documentation

◆ glc

◆ obnames

char const* obnames[] = {"none ", "reg ", "wire ", "input ", "output ", "inout ", "num ", "temp "}
mps_fire.i
i
Definition: mps_fire.py:355
cms::cuda::stream
cudaStream_t stream
Definition: HistoContainer.h:57
mathSSE::return
return((rh ^ lh) &mask)
Signal
Definition: vlib.h:28
alignCSCRings.s
s
Definition: alignCSCRings.py:92
rval
unsigned long long int rval
Definition: vlib.h:21
Signal::l
int l
Definition: vlib.h:145
h
OrderedSet.t
t
Definition: OrderedSet.py:90
cms::cuda::for
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
Definition: HistoContainer.h:27
Signal::getval
rval getval()
Definition: vlib.cc:415
Signal::mask
rval mask
Definition: vlib.h:147
funct::arg
A arg
Definition: Factorize.h:36