dbu.cc File Reference

#include <cstdlib>
#include "DatabaseInterface/DbiTableProxyRegistry.h"
#include "JobControl/JobController.h"
#include "JobControl/JobCEnv.h"
#include "DatabaseUpdater/DbuSignalHandler.h"
#include "OnlineUtil/msgLogLib/msgLog.h"
#include "OnlineUtil/minosDaq.h"
#include <iostream>

Go to the source code of this file.

Defines

#define PRINTMSGLOG   0
#define DEBUGMSGLOGLEVEL   1

Functions

int main (int argc, char **argv)

Define Documentation

#define DEBUGMSGLOGLEVEL   1

Referenced by main().

#define PRINTMSGLOG   0

Referenced by main().


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 30 of file dbu.cc.

References DEBUGMSGLOGLEVEL, MuELoss::e, DbuSignalHandler::HandleDelayedSignal(), DbuSignalHandler::Instance(), JobCEnv::Instance(), logDebugLevelSet(), logNotice(), MINOS_ONLINE_DBU, msgLogCleanup(), msgLogInit(), msgLogLocalEchoSet(), msgLogNodeIdSet(), PRINTMSGLOG, and JobCEnv::RunRootApp().

00031 {
00032   // we're not free to define/parse command options as this will be
00033   // handled by JobControl, so currently there's no command line
00034   // way of configuring the msgLog service.
00035 //#define MSGLOG_VERBOSE
00036 #ifdef MSGLOG_VERBOSE
00037   #define PRINTMSGLOG 1
00038   #define DEBUGMSGLOGLEVEL 100
00039 #else
00040   #define PRINTMSGLOG 0
00041   #define DEBUGMSGLOGLEVEL 1
00042 #endif
00043 
00044   int echoMsgLog = PRINTMSGLOG;
00045   int debugMsgLogLevel = DEBUGMSGLOGLEVEL;
00046 
00047   msgLogInit(argv[0]);
00048   msgLogNodeIdSet(MINOS_ONLINE_DBU);
00049   msgLogLocalEchoSet(echoMsgLog);
00050   logDebugLevelSet(debugMsgLogLevel);
00051   logNotice("starting %s",argv[0]);
00052   
00053 
00054   JobCEnv& e = JobCEnv::Instance(argc, argv);
00055 
00056   // get the signal handlers installed
00057   DbuSignalHandler::Instance().HandleDelayedSignal();
00058 
00059   // New style CINT interface
00060   int exit_status = EXIT_FAILURE;
00061   if (e.RunRootApp()) {
00062     logNotice("dbu shutdown (success)");
00063     exit_status = EXIT_SUCCESS;
00064   }
00065   else {
00066     logNotice("dbu shutdown (failure)");
00067     exit_status = EXIT_FAILURE;
00068   }
00069   msgLogCleanup();
00070   return exit_status;
00071 
00072 }


Generated on 15 Jul 2018 for loon by  doxygen 1.6.1