CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Classes | Enumerations | Functions | Variables
evf Namespace Reference

Namespaces

 evtn
 
 moduleweb
 

Classes

class  DirManager
 
class  EvFBuildingThrottle
 
class  EvFDaqDirector
 
class  EvFFEDSelector
 
class  ExceptionGenerator
 
class  FastMonitoringService
 
class  FastMonitoringThread
 
class  MicroStateService
 
class  MicroStateServiceClassic
 
class  RecoEventOutputModuleForFU
 
class  RecoEventWriterForFU
 

Enumerations

enum  MergeType { MergeTypeNULL = 0, MergeTypeDAT = 1, MergeTypePB = 2, MergeTypeJSNDATA = 3 }
 

Functions

void __attribute__ ((optimize("O0"))) ExceptionGenerator
 
unsigned short compute_crc (unsigned char *buffer, unsigned int bufSize)
 
unsigned short compute_crc_64bit (unsigned short crc, unsigned char *p)
 
unsigned short compute_crc_8bit (unsigned short crc, unsigned char data)
 

Variables

const unsigned short crc_table [256]
 

Enumeration Type Documentation

Enumerator
MergeTypeNULL 
MergeTypeDAT 
MergeTypePB 
MergeTypeJSNDATA 

Definition at line 50 of file EvFDaqDirector.h.

Function Documentation

void evf::__attribute__ ( (optimize("O0"))  )

Definition at line 146 of file ExceptionGenerator.cc.

References data, Exception, cmsRelvalreport::exit, cmsHarvester::index, j, dqm-mbProfile::log, bookConverter::max, timingPdfMaker::mean, pi, random, pileupReCalc_HLTpaths::scale, mathSSE::sqrt(), and relativeConstraints::value.

147  {
148  float dummy = 0.;
149  unsigned int iterations = 0;
150  if(actionRequired_)
151  {
152  int *pi = 0;//null-pointer used with actionId_ 8 and 12 to intentionally cause segfault
153  int ind = 0;
154  int step = 1;
155  switch(actionId_)
156  {
157  case 0:
158  ::usleep(intqualifier_*1000);
159  break;
160  case 1:
161  ::sleep(0xFFFFFFF);
162  break;
163  case 2:
164  throw cms::Exception(qualifier_) << "This exception was generated by the ExceptionGenerator";
165  break;
166  case 3:
167  exit(-1);
168  break;
169  case 4:
170  abort();
171  break;
172  case 5:
173  throw qualifier_;
174  break;
175  case 6:
176  while(1){ind+=step; if(ind>1000000) step = -1; if(ind==0) step = 1;}
177  break;
178  case 7:
179  edm::LogError("TestErrorMessage") << qualifier_;
180  break;
181  case 8:
182  *pi=0;//intentionally caused segfault by assigning null pointer (this produces static-checker warning)
183  break;
184  case 9:
185  for(unsigned int j=0; j<intqualifier_*1000*100;j++){
186  dummy += sqrt(log(float(j+1)))/float(j*j);
187  }
188  break;
189  case 10:
190  iterations = 100*static_cast<unsigned int>(
191  timingHisto_->GetRandom() * intqualifier_*17. + 0.5
192  );
193  for(unsigned int j=0; j<iterations;j++){
194  dummy += sqrt(log(float(j+1)))/float(j*j);
195  }
196  break;
197  case 11:
198  {
199  iterations = static_cast<unsigned int>(
200  timingHisto_->GetRandom() * intqualifier_*12. + 0.5
201  );
202  TRandom3 random(iterations);
203  const size_t dataSize = 32*500; // 124kB
204  std::vector<double> data(dataSize);
205  random.RndmArray(dataSize, &data[0]);
206 
207  for(unsigned int j=0; j<iterations;j++){
208  const size_t index = static_cast<size_t>(random.Rndm() * dataSize + 0.5);
209  const double value = data[index];
210  dummy += sqrt(log(value+1))/(value*value);
211  if ( random.Rndm() < 0.1 )
212  data[index] = dummy;
213  }
214  }
215  break;
216  case 12:
217  {
218  timeval tv_now;
219  gettimeofday(&tv_now,0);
220  if ((unsigned)(tv_now.tv_sec-tv_start_.tv_sec)>intqualifier_)
221  *pi=0;//intentionally caused segfault by assigning null pointer (this produces static-checker warning)
222  }
223  break;
224  case 13:
225  {
226  void *vp = malloc(1024);
227  memset((char *)vp - 32, 0, 1024);
228  free(vp);
229  }
230  break;
231  case 14:
232  {
233  float mean = 60.; // timingHisto_->GetMean();
234  float scale = intqualifier_ / mean;
235  float off = intqualifier_ * (1. - qualifier2_);
236  scale = scale*qualifier2_; // scale factor (1 default)
237  iterations = static_cast<unsigned int>(max(1.,off + timingHisto_->GetRandom() * scale));
238  //std::cout << " off " << off << " scale " << scale << " " << iterations << std::endl;
239  ::usleep(iterations*1000);
240  }
241  break;
242  case 15:
243  {
244  float mean = 60.; // timingHisto_->GetMean();
245  float scale = intqualifier_ / mean;
246  float off = intqualifier_ * (1. - qualifier2_);
247  scale = scale*qualifier2_; // scale factor (1 default)
248  iterations = static_cast<unsigned int>(max(1.,off + timingHisto_->GetRandom() * scale));
249  iterations *= 100000;
250  for(unsigned int j=0; j<iterations;j++){
251  dummy += sqrt(log(float(j+1)))/float(j*j);
252  }
253  }
254  break;
255  default:
256  break;
257  }
258 
259  }
260  }
TRandom random
Definition: MVATrainer.cc:138
const Double_t pi
T sqrt(T t)
Definition: SSEVec.h:18
int j
Definition: DBlmapReader.cc:9
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
step
unsigned short evf::compute_crc ( unsigned char *  buffer,
unsigned int  bufSize 
)
inline

