Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

RunModule.h File Reference

#include <iostream>
#include <string>
#include <vector>
#include "PhysicsNtuple/AlgSnarl.h"
#include "PhysicsNtuple/DataBlock.h"
#include "PhysicsNtuple/StreamBuf.h"

Go to the source code of this file.

Namespaces

namespace  Anp

Classes

class  Anp::RunModule

Functions

void PrintStopWatch (double realt, double cput)


Function Documentation

void Anp::PrintStopWatch double  realt,
double  cput
 

Definition at line 737 of file RunModule.cxx.

References min.

Referenced by Anp::RunModule::RunChain().

00738 {
00739    const int hours = static_cast<int>(realt/3600.0);
00740    const int  min  = static_cast<int>(realt/60.0) - 60*hours;
00741 
00742    realt -= hours * 3600;
00743    realt -= min * 60;
00744 
00745    if (realt < 0) realt = 0;
00746    if (cput  < 0) cput  = 0;
00747 
00748    const int sec = static_cast<int>(realt);
00749 
00750    cout << "Real time " << setw(2) << setfill('0') << hours 
00751         << ":" << setw(2) << setfill('0') << min
00752         << ":" << setw(2) << setfill('0') << sec
00753         << " CPU time " << setprecision(3) << fixed << cput << endl;
00754 }


Generated on Mon Feb 15 11:08:11 2010 for loon by  doxygen 1.3.9.1