TRootanaEventLoop.cxx File Reference

#include "TRootanaEventLoop.hxx"
#include "XmlOdb.h"
#include "TPeriodicClass.hxx"
#include "MainWindow.hxx"
#include <TSystem.h>
#include <TROOT.h>
#include <TH1D.h>
#include <stdio.h>
#include <sys/time.h>
#include <iostream>
#include <assert.h>
#include <signal.h>
Include dependency graph for TRootanaEventLoop.cxx:

Go to the source code of this file.

Functions

void PrintCurrentStats ()

Variables

struct timeval raLastTime
 Little function for printing the number of processed events and processing rate.
int raTotalEventsProcessed = 0
int raTotalEventsSkippedForAge = 0
bool gUseOnlyRecent

Function Documentation

void PrintCurrentStats (  ) 

Definition at line 39 of file TRootanaEventLoop.cxx.

References gUseOnlyRecent, raLastTime, raTotalEventsProcessed, and raTotalEventsSkippedForAge.

Referenced by TRootanaEventLoop::ProcessMidasFile().

00039                         {
00040 
00041   if((raTotalEventsProcessed%500)==0){
00042     if(raTotalEventsProcessed==0){
00043       gettimeofday(&raLastTime, NULL);
00044     }else{
00045 
00046       struct timeval nowTime;  
00047       gettimeofday(&nowTime, NULL);
00048       
00049       double dtime = nowTime.tv_sec - raLastTime.tv_sec + (nowTime.tv_usec - raLastTime.tv_usec)/1000000.0;
00050       double rate = 0;
00051       if (time !=0)
00052         rate = 500.0/(dtime);
00053       printf("Processed %d events.  Analysis rate = %f events/seconds. \n",raTotalEventsProcessed,rate);
00054       gettimeofday(&raLastTime, NULL);
00055 
00056       if(gUseOnlyRecent){
00057         printf("Skipped %i events that were too old (>1sec old) out of %i events\n",
00058                raTotalEventsSkippedForAge, raTotalEventsSkippedForAge+raTotalEventsProcessed);
00059       }
00060     }
00061   }
00062   
00063   raTotalEventsProcessed++;
00064 
00065 }

Here is the caller graph for this function:


Variable Documentation

struct timeval raLastTime

Little function for printing the number of processed events and processing rate.

Definition at line 32 of file TRootanaEventLoop.cxx.

Referenced by PrintCurrentStats().

Definition at line 33 of file TRootanaEventLoop.cxx.

Referenced by PrintCurrentStats(), and TRootanaEventLoop::ProcessMidasFile().

Definition at line 34 of file TRootanaEventLoop.cxx.

Referenced by PrintCurrentStats(), and TRootanaEventLoop::ProcessMidasFile().


Generated on 12 Feb 2016 for ROOT Analyzer by  doxygen 1.6.1