Fork me on GitHub

Changeset 1182 in svn


Ignore:
Timestamp:
Jul 4, 2013, 2:10:42 PM (11 years ago)
Author:
Pavel Demin
Message:

add stop watches

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/readers/DelphesProMC.cpp

    r1172 r1182  
    3737//---------------------------------------------------------------------------
    3838
    39 void ConvertInput(ProMCEvent &event, ExRootTreeBranch *branch, DelphesFactory *factory, TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray)
     39void ConvertInput(ProMCEvent &event, ExRootTreeBranch *branch, DelphesFactory *factory,
     40  TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray,
     41  TStopwatch *readStopWatch, TStopwatch *procStopWatch)
    4042{
    4143  Int_t i;
     
    7880  element->PDF2 = mutableEvent->pdf2();
    7981
    80   element->ReadTime = 0.0;
    81   element->ProcTime = 0.0;
     82  element->ReadTime = readStopWatch->RealTime();
     83  element->ProcTime = procStopWatch->RealTime();
    8284
    8385  mutableParticles = event.mutable_particles();
     
    144146  ProMCBook *inputFile = 0;
    145147  TFile *outputFile = 0;
     148  TStopwatch readStopWatch, procStopWatch;
    146149  ExRootTreeWriter *treeWriter = 0;
    147150  ExRootTreeBranch *branchEvent = 0;
     
    219222      modularDelphes->Clear();
    220223      treeWriter->Clear();
     224      readStopWatch.Start();
    221225      for(entry = 0; entry < allEntries && !interrupted; ++entry)
    222226      {
     
    224228        ProMCEvent event = inputFile->get();
    225229
    226         ConvertInput(event, branchEvent, factory, allParticleOutputArray, stableParticleOutputArray, partonOutputArray);
     230        readStopWatch.Stop();
     231
     232        procStopWatch.Start();
     233        ConvertInput(event, branchEvent, factory,
     234          allParticleOutputArray, stableParticleOutputArray, partonOutputArray,
     235          &readStopWatch, &procStopWatch);
    227236        modularDelphes->ProcessTask();
     237        procStopWatch.Stop();
    228238
    229239        treeWriter->Fill();
     
    232242        treeWriter->Clear();
    233243
     244        readStopWatch.Start();
    234245        progressBar.Update(entry);
    235246      }
Note: See TracChangeset for help on using the changeset viewer.