HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Typedefs | Enumerations | Functions | Variables
dbharpo.cxx File Reference
#include "HarpoDB.h"
#include "HarpoDBrunconfig.h"
#include "TXMLFile.h"
#include "TString.h"
#include "TSystem.h"
#include <iostream>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <libgen.h>

Go to the source code of this file.

Typedefs

typedef enum DBACTIONS_ DBACTIONS
 
typedef dbResults::size_type dbResSize
 

Enumerations

enum  DBACTIONS_ {
  RNONE, RSTART, REND, RRUN,
  RLAST, RGEN, RQUALITY
}
 

Functions

void help ()
 Print Usage and exit. More...
 
dbResSize RunningList (dbResults &run_list)
 Get list of runs marked us Running in DB. More...
 
void ReadConfig (HarpoDBRow &rinfo)
 
void StartRun (long int r)
 Mark Run us running @ date and Fill other fiels from configuration files. More...
 
void RunDone (long int r)
 
void EndRun (long int r)
 Mark run us finished and update Duration. More...
 
void GetRunning ()
 Get list of runs marked us Running in DB. More...
 
void GetLastRun ()
 Query Max Run Number in DB table. More...
 
void SetConfig (const char *file)
 Set Configuration File Name. More...
 
void GenConfig (long int r)
 Genarate Configuration File ( run template ) More...
 
void SetRunQuality (long int r, const char *qstr)
 Set Run Quqlity String. More...
 
int main (int argc, char **argv)
 Program start. More...
 

Variables

static const char *const short_options = "hvDnc:s:e:rlg::Q:"
 
static const struct option long_options []
 
static TString * ProgramName
 
static TString * CfgFileName
 
static int Verbose = 0
 
static int Debug = 0
 

Typedef Documentation

typedef enum DBACTIONS_ DBACTIONS
typedef dbResults::size_type dbResSize

Definition at line 64 of file dbharpo.cxx.

Enumeration Type Documentation

enum DBACTIONS_
Enumerator
RNONE 
RSTART 
REND 
RRUN 
RLAST 
RGEN 
RQUALITY 

Definition at line 18 of file dbharpo.cxx.

Function Documentation

void EndRun ( long int  r)

Mark run us finished and update Duration.

Definition at line 194 of file dbharpo.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void GenConfig ( long int  r)

Genarate Configuration File ( run template )

Definition at line 276 of file dbharpo.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void GetLastRun ( )

Query Max Run Number in DB table.

Definition at line 238 of file dbharpo.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void GetRunning ( )

Get list of runs marked us Running in DB.

Definition at line 216 of file dbharpo.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void help ( )

Print Usage and exit.

Definition at line 44 of file dbharpo.cxx.

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Program start.

Definition at line 356 of file dbharpo.cxx.

Here is the call graph for this function:

void ReadConfig ( HarpoDBRow rinfo)

Definition at line 86 of file dbharpo.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void RunDone ( long int  r)

Really mark run as finshed in DB

Todo:
Merge RunDone and SetQuality

Definition at line 153 of file dbharpo.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

dbResSize RunningList ( dbResults run_list)

Get list of runs marked us Running in DB.

Definition at line 67 of file dbharpo.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void SetConfig ( const char *  file)

Set Configuration File Name.

Definition at line 268 of file dbharpo.cxx.

Here is the caller graph for this function:

void SetRunQuality ( long int  r,
const char *  qstr 
)

Set Run Quqlity String.

Definition at line 317 of file dbharpo.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void StartRun ( long int  r)

Mark Run us running @ date and Fill other fiels from configuration files.

Definition at line 108 of file dbharpo.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

TString* CfgFileName
static

Definition at line 39 of file dbharpo.cxx.

int Debug = 0
static

Definition at line 41 of file dbharpo.cxx.

const struct option long_options[]
static
Initial value:
= {
{ "help", 0, NULL, 'h' },
{ "verbose", 0, NULL, 'v' },
{ "debug", 0, NULL, 'D' },
{ "dry-run", 0, NULL, 'n' },
{ "startrun", 1, NULL, 's' },
{ "endrun", 1, NULL, 'e' },
{ "running", 0, NULL, 'r' },
{ "lastrun", 0, NULL, 'l' },
{ "config", 1, NULL, 'c' },
{ "generate",2,NULL,'g' },
{ "runquality",1,NULL,'Q' },
{ NULL, 0, NULL, 0 }
}

Definition at line 23 of file dbharpo.cxx.

TString* ProgramName
static

Definition at line 38 of file dbharpo.cxx.

const char* const short_options = "hvDnc:s:e:rlg::Q:"
static

Definition at line 21 of file dbharpo.cxx.

int Verbose = 0
static

Definition at line 40 of file dbharpo.cxx.