• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

onlinemonitor/epicsmonitor/TEpicsAnalysis.cxx (r4864/r3724)

Go to the documentation of this file.
00001 
00002 
00003 #include "TEpicsAnalysis.h"
00004 
00005 #include <stdlib.h>
00006 #include "TGo4Version.h"
00007 #include "TGo4Log.h"
00008 
00009 #include "Go4EventServer.h"
00010 #include "TGo4StepFactory.h"
00011 #include "TGo4AnalysisStep.h"
00012 
00013 
00014 //***********************************************************
00015 TEpicsAnalysis::TEpicsAnalysis()
00016 {
00017 }
00018 //***********************************************************
00019 
00020 // this constructor is called by go4analysis executable
00021 TEpicsAnalysis::TEpicsAnalysis(int argc, char** argv) :
00022    TGo4Analysis(argc, argv)
00023 {
00024    if (!TGo4Version::CheckVersion(__GO4BUILDVERSION__)) {
00025       TGo4Log::Error("Go4 version mismatch");
00026       exit(-1);
00027    }
00028 
00029    TGo4Log::Info("Create TEpicsAnalysis name: %s", argv[0]);
00030 
00031    TGo4StepFactory* factory = new TGo4StepFactory("Factory");
00032    factory->DefEventProcessor("EpicsProc","TEpicsProc");// object name, class name
00033    factory->DefOutputEvent("EPICS","TEpicsEvent"); // object name, class name
00034    // TODO? factory->DefUserEventSource("TEpicsSource"); // object name, class name
00035 
00036    TGo4EventSourceParameter* sourcepar = new TGo4MbsFileParameter(Form("%s/data/test.lmd",getenv("GO4SYS")));
00037    TGo4FileStoreParameter* storepar = new TGo4FileStoreParameter(Form("%sOutput", argv[0]));
00038    storepar->SetOverwriteMode(kTRUE);
00039 
00040    TGo4AnalysisStep* step = new TGo4AnalysisStep("EPICS", factory, sourcepar, storepar);
00041 
00042    step->SetSourceEnabled(kTRUE);
00043    step->SetStoreEnabled(kFALSE);
00044    step->SetProcessEnabled(kTRUE);
00045    step->SetErrorStopEnabled(kTRUE);
00046 
00047    // Now the first analysis step is set up.
00048    // Other steps could be created here
00049    AddAnalysisStep(step);
00050 
00051    // uncomment following line to define custom passwords for analysis server
00052    // DefineServerPasswords("CernOct11admin", "CernOct11ctrl", "CernOct11view");
00053 
00054 }
00055 
00056 //***********************************************************
00057 TEpicsAnalysis::~TEpicsAnalysis()
00058 {
00059    TGo4Log::Info("TEpicsAnalysis: Delete instance");
00060 }
00061 

Generated on Tue Dec 10 2013 04:52:23 for ROCsoft by  doxygen 1.7.1