14 #include "boost/tokenizer.hpp"
17 #include <sys/types.h>
26 actionId_(pset.getUntrackedParameter<int>(
"defaultAction",-1)),
27 intqualifier_(pset.getUntrackedParameter<int>(
"defaultQualifier",0)),
28 qualifier2_(pset.getUntrackedParameter<double>(
"secondQualifier",1)),
29 actionRequired_(actionId_!=-1)
36 timingHisto_ =
new TH1D(
"timingHisto_",
"Total time for all modules per event",100,0,1000);
149 unsigned int iterations = 0;
158 ::usleep(intqualifier_*1000);
164 throw cms::Exception(qualifier_) <<
"This exception was generated by the ExceptionGenerator";
176 while(1){ind+=
step;
if(ind>1000000) step = -1;
if(ind==0) step = 1;}
185 for(
unsigned int j=0;
j<intqualifier_*1000*100;
j++){
190 iterations = 100*
static_cast<unsigned int>(
191 timingHisto_->GetRandom() * intqualifier_*17. + 0.5
193 for(
unsigned int j=0;
j<iterations;
j++){
199 iterations =
static_cast<unsigned int>(
200 timingHisto_->GetRandom() * intqualifier_*12. + 0.5
202 TRandom3
random(iterations);
203 const size_t dataSize = 32*500;
204 std::vector<double>
data(dataSize);
205 random.RndmArray(dataSize, &data[0]);
207 for(
unsigned int j=0;
j<iterations;
j++){
208 const size_t index =
static_cast<size_t>(random.Rndm() * dataSize + 0.5);
211 if ( random.Rndm() < 0.1 )
219 gettimeofday(&tv_now,0);
220 if ((
unsigned)(tv_now.tv_sec-tv_start_.tv_sec)>intqualifier_)
226 void *vp = malloc(1024);
227 memset((
char *)vp - 32, 0, 1024);
235 float off = intqualifier_ * (1. - qualifier2_);
236 scale = scale*qualifier2_;
237 iterations =
static_cast<unsigned int>(
max(1.,off + timingHisto_->GetRandom() *
scale));
239 ::usleep(iterations*1000);
246 float off = intqualifier_ * (1. - qualifier2_);
247 scale = scale*qualifier2_;
248 iterations =
static_cast<unsigned int>(
max(1.,off + timingHisto_->GetRandom() *
scale));
249 iterations *= 100000;
250 for(
unsigned int j=0;
j<iterations;
j++){
void __attribute__((optimize("O0"))) ExceptionGenerator
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
char data[epos_bytes_allocation]
void beginRun(edm::Run &r, const edm::EventSetup &iSetup)