File indexing completed on 2024-04-06 12:09:03
0001 #include <iostream>
0002 #include <fstream>
0003 #include <iomanip>
0004 #include <string>
0005 #include <map>
0006 #include <cmath>
0007
0008 int main(int argc, char **argv) {
0009
0010
0011 std::string file;
0012 file.assign(argv[1]);
0013 std::map<std::string,double> timingPerModule, timingPerLabel;
0014 std::map<unsigned,double> timingPerEvent;
0015 std::ifstream myTimingFile(file.c_str(),std::ifstream::in);
0016 std::string dummy1, label, module;
0017 double timing;
0018 unsigned idummy1,evt;
0019 int nbofevts = 0;
0020
0021
0022 double factor = 0.995;
0023
0024 if ( myTimingFile ) {
0025 while ( !myTimingFile.eof() ) {
0026 myTimingFile >> dummy1 >> evt >> idummy1 >> label >> module >> timing ;
0027
0028 timingPerEvent[evt] += timing * factor * 1000.;
0029 timingPerModule[module] += timing * factor * 1000.;
0030 timingPerLabel[module+":"+label] += timing * factor * 1000.;
0031 }
0032 nbofevts = (int) timingPerEvent.size();
0033 } else {
0034 std::cout << "File " << file << " does not exist!" << std::endl;
0035 }
0036
0037 std::map<std::string,double>::const_iterator modIt = timingPerModule.begin();
0038 std::map<std::string,double>::const_iterator labIt = timingPerLabel.begin();
0039 std::map<std::string,double>::const_iterator modEnd = timingPerModule.end();
0040 std::map<std::string,double>::const_iterator labEnd = timingPerLabel.end();
0041 std::map<double,std::string> modulePerTiming;
0042 std::map<double,std::string> labelPerTiming;
0043
0044 for ( ; modIt != modEnd; ++modIt ) {
0045 double time = modIt->second/((double)nbofevts-1.);
0046 std::string name = modIt->first;
0047 modulePerTiming[time] = name;
0048 }
0049
0050 for ( ; labIt != labEnd; ++labIt ) {
0051 double time = labIt->second/((double)nbofevts-1.);
0052 std::string name = labIt->first;
0053 labelPerTiming[time] = name;
0054 }
0055
0056 std::map<double,std::string>::const_reverse_iterator timeIt = modulePerTiming.rbegin();
0057 std::map<double,std::string>::const_reverse_iterator timeEnd = modulePerTiming.rend();
0058 std::map<double,std::string>::const_reverse_iterator timeIt2 = labelPerTiming.rbegin();
0059 std::map<double,std::string>::const_reverse_iterator timeEnd2 = labelPerTiming.rend();
0060
0061 std::cout << "Timing per module " << std::endl;
0062 std::cout << "================= " << std::endl;
0063 double totalTime = 0.;
0064 unsigned i=1;
0065 for ( ; timeIt != timeEnd; ++timeIt ) {
0066
0067 totalTime += timeIt->first;
0068 std::cout << std::setw(3) << i++
0069 << std::setw(50) << timeIt->second << " : "
0070 << std::setw(7) << std::setprecision(3) << timeIt-> first << " ms/event"
0071 << std::endl;
0072 }
0073 std::cout << "Total time = " << totalTime << " ms/event " << std::endl;
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091 double subtotaltimepermodule = 0;
0092 double cumulativetimepermodule = 0;
0093
0094 std::cout << "================= " << std::endl;
0095 std::cout << " DQM for collision : Timing per step " << std::endl;
0096 std::cout << "================= " << std::endl;
0097
0098 std::cout << "1. Reconstruction " << std::endl;
0099
0100 std::cout << " 1.1 Raw2Digi+LocalReco : " << std::endl;
0101 std::cout << " 1.1.1 : Raw2Digi " << std::endl;
0102 subtotaltimepermodule = 0;
0103 std::cout << " - " << std::setw(40) << "SiPixelRawToDigi" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiPixelRawToDigi"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0104 subtotaltimepermodule += timingPerModule["SiPixelRawToDigi"];
0105 cumulativetimepermodule += timingPerModule["SiPixelRawToDigi"];
0106 std::cout << " - " << std::setw(40) << "SiStripRawToDigi" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiStripRawToDigiModule"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0107 subtotaltimepermodule += timingPerModule["SiStripRawToDigiModule"];
0108 cumulativetimepermodule += timingPerModule["SiStripRawToDigiModule"];
0109 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0110 std::cout << " " << std::setw(70) << "subtotal : " << std::setw(8) << subtotaltimepermodule/((double)nbofevts-1.) << " ms/event" << " / " << std::setw(8) << cumulativetimepermodule/((double)nbofevts-1.) << " ms/event" << std::endl;
0111 std::cout << " 1.1.2 : LocalReco" << std::endl;
0112 subtotaltimepermodule = 0;
0113 std::cout << " - " << std::setw(40) << "SiPixelClusterProducer" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiPixelClusterProducer"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0114 subtotaltimepermodule += timingPerModule["SiPixelClusterProducer"];
0115 cumulativetimepermodule += timingPerModule["SiPixelClusterProducer"];
0116 std::cout << " - " << std::setw(40) << "SiPixelRecHitConverter" << std::setw(30) << "" << std::setw(8) << timingPerLabel["SiPixelRecHitConverter:siPixelRecHits"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0117 subtotaltimepermodule += timingPerLabel["SiPixelRecHitConverter:siPixelRecHits"];
0118 cumulativetimepermodule += timingPerLabel["SiPixelRecHitConverter:siPixelRecHits"];
0119 std::cout << " - " << std::setw(40) << "SiStripZeroSuppression" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiStripZeroSuppression"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0120 subtotaltimepermodule += timingPerModule["SiStripZeroSuppression"];
0121 cumulativetimepermodule += timingPerModule["SiStripZeroSuppression"];
0122 std::cout << " - " << std::setw(40) << "SiStripClusterizer" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiStripClusterizer"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0123 subtotaltimepermodule += timingPerModule["SiStripClusterizer"];
0124 cumulativetimepermodule += timingPerModule["SiStripClusterizer"];
0125 std::cout << " - " << std::setw(40) << "SiStripRecHitConverter" << std::setw(30) << "" << std::setw(8) << timingPerLabel["SiStripRecHitConverter:siStripMatchedRecHits"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0126 subtotaltimepermodule += timingPerLabel["SiStripRecHitConverter:siStripMatchedRecHits"];
0127 cumulativetimepermodule += timingPerLabel["SiStripRecHitConverter:siStripMatchedRecHits"];
0128 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0129 std::cout << " " << std::setw(70) << "subtotal : " << std::setw(8) << subtotaltimepermodule/((double)nbofevts-1.) << " ms/event" << " / " << std::setw(8) << cumulativetimepermodule/((double)nbofevts-1.) << " ms/event" << std::endl;
0130
0131
0132 std::cout << " 1.2 BeamSpot+RecoPixelVertexing+CkfTracks :" << std::endl;
0133 std::cout << " 1.2.1 : BeamSpot " << std::endl;
0134 subtotaltimepermodule = 0;
0135 std::cout << " - " << std::setw(40) << "BeamSpotProducer" << std::setw(30) << "" << std::setw(8) << timingPerModule["BeamSpotProducer"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0136 subtotaltimepermodule += timingPerModule["BeamSpotProducer"];
0137 cumulativetimepermodule += timingPerModule["BeamSpotProducer"];
0138 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0139 std::cout << " " << std::setw(70) << "subtotal : " << std::setw(8) << subtotaltimepermodule/((double)nbofevts-1.) << " ms/event" << " / " << std::setw(8) << cumulativetimepermodule/((double)nbofevts-1.) << " ms/event" << std::endl;
0140 std::cout << " 1.2.2 : RecoPixelVertexing " << std::endl;
0141 subtotaltimepermodule = 0;
0142 std::cout << " - " << std::setw(40) << "PixelTrackProducer" << std::setw(30) << "" << std::setw(8) << timingPerModule["PixelTrackProducer"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0143 subtotaltimepermodule += timingPerModule["PixelTrackProducer"];
0144 cumulativetimepermodule += timingPerModule["PixelTrackProducer"];
0145 std::cout << " - " << std::setw(40) << "PixelVertexProducer" << std::setw(30) << "" << std::setw(8) << timingPerModule["PixelVertexProducer"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0146 subtotaltimepermodule += timingPerModule["PixelVertexProducer"];
0147 cumulativetimepermodule += timingPerModule["PixelVertexProducer"];
0148 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0149 std::cout << " " << std::setw(70) << "subtotal : " << std::setw(8) << subtotaltimepermodule/((double)nbofevts-1.) << " ms/event" << " / " << std::setw(8) << cumulativetimepermodule/((double)nbofevts-1.) << " ms/event" << std::endl;
0150 std::cout << " 1.2.3 : CkfTracks " << std::endl;
0151 subtotaltimepermodule = 0;
0152 std::cout << " - " << std::setw(40) << "SeedGeneratorFromRegionHitsEDProducer" << std::setw(30) << "" << std::setw(8) << timingPerModule["SeedGeneratorFromRegionHitsEDProducer"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0153 subtotaltimepermodule += timingPerModule["SeedGeneratorFromRegionHitsEDProducer"];
0154 cumulativetimepermodule += timingPerModule["SeedGeneratorFromRegionHitsEDProducer"];
0155
0156
0157
0158
0159
0160
0161
0162
0163 std::cout << " - " << std::setw(40) << "CkfTrackCandidateMaker" << std::setw(30) << "" << std::setw(8) << timingPerModule["CkfTrackCandidateMaker"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0164 subtotaltimepermodule += timingPerModule["CkfTrackCandidateMaker"];
0165 cumulativetimepermodule += timingPerModule["CkfTrackCandidateMaker"];
0166
0167
0168
0169
0170
0171
0172
0173 std::cout << " - " << std::setw(40) << "TrackProducer" << std::setw(30) << "" << std::setw(8) << timingPerModule["TrackProducer"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0174 subtotaltimepermodule += timingPerModule["TrackProducer"];
0175 cumulativetimepermodule += timingPerModule["TrackProducer"];
0176
0177
0178
0179
0180
0181
0182
0183
0184 std::cout << " - " << std::setw(40) << "AnalyticalTrackSelector" << std::setw(30) << "" << std::setw(8) << timingPerModule["AnalyticalTrackSelector"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0185 subtotaltimepermodule += timingPerModule["AnalyticalTrackSelector"];
0186 cumulativetimepermodule += timingPerModule["AnalyticalTrackSelector"];
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213 std::cout << " - " << std::setw(40) << "QualityFilter" << std::setw(30) << "" << std::setw(8) << timingPerModule["QualityFilter"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0214 subtotaltimepermodule += timingPerModule["QualityFilter"];
0215 cumulativetimepermodule += timingPerModule["QualityFilter"];
0216
0217
0218
0219
0220
0221
0222
0223 std::cout << " - " << std::setw(40) << "TrackClusterRemover" << std::setw(30) << "" << std::setw(8) << timingPerModule["TrackClusterRemover"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0224 subtotaltimepermodule += timingPerModule["TrackClusterRemover"];
0225 cumulativetimepermodule += timingPerModule["TrackClusterRemover"];
0226
0227
0228
0229
0230
0231
0232
0233 std::cout << " - " << std::setw(40) << "SiPixelRecHitConverter" << std::setw(30) << "" << std::setw(8) << timingPerLabel["SiPixelRecHitConverter:newPixelRecHits"]/((double)nbofevts-1.)
0234 +timingPerLabel["SiPixelRecHitConverter:secPixelRecHits"]/((double)nbofevts-1.)
0235 +timingPerLabel["SiPixelRecHitConverter:thPixelRecHits"]/((double)nbofevts-1.)
0236 +timingPerLabel["SiPixelRecHitConverter:fourthPixelRecHits"]/((double)nbofevts-1.)
0237 +timingPerLabel["SiPixelRecHitConverter:fifthPixelRecHits"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0238 subtotaltimepermodule += timingPerLabel["SiPixelRecHitConverter:newPixelRecHits"];
0239 subtotaltimepermodule += timingPerLabel["SiPixelRecHitConverter:secPixelRecHits"];
0240 subtotaltimepermodule += timingPerLabel["SiPixelRecHitConverter:thPixelRecHits"];
0241 subtotaltimepermodule += timingPerLabel["SiPixelRecHitConverter:fourthPixelRecHits"];
0242 subtotaltimepermodule += timingPerLabel["SiPixelRecHitConverter:fifthPixelRecHits"];
0243 cumulativetimepermodule += timingPerLabel["SiPixelRecHitConverter:newPixelRecHits"];
0244 cumulativetimepermodule += timingPerLabel["SiPixelRecHitConverter:secPixelRecHits"];
0245 cumulativetimepermodule += timingPerLabel["SiPixelRecHitConverter:thPixelRecHits"];
0246 cumulativetimepermodule += timingPerLabel["SiPixelRecHitConverter:fourthPixelRecHits"];
0247 cumulativetimepermodule += timingPerLabel["SiPixelRecHitConverter:fifthPixelRecHits"];
0248
0249
0250
0251
0252
0253
0254
0255 std::cout << " - " << std::setw(40) << "SiStripRecHitConverter" << std::setw(30) << "" << std::setw(8) << timingPerLabel["SiStripRecHitConverter:newStripRecHits"]/((double)nbofevts-1.)
0256 +timingPerLabel["SiStripRecHitConverter:secStripRecHits"]/((double)nbofevts-1.)
0257 +timingPerLabel["SiStripRecHitConverter:thStripRecHits"]/((double)nbofevts-1.)
0258 +timingPerLabel["SiStripRecHitConverter:fourthStripRecHits"]/((double)nbofevts-1.)
0259 +timingPerLabel["SiStripRecHitConverter:fifthStripRecHits"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0260 subtotaltimepermodule += timingPerLabel["SiStripRecHitConverter:newStripRecHits"];
0261 subtotaltimepermodule += timingPerLabel["SiStripRecHitConverter:secStripRecHits"];
0262 subtotaltimepermodule += timingPerLabel["SiStripRecHitConverter:thStripRecHits"];
0263 subtotaltimepermodule += timingPerLabel["SiStripRecHitConverter:fourthStripRecHits"];
0264 subtotaltimepermodule += timingPerLabel["SiStripRecHitConverter:fifthStripRecHits"];
0265 cumulativetimepermodule += timingPerLabel["SiStripRecHitConverter:newStripRecHits"];
0266 cumulativetimepermodule += timingPerLabel["SiStripRecHitConverter:secStripRecHits"];
0267 cumulativetimepermodule += timingPerLabel["SiStripRecHitConverter:thStripRecHits"];
0268 cumulativetimepermodule += timingPerLabel["SiStripRecHitConverter:fourthStripRecHits"];
0269 cumulativetimepermodule += timingPerLabel["SiStripRecHitConverter:fifthStripRecHits"];
0270
0271
0272
0273
0274
0275
0276
0277 std::cout << " - " << std::setw(40) << "SimpleTrackListMerger" << std::setw(30) << "" << std::setw(8) << timingPerModule["SimpleTrackListMerger"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0278 subtotaltimepermodule += timingPerModule["SimpleTrackListMerger"];
0279 cumulativetimepermodule += timingPerModule["SimpleTrackListMerger"];
0280
0281
0282
0283
0284
0285
0286 std::cout << " - " << std::setw(40) << "SeedCombiner" << std::setw(30) << "" << std::setw(8) << timingPerModule["SeedCombiner"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0287 subtotaltimepermodule += timingPerModule["SeedCombiner"];
0288 cumulativetimepermodule += timingPerModule["SeedCombiner"];
0289
0290
0291
0292 std::cout << " - " << std::setw(40) << "DeDxEstimatorProducer" << std::setw(30) << "" << std::setw(8) << timingPerModule["DeDxEstimatorProducer"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0293 subtotaltimepermodule += timingPerModule["DeDxEstimatorProducer"];
0294 cumulativetimepermodule += timingPerModule["DeDxEstimatorProducer"];
0295
0296
0297
0298
0299 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0300 std::cout << " " << std::setw(70) << "subtotal : " << std::setw(8) << subtotaltimepermodule/((double)nbofevts-1.) << " ms/event" << " / " << std::setw(8) << cumulativetimepermodule/((double)nbofevts-1.) << " ms/event" << std::endl;
0301
0302
0303 std::cout << "2. Data quality monitoring : " << std::endl;
0304
0305 std::cout << " 2.1 DQM common modules " << std::endl;
0306 std::cout << " 2.1.1 : Quality tests " << std::endl;
0307 subtotaltimepermodule = 0;
0308 std::cout << " - " << std::setw(40) << "QualityTester" << std::setw(30) << "" << std::setw(8) << timingPerModule["QualityTester"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0309 subtotaltimepermodule += timingPerModule["QualityTester"];
0310 cumulativetimepermodule += timingPerModule["QualityTester"];
0311
0312
0313
0314 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0315 std::cout << " " << std::setw(70) << "subtotal : " << std::setw(8) << subtotaltimepermodule/((double)nbofevts-1.) << " ms/event" << " / " << std::setw(8) << cumulativetimepermodule/((double)nbofevts-1.) << " ms/event" << std::endl;
0316 std::cout << " 2.1.2 : DQM playback environment " << std::endl;
0317 subtotaltimepermodule = 0;
0318 std::cout << " - " << std::setw(40) << "DQMEventInfo" << std::setw(30) << "" << std::setw(8) << timingPerLabel["DQMEventInfo:dqmEnv"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0319 subtotaltimepermodule += timingPerLabel["DQMEventInfo:dqmEnv"];
0320 cumulativetimepermodule += timingPerLabel["DQMEventInfo:dqmEnv"];
0321
0322
0323
0324 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0325 std::cout << " " << std::setw(70) << "subtotal : " << std::setw(8) << subtotaltimepermodule/((double)nbofevts-1.) << " ms/event" << " / " << std::setw(8) << cumulativetimepermodule/((double)nbofevts-1.) << " ms/event" << std::endl;
0326
0327
0328
0329
0330
0331
0332
0333
0334
0335
0336 std::cout << " 2.1.3 : DQM file saver " << std::endl;
0337 subtotaltimepermodule = 0;
0338 std::cout << " - " << std::setw(40) << "DQMFileSaver" << std::setw(30) << "" << std::setw(8) << timingPerModule["DQMFileSaver"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0339 subtotaltimepermodule += timingPerModule["DQMFileSaver"];
0340 cumulativetimepermodule += timingPerModule["DQMFileSaver"];
0341
0342
0343
0344 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0345 std::cout << " " << std::setw(70) << "subtotal : " << std::setw(8) << subtotaltimepermodule/((double)nbofevts-1.) << " ms/event" << " / " << std::setw(8) << cumulativetimepermodule/((double)nbofevts-1.) << " ms/event" << std::endl;
0346
0347 std::cout << " 2.2 DQM monitoring " << std::endl;
0348 std::cout << " 2.2.1 : Raw data error monitor" << std::endl;
0349 subtotaltimepermodule = 0;
0350 std::cout << " - " << std::setw(40) << "SiPixelRawDataErrorSource" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiPixelRawDataErrorSource"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0351 subtotaltimepermodule += timingPerModule["SiPixelRawDataErrorSource"];
0352 cumulativetimepermodule += timingPerModule["SiPixelRawDataErrorSource"];
0353
0354
0355
0356 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0357 std::cout << " " << std::setw(70) << "subtotal : " << std::setw(8) << subtotaltimepermodule/((double)nbofevts-1.) << " ms/event" << " / " << std::setw(8) << cumulativetimepermodule/((double)nbofevts-1.) << " ms/event" << std::endl;
0358
0359
0360
0361
0362
0363
0364
0365
0366
0367
0368
0369
0370
0371
0372
0373
0374
0375
0376
0377
0378
0379
0380
0381
0382
0383
0384
0385 std::cout << " 2.2.2 : Digi/Cluster/RecHit monitor " << std::endl;
0386 subtotaltimepermodule = 0;
0387 std::cout << " - " << std::setw(40) << "SiPixelDigiSource" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiPixelDigiSource"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0388 subtotaltimepermodule += timingPerModule["SiPixelDigiSource"];
0389 cumulativetimepermodule += timingPerModule["SiPixelDigiSource"];
0390
0391
0392
0393 std::cout << " - " << std::setw(40) << "SiPixelRecHitSource" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiPixelRecHitSource"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0394 subtotaltimepermodule += timingPerModule["SiPixelRecHitSource"];
0395 cumulativetimepermodule += timingPerModule["SiPixelRecHitSource"];
0396
0397
0398
0399 std::cout << " - " << std::setw(40) << "SiPixelClusterSource" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiPixelClusterSource"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0400 subtotaltimepermodule += timingPerModule["SiPixelClusterSource"];
0401 cumulativetimepermodule += timingPerModule["SiPixelClusterSource"];
0402
0403
0404
0405 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0406 std::cout << " " << std::setw(70) << "subtotal : " << std::setw(8) << subtotaltimepermodule/((double)nbofevts-1.) << " ms/event" << " / " << std::setw(8) << cumulativetimepermodule/((double)nbofevts-1.) << " ms/event" << std::endl;
0407
0408 std::cout << " 2.2.3 : Track monitor " << std::endl;
0409 subtotaltimepermodule = 0;
0410 std::cout << " - " << std::setw(40) << "SiPixelTrackResidualSource" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiPixelTrackResidualSource"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0411 subtotaltimepermodule += timingPerModule["SiPixelTrackResidualSource"];
0412 cumulativetimepermodule += timingPerModule["SiPixelTrackResidualSource"];
0413
0414
0415
0416 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0417 std::cout << " " << std::setw(70) << "subtotal : " << std::setw(8) << subtotaltimepermodule/((double)nbofevts-1.) << " ms/event" << " / " << std::setw(8) << cumulativetimepermodule/((double)nbofevts-1.) << " ms/event" << std::endl;
0418
0419 std::cout << " 2.2.4 : Pixel EDA client " << std::endl;
0420 subtotaltimepermodule = 0;
0421 std::cout << " - " << std::setw(40) << "SiPixelEDAClient" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiPixelEDAClient"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0422 subtotaltimepermodule += timingPerModule["SiPixelEDAClient"];
0423 cumulativetimepermodule += timingPerModule["SiPixelEDAClient"];
0424
0425
0426
0427 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0428 std::cout << " " << std::setw(70) << "subtotal : " << std::setw(8) << subtotaltimepermodule/((double)nbofevts-1.) << " ms/event" << " / " << std::setw(8) << cumulativetimepermodule/((double)nbofevts-1.) << " ms/event" << std::endl;
0429
0430 std::cout << "Total nb of events read = " << nbofevts << std::endl;
0431 std::cout << "Total time = " << totalTime << " ms/event " << std::endl;
0432
0433 std::map<unsigned,double>::const_iterator eventIt = timingPerEvent.begin();
0434 std::map<unsigned,double>::const_iterator eventEnd = timingPerEvent.end();
0435 double minEv = 99999999.;
0436 double maxEv = 0.;
0437 double rms = 0.;
0438 double mean = 0.;
0439 double timeEv = 0;
0440 for ( ; eventIt != eventEnd; ++eventIt ) {
0441 if ( eventIt->first == 1 ) continue;
0442 timeEv = eventIt->second;
0443
0444 if ( timeEv > maxEv ) maxEv = timeEv;
0445 if ( timeEv < minEv ) minEv = timeEv;
0446 mean += timeEv;
0447 rms += timeEv*timeEv;
0448 }
0449
0450 mean /= ((double)nbofevts-1.);
0451 rms /= ((double)nbofevts-1.);
0452 rms = std::sqrt(rms-mean*mean);
0453 std::cout << "Total time = " << mean << " +/- " << rms << " ms/event" << std::endl;
0454 std::cout << "Min. time = " << minEv << " ms/event" << std::endl;
0455 std::cout << "Max. time = " << maxEv << " ms/event" << std::endl;
0456 }
0457