Definition at line 67 of file CRC16.h.

References assert(), edm::bufSize, compute_crc_64bit(), and i.

Referenced by CSCDigiToRaw::createFedBuffers(), ESDataFormatterV1_1::DigiToRaw(), ESDataFormatterV4::DigiToRaw(), l1t::AMCDumpToRaw::formatRaw(), l1t::MP7BufferDumpToRaw::formatRaw(), CastorPacker::pack(), CastorCtdcPacker::pack(), HcalPacker::pack(), L1GTEvmDigiToRaw::packTrailer(), L1GTDigiToRaw::packTrailer(), DTDigiToRawModule::produce(), CSCTFPacker::produce(), GctDigiToRaw::produce(), HcalDigiToRawuHTR::produce(), and l1t::L1TDigiToRaw::produce().

68 {
69  assert(0==bufSize%8);
70  unsigned short crc(0xffff);
71  bufSize/=8;
72  for (unsigned int i=0;i<bufSize;i++) crc=evf::compute_crc_64bit(crc,&buffer[i*8]);
73  return crc;
74 }
int i
Definition: DBlmapReader.cc:9
assert(m_qm.get())
static int const bufSize
Definition: Guid.cc:24
unsigned short compute_crc_64bit(unsigned short crc, unsigned char *p)
Definition: CRC16.h:87
unsigned short evf::compute_crc_64bit ( unsigned short  crc,
unsigned char *  p 
)
inline

Definition at line 87 of file CRC16.h.

References compute_crc_8bit(), i, and mps_fire::result.

Referenced by compute_crc().

88 {
89  unsigned short result(crc);
90  for (int i=7;i>=0;i--) result=evf::compute_crc_8bit(result,p64[i]);
91  return result;
92 }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: mps_fire.py:84
unsigned short compute_crc_8bit(unsigned short crc, unsigned char data)
Definition: CRC16.h:79
unsigned short evf::compute_crc_8bit ( unsigned short  crc,
unsigned char  data 
)
inline

Definition at line 79 of file CRC16.h.

References crc_table.

Referenced by sistrip::calculateFEDBufferCRC(), and compute_crc_64bit().

80 {
81  return (evf::crc_table[((crc >> 8) ^ data) & 0xFF] ^ (crc << 8));
82 }
const unsigned short crc_table[256]
Definition: CRC16.h:18
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82

Variable Documentation

const unsigned short evf::crc_table[256]

Definition at line 18 of file CRC16.h.

Referenced by compute_crc_8bit().