CDFMonitoringModule Class Reference

#include <CDFMonitoringModule.h>

Inheritance diagram for CDFMonitoringModule:
JobCModule

List of all members.

Public Member Functions

 CDFMonitoringModule ()
 ~CDFMonitoringModule ()
void BeginJob ()
void EndJob ()
void BeginFile ()
void EndFile ()
JobCResult Ana (const MomNavigator *mom)
const RegistryDefaultConfig () const

Static Public Attributes

static const int default_port = 9050
static const char * default_folder = "Monitoring"
static const int default_refresh = 1

Private Attributes

CDFMonitoringModuleImpfImp

Detailed Description

Definition at line 44 of file CDFMonitoringModule.h.


Constructor & Destructor Documentation

CDFMonitoringModule::CDFMonitoringModule (  ) 

Definition at line 145 of file CDFMonitoringModule.cxx.

References fImp.

00146     : fImp(0)
00147 {
00148     fImp = new CDFMonitoringModuleImp(9050,"Monitoring",1);
00149 }

CDFMonitoringModule::~CDFMonitoringModule (  ) 

Definition at line 150 of file CDFMonitoringModule.cxx.

References fImp.

00151 {
00152     if (fImp) delete fImp; fImp=0;
00153 }


Member Function Documentation

JobCResult CDFMonitoringModule::Ana ( const MomNavigator mom  )  [virtual]

Implement this for read only access to the MomNavigator

Reimplemented from JobCModule.

Definition at line 202 of file CDFMonitoringModule.cxx.

References fImp, JobCResult::kAOK, Msg::kError, JobCResult::kError, MSG, and CDFMonitoringModuleImp::Update().

00203 {
00204   gStyle->SetAxisColor(1, "xyz");
00205 gStyle->SetCanvasColor(0);
00206 gStyle->SetFrameFillColor(0);
00207 gStyle->SetFrameLineColor(1);
00208 gStyle->SetHistFillColor(0);
00209 gStyle->SetHistLineColor(1);
00210 gStyle->SetPadColor(1);
00211 gStyle->SetStatColor(0);
00212 gStyle->SetStatTextColor(1);
00213 gStyle->SetTitleColor(1);
00214 gStyle->SetTitleTextColor(1);
00215 gStyle->SetLabelColor(1,"xyz");
00216  gStyle->SetTitleOffset(1.2,"y"); 
00217 gStyle->SetOptStat(1110);
00218 gROOT->ForceStyle();
00219 
00220 
00221     if (!fImp) {
00222         MSG("BD",Msg::kError)
00223             << "No implementation! Ana() called w/out a BeginJob()\n";
00224         return JobCResult::kError;
00225     }
00226     fImp->Update();
00227     //spew(mom);
00228     return JobCResult::kAOK;
00229 }

void CDFMonitoringModule::BeginFile (  )  [virtual]

Implement for notification of begin of file. See GetCurrentFile().

Reimplemented from JobCModule.

Definition at line 180 of file CDFMonitoringModule.cxx.

References Msg::kInfo, and MSG.

00181 {
00182     MSG("BD",Msg::kInfo)
00183         << "Begin file" << endl;
00184 }

void CDFMonitoringModule::BeginJob ( void   )  [virtual]

Implement for notification of begin of job

Reimplemented from JobCModule.

Definition at line 155 of file CDFMonitoringModule.cxx.

References default_folder, default_port, default_refresh, fImp, Registry::Get(), JobCModule::GetConfig(), Msg::kDebug, MSG, and port.

00156 {
00157     return;
00158 
00159     int port = default_port, refresh = default_refresh;
00160     const char* folder = default_folder;
00161 
00162     Registry& cfg = this->GetConfig();
00163     cfg.Get("port",port);
00164     cfg.Get("refresh",refresh);
00165     cfg.Get("folder",folder);
00166 
00167     if (fImp) delete fImp;
00168     fImp = new CDFMonitoringModuleImp(port,folder,refresh);
00169     MSG("BD",Msg::kDebug) << "Created connection to port " << port
00170                           << " using path \"" << folder << "\"\n";
00171 
00172 }

const Registry & CDFMonitoringModule::DefaultConfig ( void   )  const [virtual]

Get the default configuration registry. This should normally be overridden. One useful idiom is to implement it like:

const Registry& MyModule::DefaultConfig() const { static Registry cfg; // never is destroyed if (cfg.Size()) return cfg; // already filled it // set defaults: cfg.Set("TheAnswer",42); cfg.Set("Units","unknown"); return cfg; }

Reimplemented from JobCModule.

Definition at line 230 of file CDFMonitoringModule.cxx.

References default_folder, default_port, default_refresh, Registry::Set(), and Registry::Size().

00231 {
00232     static Registry cfg;
00233     if (cfg.Size() == 0) {
00234         cfg.Set("port",default_port);
00235         cfg.Set("refresh",default_refresh);
00236         cfg.Set("folder",default_folder);
00237     }
00238     return cfg;
00239 }

void CDFMonitoringModule::EndFile (  )  [virtual]

Implement for notification of end of file. See GetLastFile().

Reimplemented from JobCModule.

Definition at line 186 of file CDFMonitoringModule.cxx.

References Msg::kInfo, and MSG.

00187 {
00188     MSG("BD",Msg::kInfo)
00189         << "End file" << endl;
00190 }

void CDFMonitoringModule::EndJob (  )  [virtual]

Implement for notification of end of job

Reimplemented from JobCModule.

Definition at line 173 of file CDFMonitoringModule.cxx.

References fImp, Msg::kDebug, and MSG.

00174 {
00175     MSG("BD",Msg::kDebug)
00176         << "EndJob" << endl;
00177     if (fImp) delete fImp; fImp = 0;
00178 }


Member Data Documentation

const char * CDFMonitoringModule::default_folder = "Monitoring" [static]

Definition at line 48 of file CDFMonitoringModule.h.

Referenced by BeginJob(), and DefaultConfig().

const int CDFMonitoringModule::default_port = 9050 [static]

Definition at line 47 of file CDFMonitoringModule.h.

Referenced by BeginJob(), and DefaultConfig().

const int CDFMonitoringModule::default_refresh = 1 [static]

Definition at line 49 of file CDFMonitoringModule.h.

Referenced by BeginJob(), and DefaultConfig().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1