Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

FillDataModule Class Reference

#include <FillDataModule.h>

Inheritance diagram for FillDataModule:

JobCModule List of all members.

Public Member Functions

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

Private Attributes

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

Constructor & Destructor Documentation

FillDataModule::FillDataModule  ) 
 

Definition at line 21 of file FillDataModule.cxx.

References fTimer.

00022    :fInterface(new Anp::Interface()),
00023     fNRecord(0),
00024     fNPass(0),
00025     fNFail(0)
00026 {
00027    fTimer.Start();
00028 }

FillDataModule::~FillDataModule  )  [virtual]
 

Definition at line 31 of file FillDataModule.cxx.

References fInterface, fNFail, fNPass, 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  )  [virtual]
 

Implement for notification of begin of job

Reimplemented from JobCModule.

Definition at line 81 of file FillDataModule.cxx.

References Config(), fConfig, fInterface, and MSG.

00082 {
00083    MSG("FillAlg", Msg::kVerbose) << "FillDataModule::BeginJob()..." << std::endl;
00084 
00085    fInterface -> Config(fConfig);
00086 }

void FillDataModule::Config const Registry reg  )  [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, Registry::LockValues(), Registry::Merge(), and Registry::UnLockValues().

Referenced by BeginJob().

00074 {
00075    fConfig.UnLockValues();
00076    fConfig.Merge(reg);
00077    fConfig.LockValues();
00078 }

void FillDataModule::EndJob  )  [virtual]
 

Implement for notification of end of job

Reimplemented from JobCModule.

Definition at line 89 of file FillDataModule.cxx.

References fInterface, and MSG.

00090 {
00091    MSG("FillAlg", Msg::kVerbose) << "FillDataModule::EndJob()..." << std::endl;
00092 
00093    if(fInterface)
00094    {       
00095       delete fInterface;
00096       fInterface = 0;
00097    }
00098 }

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, fNRecord, and fTimer.

00050 {
00051    if(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(7) << fNRecord << "  ";
00063       fTimer.Stop();
00064       fTimer.Print();
00065       fTimer.Reset();
00066       fTimer.Start();
00067    }
00068 
00069    return JobCResult::kAOK;
00070 }


Member Data Documentation

Registry FillDataModule::fConfig [private]
 

Reimplemented from JobCModule.

Definition at line 42 of file FillDataModule.h.

Referenced by BeginJob(), and Config().

Anp::Interface* FillDataModule::fInterface [private]
 

Definition at line 35 of file FillDataModule.h.

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

unsigned int FillDataModule::fNFail [private]
 

Definition at line 40 of file FillDataModule.h.

Referenced by ~FillDataModule().

unsigned int FillDataModule::fNPass [private]
 

Definition at line 39 of file FillDataModule.h.

Referenced by ~FillDataModule().

unsigned int FillDataModule::fNRecord [private]
 

Definition at line 37 of file FillDataModule.h.

Referenced by Reco().

TStopwatch FillDataModule::fTimer [private]
 

Definition at line 44 of file FillDataModule.h.

Referenced by FillDataModule(), and Reco().


The documentation for this class was generated from the following files:
Generated on Fri Mar 28 16:00:48 2008 for loon by  doxygen 1.3.9.1