/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

MiniDryRunTimeCorrection.cc
Go to the documentation of this file.
00001 #include "DataSvc/MiniDryRunTimeCorrection.h"
00002 #include "stdlib.h"
00003 #include <iostream>
00004 
00005 using namespace std;
00006 
00007 TimeStamp MiniDryRunTimeCorrection(int run)
00008 {
00009   static int       runNum[15];
00010   static TimeStamp deltaT[14];
00012   static int       startRun, endRun; 
00013   static TimeStamp dT;
00014 
00015   static bool first = true;
00016 
00017   if( first )  {
00018     first = false;
00021     runNum[0]  = 421;   deltaT[0]  =  TimeStamp( 2009,12,24,11,14,42 ) - TimeStamp( 943938037, 478707925 );
00022     runNum[1]  = 440;   deltaT[1]  =  TimeStamp( 2009,12,25,16,45, 6 ) - TimeStamp( 943938010, 997504500 );
00023     runNum[2]  = 467;   deltaT[2]  =  TimeStamp( 2009,12,26,14,34,21 ) - TimeStamp( 943938063, 64185575  );
00024     runNum[3]  = 473;   deltaT[3]  =  TimeStamp( 2009,12,28,14,32, 9 ) - TimeStamp( 943938009, 826974225 );
00025     runNum[4]  = 492;   deltaT[4]  =  TimeStamp( 2009,12,30,17,29,27 ) - TimeStamp( 943938051, 702563262 );
00026     runNum[5]  = 505;   deltaT[5]  =  TimeStamp( 2009,12,31,15,40, 6 ) - TimeStamp( 943938016, 505901825 );
00027     runNum[6]  = 522;   deltaT[6]  =  TimeStamp( 2010, 1, 2,10,34,18 ) - TimeStamp( 943938020, 144773387 );
00028     runNum[7]  = 538;   deltaT[7]  =  TimeStamp( 2010, 1, 3, 9,46,41 ) - TimeStamp( 943938114, 375387087 );
00029     runNum[8]  = 687;   deltaT[8]  =  TimeStamp( 2010, 1, 5,15,36,44 ) - TimeStamp( 943939104, 677039837 );
00030     runNum[9]  = 766;   deltaT[9]  =  TimeStamp( 2010, 1, 7, 9,34,25 ) - TimeStamp( 943938007, 941984512 );
00031     runNum[10] = 867;   deltaT[10] =  TimeStamp( 2010, 1, 8,10,34,43 ) - TimeStamp( 943938118, 595102062 );
00032     runNum[11] = 962;   deltaT[11] =  TimeStamp( 2010, 1, 9, 9,36,13 ) - TimeStamp( 943938009, 499588975 );
00033     runNum[12] = 971;   deltaT[12] =  TimeStamp( 2010, 1,10, 9,39,45 ) - TimeStamp( 943938036, 914706437 );
00034     runNum[13] = 1061;  deltaT[13] =  TimeStamp( 2010, 1,11,12,55,51 ) - TimeStamp( 943938016, 739907900 );
00035     runNum[14] = 1070;
00036 
00037     startRun = runNum[0];
00038     endRun = runNum[0+1] - 1;
00039     dT = deltaT[0];
00040   }
00041 
00042   if( run>=startRun && run <=endRun )  {
00043     return dT;
00044   } else {
00045     for( int i=0; i<=13; ++i ) {
00046       if( run>=runNum[i] && run<runNum[i+1] )  {
00047         startRun = runNum[i];
00048         endRun = runNum[i+1] - 1;
00049         dT = deltaT[i];
00050         return dT;
00051       }
00052     }
00053   }
00054   
00056   return TimeStamp(0,0);
00057 
00058 }
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:59:23 for DataSvc by doxygen 1.7.4