Back to home page

Project CMSSW displayed by LXR

 
 

    


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   //std::string file = "TimingInfo.txt";
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   // If the machine is busy, the factor is not 100%.
0022   double factor = 0.995;
0023 
0024   if ( myTimingFile ) {
0025     while ( !myTimingFile.eof() ) { 
0026       myTimingFile >> dummy1 >> evt >> idummy1 >> label >> module >> timing ;
0027       // std::cout << evt << " " << module << " " << timing << std::endl;
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   std::cout << "================= " << std::endl;
0077   std::cout << "Timing per label  " << std::endl;
0078   std::cout << "================= " << std::endl;
0079   totalTime = 0.;
0080   i = 1;
0081   for ( ; timeIt2 != timeEnd2; ++timeIt2 ) {
0082 
0083     totalTime += timeIt2->first;
0084     std::cout << std::setw(3) << i++ 
0085           << std::setw(100) << timeIt2->second << " : " 
0086           << std::setw(7) << std::setprecision(3) << timeIt2-> first << " ms/event"
0087           << std::endl;
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             - newSeedFromTriplets
0157             - newSeedFromPairs
0158             - secTriplets
0159             - thPLSeeds
0160             - fourthPLSeeds
0161             - fifthSeeds
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             - newTrackCandidateMaker
0168             - secTrackCandidates
0169             - thTrackCandidates
0170             - fourthTrackCandidates
0171             - fifthTrackCandidates
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             - preFilterZeroStepTracks
0178             - preFilterStepOneTracks
0179             - secWithMaterialTracks
0180             - thWithMaterialTracks
0181             - fourthWithMaterialTracks
0182             - fifthWithMaterialTracks
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             - zeroStepWithLooseQuality
0189             - zeroStepWithTightQuality
0190             - zeroStepTracksWithQuality
0191             - firstStepWithLooseQuality
0192             - firstStepWithTightQuality
0193             - preMergingFirstStepTracksWithQuality
0194             - secStepVtxLoose
0195             - secStepTrkLoose
0196             - secStepVtxTight
0197             - secStepTrkTight
0198             - secStepVtx
0199             - secStepTrk
0200             - thStepVtxLoose
0201             - thStepTrkLoose
0202             - thStepVtxTight
0203             - thStepTrkTight
0204             - thStepVtx
0205             - thStepTrk
0206             - pixellessStepLoose
0207             - pixellessStepTight
0208             - pixellessStep
0209             - tobtecStepLoose
0210             - tobtecStepTight
0211             - tobtecStep
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             - zeroStepFilter
0218             - firstfilter
0219             - secfilter
0220             - thfilter
0221             - fourthfilter
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             - newClusters
0228             - secClusters
0229             - thClusters
0230             - fourthClusters
0231             - fifthClusters
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             - newPixelRecHits
0250             - secPixelRecHits
0251             - thPixelRecHits
0252             - fourthPixelRecHits
0253             - fifthPixelRecHits
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             - newStripRecHits
0272             - secStripRecHits
0273             - thStripRecHits
0274             - fourthStripRecHits
0275             - fifthStripRecHits
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             - merge2nd3rdTracks
0282             - merge4th5thTracks
0283             - iterTracks
0284             - generalTracks
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             - newCombinedSeeds
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             - dedxMedian
0297             - dedxHarmonic2
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) << "" << 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             - qTester
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             - dqmEnv
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   std::cout << "        2.1.3 : DQM playback for Tracking info " << std::endl;
0327   subtotaltimepermodule  = 0;
0328   std::cout << "        - " << std::setw(40) << "DQMEventInfo" << std::setw(30) << "" << std::setw(8) << timingPerLabel["DQMEventInfo:dqmEnvTr"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0329   subtotaltimepermodule   += timingPerLabel["DQMEventInfo:dqmEnvTr"];
0330   cumulativetimepermodule += timingPerLabel["DQMEventInfo:dqmEnvTr"];
0331 /*
0332             - dqmEnvTr
0333 */
0334   std::cout << "          " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0335   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;
0336   std::cout << "        2.1.4 : 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             - dqmSaver
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 monitor " << std::endl;
0348   std::cout << "        2.2.1 : SiStripMonitor " << std::endl;
0349   subtotaltimepermodule  = 0;
0350   std::cout << "        - " << std::setw(40) << "SiStripFEDMonitorPlugin" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiStripFEDMonitorPlugin"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0351   subtotaltimepermodule   += timingPerModule["SiStripFEDMonitorPlugin"];
0352   cumulativetimepermodule += timingPerModule["SiStripFEDMonitorPlugin"];
0353 /*
0354             - siStripFEDMonitor
0355 */
0356   std::cout << "        - " << std::setw(40) << "SiStripMonitorDigi" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiStripMonitorDigi"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0357   subtotaltimepermodule   += timingPerModule["SiStripMonitorDigi"];
0358   cumulativetimepermodule += timingPerModule["SiStripMonitorDigi"];
0359 /*
0360             - SiStripMonitorDigi
0361 */
0362   std::cout << "        - " << std::setw(40) << "SiStripMonitorCluster" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiStripMonitorCluster"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0363   subtotaltimepermodule   += timingPerModule["SiStripMonitorCluster"];
0364   cumulativetimepermodule += timingPerModule["SiStripMonitorCluster"];
0365 /*
0366             - SiStripMonitorClusterReal
0367 */
0368   std::cout << "        - " << std::setw(40) << "SiStripMonitorTrack" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiStripMonitorTrack"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0369   subtotaltimepermodule   += timingPerModule["SiStripMonitorTrack"];
0370   cumulativetimepermodule += timingPerModule["SiStripMonitorTrack"];
0371 /*
0372             - SiStripMonitorTrack_gentk
0373 */
0374   std::cout << "        - " << std::setw(40) << "MonitorTrackResiduals" << std::setw(30) << "" << std::setw(8) << timingPerModule["MonitorTrackResiduals"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0375   subtotaltimepermodule   += timingPerModule["MonitorTrackResiduals"];
0376   cumulativetimepermodule += timingPerModule["MonitorTrackResiduals"];
0377 /*
0378             - MonitorTrackResiduals_gentk
0379 */
0380   std::cout << "        - " << std::setw(40) << "TrackingMonitor" << std::setw(30) << "" << std::setw(8) << timingPerModule["TrackingMonitor"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0381   subtotaltimepermodule   += timingPerModule["TrackingMonitor"];
0382   cumulativetimepermodule += timingPerModule["TrackingMonitor"];
0383 /*
0384             - TrackMon_gentk
0385 */
0386   std::cout << "          " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0387   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;
0388   std::cout << "        2.2.2 : SiStripAnalyser " << std::endl;
0389   subtotaltimepermodule  = 0;
0390   std::cout << "        - " << std::setw(40) << "SiStripAnalyser" << std::setw(30) << "" << std::setw(8) << timingPerModule["SiStripAnalyser"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0391   subtotaltimepermodule   += timingPerModule["SiStripAnalyser"];
0392   cumulativetimepermodule += timingPerModule["SiStripAnalyser"];
0393 /*
0394             - SiStripAnalyser
0395 */
0396   std::cout << "          " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0397   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;
0398 
0399   std::cout << "        2.2.3 : Miscellaneous " << std::endl;
0400   subtotaltimepermodule  = 0;
0401   std::cout << "        - " << std::setw(40) << "TriggerResultInserter" << std::setw(30) << "" << std::setw(8) << timingPerModule["TriggerResultInserter"]/((double)nbofevts-1.) << " ms/event" << std::endl;
0402   subtotaltimepermodule   += timingPerModule["TriggerResultInserter"];
0403   cumulativetimepermodule += timingPerModule["TriggerResultInserter"];
0404 /*
0405             - TriggerResults
0406 */
0407   std::cout << "          " << std::setw(70) << "" << std::setw(8) << "--------" << std::endl;
0408   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;
0409 
0410   std::cout << "Total nb of events read = " << nbofevts << std::endl;
0411   std::cout << "Total time = " << totalTime << " ms/event " << std::endl;
0412 
0413   std::map<unsigned,double>::const_iterator eventIt = timingPerEvent.begin();
0414   std::map<unsigned,double>::const_iterator eventEnd = timingPerEvent.end();
0415   double minEv = 99999999.;
0416   double maxEv = 0.;
0417   double rms = 0.;
0418   double mean = 0.;
0419   double timeEv = 0;
0420   for ( ; eventIt != eventEnd; ++eventIt ) { 
0421     if ( eventIt->first == 1 ) continue;
0422     timeEv = eventIt->second;
0423     //std::cout << "Evt nr : " << eventIt->first << " / " << timeEv << " ms" << std::endl;
0424     if ( timeEv > maxEv ) maxEv = timeEv;
0425     if ( timeEv < minEv ) minEv = timeEv;
0426     mean += timeEv;
0427     rms  += timeEv*timeEv;    
0428   }
0429 
0430   mean /= ((double)nbofevts-1.);
0431   rms  /= ((double)nbofevts-1.);
0432   rms = std::sqrt(rms-mean*mean);
0433   std::cout << "Total time = " << mean << " +/- " << rms << " ms/event" << std::endl;
0434   std::cout << "Min.  time = " << minEv << " ms/event" << std::endl;
0435   std::cout << "Max.  time = " << maxEv << " ms/event" << std::endl;
0436 }
0437