CMS 3D CMS Logo

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

Namespaces

 evtn
 
 fedinterface
 
 moduleweb
 

Classes

class  DirManager
 
class  EvFBuildingThrottle
 
class  EvFDaqDirector
 
class  EvffedFillerEP
 
class  EvffedFillerRB
 
class  EvFFEDSelector
 
class  EvFRecordInserter
 
class  EvFRecordUnpacker
 
class  ExceptionGenerator
 
class  FastMonitoringService
 
class  FastMonitoringThread
 
class  MicroStateService
 
class  MicroStateServiceClassic
 
class  RecoEventOutputModuleForFU
 
class  RecoEventWriterForFU
 

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]
 

Function Documentation

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

Definition at line 148 of file ExceptionGenerator.cc.

References data, Exception, cmsRelvalreport::exit, cmsHarvester::index, j, create_public_lumi_plots::log, pi, random, mathSSE::sqrt(), relval_parameters_module::step, and relativeConstraints::value.

149  {
150  float dummy = 0.;
151  unsigned int iterations = 0;
152  if(actionRequired_)
153  {
154  int *pi = 0;
155  int ind = 0;
156  int step = 1;
157  switch(actionId_)
158  {
159  case 0:
160  ::usleep(intqualifier_*1000);
161  break;
162  case 1:
163  ::sleep(0xFFFFFFF);
164  break;
165  case 2:
166  throw cms::Exception(qualifier_) << "This exception was generated by the ExceptionGenerator";
167  break;
168  case 3:
169  exit(-1);
170  break;
171  case 4:
172  abort();
173  break;
174  case 5:
175  throw qualifier_;
176  break;
177  case 6:
178  while(1){ind+=step; if(ind>1000000) step = -1; if(ind==0) step = 1;}
179  break;
180  case 7:
181  edm::LogError("TestErrorMessage") << qualifier_;
182  break;
183  case 8:
184  *pi=0;
185  break;
186  case 9:
187  for(unsigned int j=0; j<intqualifier_*1000;j++){
188  dummy += sqrt(log(float(j+1)))/float(j*j);
189  }
190  break;
191  case 10:
192  iterations = static_cast<unsigned int>(
193  timingHisto_->GetRandom() * intqualifier_*17. + 0.5
194  );
195  for(unsigned int j=0; j<iterations;j++){
196  dummy += sqrt(log(float(j+1)))/float(j*j);
197  }
198  break;
199  case 11:
200  {
201  iterations = static_cast<unsigned int>(
202  timingHisto_->GetRandom() * intqualifier_*12. + 0.5
203  );
204  TRandom3 random(iterations);
205  const size_t dataSize = 32*500; // 124kB
206  std::vector<double> data(dataSize);
207  random.RndmArray(dataSize, &data[0]);
208 
209  for(unsigned int j=0; j<iterations;j++){
210  const size_t index = static_cast<size_t>(random.Rndm() * dataSize + 0.5);
211  const double value = data[index];
212  dummy += sqrt(log(value+1))/(value*value);
213  if ( random.Rndm() < 0.1 )
214  data[index] = dummy;
215  }
216  }
217  break;
218  case 12:
219  {
220  timeval tv_now;
221  gettimeofday(&tv_now,0);
222  if ((unsigned)(tv_now.tv_sec-tv_start_.tv_sec)>intqualifier_)
223  *pi=0;
224  }
225  break;
226  case 13:
227  void *vp = malloc(1024);
228  memset((char *)vp - 32, 0, 1024);
229  free(vp);
230  break;
231  }
232  }
233  }
TRandom random
Definition: MVATrainer.cc:138
const Double_t pi
T sqrt(T t)
Definition: SSEVec.h:48
int j
Definition: DBlmapReader.cc:9
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
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(), l1t::L1TDigiToRaw::produce(), and evf::EvffedFillerRB::putTrailer().

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 query::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: query.py:137
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().