File indexing completed on 2024-04-06 12:09:02
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+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 : Tracks " << std::endl;
0141 subtotaltimepermodule = 0;
0142 std::cout << " - " << std::setw(40) << "CosmicSeedGenerator" << std::setw(30) << "" << std::setw(8) << timingPerModule["CosmicSeedGenerator"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0143 subtotaltimepermodule += timingPerModule["CosmicSeedGenerator"];
0144 cumulativetimepermodule += timingPerModule["CosmicSeedGenerator"];
0145
0146
0147
0148
0149
0150 std::cout << " - " << std::setw(40) << "SimpleCosmicBONSeeder" << std::setw(30) << "" << std::setw(8) << timingPerModule["SimpleCosmicBONSeeder"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0151 subtotaltimepermodule += timingPerModule["SimpleCosmicBONSeeder"];
0152 cumulativetimepermodule += timingPerModule["SimpleCosmicBONSeeder"];
0153
0154
0155
0156
0157
0158 std::cout << " - " << std::setw(40) << "SeedCombiner" << std::setw(30) << "" << std::setw(8) << timingPerModule["SeedCombiner"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0159 subtotaltimepermodule += timingPerModule["SeedCombiner"];
0160 cumulativetimepermodule += timingPerModule["SeedCombiner"];
0161
0162
0163
0164
0165
0166 std::cout << " - " << std::setw(40) << "CtfSpecialSeedGenerator" << std::setw(30) << "" << std::setw(8) << timingPerModule["CtfSpecialSeedGenerator"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0167 subtotaltimepermodule += timingPerModule["CtfSpecialSeedGenerator"];
0168 cumulativetimepermodule += timingPerModule["CtfSpecialSeedGenerator"];
0169
0170
0171
0172
0173
0174 std::cout << " - " << std::setw(40) << "RoadSearchSeedFinder" << std::setw(30) << "" << std::setw(8) << timingPerModule["RoadSearchSeedFinder"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0175 subtotaltimepermodule += timingPerModule["RoadSearchSeedFinder"];
0176 cumulativetimepermodule += timingPerModule["RoadSearchSeedFinder"];
0177
0178
0179
0180
0181
0182 std::cout << " - " << std::setw(40) << "RoadSearchCloudMaker" << std::setw(30) << "" << std::setw(8) << timingPerModule["RoadSearchCloudMaker"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0183 subtotaltimepermodule += timingPerModule["RoadSearchCloudMaker"];
0184 cumulativetimepermodule += timingPerModule["RoadSearchCloudMaker"];
0185
0186
0187
0188
0189
0190 std::cout << " - " << std::setw(40) << "CosmicTrackFinder" << std::setw(30) << "" << std::setw(8) << timingPerModule["CosmicTrackFinder"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0191 subtotaltimepermodule += timingPerModule["CosmicTrackFinder"];
0192 cumulativetimepermodule += timingPerModule["CosmicTrackFinder"];
0193
0194
0195
0196
0197
0198 std::cout << " - " << std::setw(40) << "CosmicTrackSplitter" << std::setw(30) << "" << std::setw(8) << timingPerModule["CosmicTrackSplitter"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0199 subtotaltimepermodule += timingPerModule["CosmicTrackSplitter"];
0200 cumulativetimepermodule += timingPerModule["CosmicTrackSplitter"];
0201
0202
0203
0204 std::cout << " - " << std::setw(40) << "CkfTrackCandidateMaker" << std::setw(30) << "" << std::setw(8) << timingPerModule["CkfTrackCandidateMaker"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0205 subtotaltimepermodule += timingPerModule["CkfTrackCandidateMaker"];
0206 cumulativetimepermodule += timingPerModule["CkfTrackCandidateMaker"];
0207
0208
0209
0210
0211
0212
0213 std::cout << " - " << std::setw(40) << "RoadSearchTrackCandidateMaker" << std::setw(30) << "" << std::setw(8) << timingPerModule["RoadSearchTrackCandidateMaker"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0214 subtotaltimepermodule += timingPerModule["RoadSearchTrackCandidateMaker"];
0215 cumulativetimepermodule += timingPerModule["RoadSearchTrackCandidateMaker"];
0216
0217
0218
0219
0220
0221 std::cout << " - " << std::setw(40) << "TrackProducer" << std::setw(30) << "" << std::setw(8) << timingPerModule["TrackProducer"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0222 subtotaltimepermodule += timingPerModule["TrackProducer"];
0223 cumulativetimepermodule += timingPerModule["TrackProducer"];
0224
0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237 std::cout << " - " << std::setw(40) << "PixelClusterSelectorTopBottom" << std::setw(30) << "" << std::setw(8) << timingPerModule["PixelClusterSelectorTopBottom"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0238 subtotaltimepermodule += timingPerModule["PixelClusterSelectorTopBottom"];
0239 cumulativetimepermodule += timingPerModule["PixelClusterSelectorTopBottom"];
0240
0241
0242
0243
0244 std::cout << " - " << std::setw(40) << "SiPixelRecHitConverter" << std::setw(30) << "" << std::setw(8) << timingPerLabel["SiPixelRecHitConverter:siPixelRecHitsTop"]/((double)nbofevts-1.)
0245 +timingPerLabel["SiPixelRecHitConverter:siPixelRecHitsBottom"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0246 subtotaltimepermodule += timingPerLabel["SiPixelRecHitConverter:siPixelRecHitsTop"];
0247 subtotaltimepermodule += timingPerLabel["SiPixelRecHitConverter:siPixelRecHitsBottom"];
0248 cumulativetimepermodule += timingPerLabel["SiPixelRecHitConverter:siPixelRecHitsTop"];
0249 cumulativetimepermodule += timingPerLabel["SiPixelRecHitConverter:siPixelRecHitsBottom"];
0250
0251
0252
0253
0254 std::cout << " - " << std::setw(40) << "StripClusterSelectorTopBottom" << std::setw(30) << "" << std::setw(8) << timingPerModule["StripClusterSelectorTopBottom"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0255 subtotaltimepermodule += timingPerModule["StripClusterSelectorTopBottom"];
0256 cumulativetimepermodule += timingPerModule["StripClusterSelectorTopBottom"];
0257
0258
0259
0260
0261 std::cout << " - " << std::setw(40) << "SiStripRecHitConverter" << std::setw(30) << "" << std::setw(8) << timingPerLabel["SiStripRecHitConverter:siStripMatchedRecHitsTop"]/((double)nbofevts-1.)
0262 +timingPerLabel["SiStripRecHitConverter:siStripMatchedRecHitsBottom"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0263 subtotaltimepermodule += timingPerLabel["SiStripRecHitConverter:siStripMatchedRecHitsTop"];
0264 subtotaltimepermodule += timingPerLabel["SiStripRecHitConverter:siStripMatchedRecHitsBottom"];
0265 cumulativetimepermodule += timingPerLabel["SiStripRecHitConverter:siStripMatchedRecHitsTop"];
0266 cumulativetimepermodule += timingPerLabel["SiStripRecHitConverter:siStripMatchedRecHitsBottom"];
0267
0268
0269
0270
0271 std::cout << " - " << std::setw(40) << "TopBottomClusterInfoProducer" << std::setw(30) << "" << std::setw(8) << timingPerModule["TopBottomClusterInfoProducer"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0272 subtotaltimepermodule += timingPerModule["TopBottomClusterInfoProducer"];
0273 cumulativetimepermodule += timingPerModule["TopBottomClusterInfoProducer"];
0274
0275
0276
0277 std::cout << " - " << std::setw(40) << "DeDxEstimatorProducer" << std::setw(30) << "" << std::setw(8) << timingPerModule["DeDxEstimatorProducer"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0278 subtotaltimepermodule += timingPerModule["DeDxEstimatorProducer"];
0279 cumulativetimepermodule += timingPerModule["DeDxEstimatorProducer"];
0280
0281
0282
0283
0284 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0285 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;
0286
0287
0288 std::cout << "2. Data quality monitoring : " << std::endl;
0289
0290 std::cout << " 2.1 DQM common modules " << std::endl;
0291 std::cout << " 2.1.1 : Quality tests " << std::endl;
0292 subtotaltimepermodule = 0;
0293 std::cout << " - " << std::setw(40) << "" << std::setw(30) << "" << std::setw(8) << timingPerModule["QualityTester"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0294 subtotaltimepermodule += timingPerModule["QualityTester"];
0295 cumulativetimepermodule += timingPerModule["QualityTester"];
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 std::cout << " 2.1.2 : DQM playback environment " << std::endl;
0302 subtotaltimepermodule = 0;
0303 std::cout << " - " << std::setw(40) << "DQMEventInfo" << std::setw(30) << "" << std::setw(8) << timingPerLabel["DQMEventInfo:dqmEnv"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0304 subtotaltimepermodule += timingPerLabel["DQMEventInfo:dqmEnv"];
0305 cumulativetimepermodule += timingPerLabel["DQMEventInfo:dqmEnv"];
0306
0307
0308
0309 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0310 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;
0311 std::cout << " 2.1.3 : DQM playback for Tracking info " << std::endl;
0312 subtotaltimepermodule = 0;
0313 std::cout << " - " << std::setw(40) << "DQMEventInfo" << std::setw(30) << "" << std::setw(8) << timingPerLabel["DQMEventInfo:dqmEnvTr"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0314 subtotaltimepermodule += timingPerLabel["DQMEventInfo:dqmEnvTr"];
0315 cumulativetimepermodule += timingPerLabel["DQMEventInfo:dqmEnvTr"];
0316
0317
0318
0319 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0320 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;
0321 std::cout << " 2.1.4 : DQM file saver " << std::endl;
0322 subtotaltimepermodule = 0;
0323 std::cout << " - " << std::setw(40) << "DQMFileSaver" << std::setw(30) << "" << std::setw(8) << timingPerModule["DQMFileSaver"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0324 subtotaltimepermodule += timingPerModule["DQMFileSaver"];
0325 cumulativetimepermodule += timingPerModule["DQMFileSaver"];
0326
0327
0328
0329 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0330 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;
0331
0332 std::cout << " 2.2 DQM monitor " << std::endl;
0333 std::cout << " 2.2.1 : SiStripMonitor " << std::endl;
0334 subtotaltimepermodule = 0;
0335 std::cout << " - " << std::setw(40) << "SiStripFEDMonitorPlugin" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiStripFEDMonitorPlugin"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0336 subtotaltimepermodule += timingPerModule["SiStripFEDMonitorPlugin"];
0337 cumulativetimepermodule += timingPerModule["SiStripFEDMonitorPlugin"];
0338
0339
0340
0341 std::cout << " - " << std::setw(40) << "SiStripMonitorDigi" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiStripMonitorDigi"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0342 subtotaltimepermodule += timingPerModule["SiStripMonitorDigi"];
0343 cumulativetimepermodule += timingPerModule["SiStripMonitorDigi"];
0344
0345
0346
0347 std::cout << " - " << std::setw(40) << "SiStripMonitorCluster" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiStripMonitorCluster"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0348 subtotaltimepermodule += timingPerModule["SiStripMonitorCluster"];
0349 cumulativetimepermodule += timingPerModule["SiStripMonitorCluster"];
0350
0351
0352
0353 std::cout << " - " << std::setw(40) << "SiStripMonitorTrack" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiStripMonitorTrack"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0354 subtotaltimepermodule += timingPerModule["SiStripMonitorTrack"];
0355 cumulativetimepermodule += timingPerModule["SiStripMonitorTrack"];
0356
0357
0358
0359 std::cout << " - " << std::setw(40) << "MonitorTrackResiduals" << std::setw(30) << "" << std::setw(8) << timingPerModule["MonitorTrackResiduals"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0360 subtotaltimepermodule += timingPerModule["MonitorTrackResiduals"];
0361 cumulativetimepermodule += timingPerModule["MonitorTrackResiduals"];
0362
0363
0364
0365 std::cout << " - " << std::setw(40) << "TrackingMonitor" << std::setw(30) << "" << std::setw(8) << timingPerModule["TrackingMonitor"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0366 subtotaltimepermodule += timingPerModule["TrackingMonitor"];
0367 cumulativetimepermodule += timingPerModule["TrackingMonitor"];
0368
0369
0370
0371 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0372 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;
0373 std::cout << " 2.2.2 : SiStripAnalyser " << std::endl;
0374 subtotaltimepermodule = 0;
0375 std::cout << " - " << std::setw(40) << "SiStripAnalyser" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiStripAnalyser"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0376 subtotaltimepermodule += timingPerModule["SiStripAnalyser"];
0377 cumulativetimepermodule += timingPerModule["SiStripAnalyser"];
0378
0379
0380
0381 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0382 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;
0383
0384 std::cout << " 2.2.3 : Miscellaneous " << std::endl;
0385 subtotaltimepermodule = 0;
0386 std::cout << " - " << std::setw(40) << "TriggerResultInserter" << std::setw(30) << "" << std::setw(8) << timingPerModule["TriggerResultInserter"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0387 subtotaltimepermodule += timingPerModule["TriggerResultInserter"];
0388 cumulativetimepermodule += timingPerModule["TriggerResultInserter"];
0389
0390
0391
0392 std::cout << " " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0393 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;
0394
0395 std::cout << "Total nb of events read = " << nbofevts << std::endl;
0396 std::cout << "Total time = " << totalTime << " ms/event " << std::endl;
0397
0398 std::map<unsigned,double>::const_iterator eventIt = timingPerEvent.begin();
0399 std::map<unsigned,double>::const_iterator eventEnd = timingPerEvent.end();
0400 double minEv = 99999999.;
0401 double maxEv = 0.;
0402 double rms = 0.;
0403 double mean = 0.;
0404 double timeEv = 0;
0405 for ( ; eventIt != eventEnd; ++eventIt ) {
0406 if ( eventIt->first == 1 ) continue;
0407 timeEv = eventIt->second;
0408
0409 if ( timeEv > maxEv ) maxEv = timeEv;
0410 if ( timeEv < minEv ) minEv = timeEv;
0411 mean += timeEv;
0412 rms += timeEv*timeEv;
0413 }
0414
0415 mean /= ((double)nbofevts-1.);
0416 rms /= ((double)nbofevts-1.);
0417 rms = std::sqrt(rms-mean*mean);
0418 std::cout << "Total time = " << mean << " +/- " << rms << " ms/event" << std::endl;
0419 std::cout << "Min. time = " << minEv << " ms/event" << std::endl;
0420 std::cout << "Max. time = " << maxEv << " ms/event" << std::endl;
0421 }
0422