FillDataModule Class Reference

#include <FillDataModule.h>

Inheritance diagram for FillDataModule:
JobCModule

List of all members.

Public Member Functions

 FillDataModule ()
virtual ~FillDataModule ()
JobCResult Reco (MomNavigator *mom)
void Config (const Registry &reg)
void BeginJob ()
void EndJob ()

Private Attributes

Anp::InterfacefInterface
unsigned int fNRecord
unsigned int fNPass
unsigned int fNFail
Registry fConfig
TStopwatch fTimer

Detailed Description

Definition at line 18 of file FillDataModule.h.


Constructor & Destructor Documentation

FillDataModule::FillDataModule (  ) 

Definition at line 21 of file FillDataModule.cxx.

00022    :fInterface(new Anp::Interface()),
00023     fNRecord(0),
00024     fNPass(0),
00025     fNFail(0),
00026     fConfig(false)
00027 {
00028 }

FillDataModule::~FillDataModule (  )  [virtual]

Definition at line 31 of file FillDataModule.cxx.

References fInterface, fNFail, fNPass, Msg::kDebug, and MSG.

00032 {
00033    MSG("FillAlg", Msg::kDebug) 
00034       << endl
00035       << "**************************************************" << std::endl
00036       << "    FillDataModule" << std::endl
00037       << "      Number of passed records " << fNPass << std::endl
00038       << "      Number of failed records " << fNFail << std::endl
00039       << "**************************************************" << std::endl;
00040 
00041    if(fInterface)
00042    {       
00043       delete fInterface;
00044       fInterface = 0;
00045    }
00046 }


Member Function Documentation

void FillDataModule::BeginJob ( void   )  [virtual]

Implement for notification of begin of job

Reimplemented from JobCModule.

Definition at line 87 of file FillDataModule.cxx.

References Config(), fConfig, fInterface, fTimer, Msg::kVerbose, and MSG.

00088 {
00089    MSG("FillAlg", Msg::kVerbose) << "FillDataModule::BeginJob()..." << std::endl;
00090 
00091    if(fInterface) fInterface -> Config(fConfig);
00092 
00093    fTimer.Start();
00094 }

void FillDataModule::Config ( const Registry r  )  [virtual]

Return the actual configuration. If your module directly pulls its configuration from the fConfig Registry, you don't need to override this. Override if you have local config variables.

Reimplemented from JobCModule.

Definition at line 73 of file FillDataModule.cxx.

References fConfig, Msg::kVerbose, Registry::LockValues(), Registry::Merge(), MSG, and Registry::UnLockValues().

Referenced by BeginJob().

00074 {
00075    //
00076    // Configure interface
00077    //
00078 
00079    MSG("FillAlg", Msg::kVerbose) << "FillDataModule::Config()" << std::endl;
00080 
00081    fConfig.UnLockValues();
00082    fConfig.Merge(reg);
00083    fConfig.LockValues();
00084 }

void FillDataModule::EndJob (  )  [virtual]

Implement for notification of end of job

Reimplemented from JobCModule.

Definition at line 97 of file FillDataModule.cxx.

References fInterface, Msg::kVerbose, and MSG.

00098 {
00099    MSG("FillAlg", Msg::kVerbose) << "FillDataModule::EndJob()..." << std::endl;
00100 
00101    if(fInterface)
00102    {       
00103       delete fInterface;
00104       fInterface = 0;
00105    }
00106 }

JobCResult FillDataModule::Reco ( MomNavigator mom  )  [virtual]

Implement this for read-write access to the MomNavigator

Reimplemented from JobCModule.

Definition at line 49 of file FillDataModule.cxx.

References fInterface, fNFail, fNPass, fNRecord, fTimer, and JobCResult::kAOK.

00050 {
00051    if(fInterface && fInterface -> FillSnarl(mom))
00052    {
00053       ++fNPass;
00054    }
00055    else
00056    {
00057       ++fNFail;
00058    }
00059 
00060    if(fNRecord++ % 20000 == 0)
00061    {
00062       cout << "Record # " << std::setfill(' ') << std::right << std::setw(8) << fNRecord << "  ";
00063       fTimer.Stop();
00064       fTimer.Print();
00065       fTimer.Reset();
00066       fTimer.Start();
00067    }
00068    
00069    return JobCResult::kAOK;
00070 }


Member Data Documentation

Reimplemented from JobCModule.

Definition at line 41 of file FillDataModule.h.

Referenced by BeginJob(), and Config().

Definition at line 34 of file FillDataModule.h.

Referenced by BeginJob(), EndJob(), Reco(), and ~FillDataModule().

unsigned int FillDataModule::fNFail [private]

Definition at line 39 of file FillDataModule.h.

Referenced by Reco(), and ~FillDataModule().

unsigned int FillDataModule::fNPass [private]

Definition at line 38 of file FillDataModule.h.

Referenced by Reco(), and ~FillDataModule().

unsigned int FillDataModule::fNRecord [private]

Definition at line 36 of file FillDataModule.h.

Referenced by Reco().

TStopwatch FillDataModule::fTimer [private]

Definition at line 42 of file FillDataModule.h.

Referenced by BeginJob(), and Reco().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1