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

jobc::Module Class Reference

Base class for a basic unit of reconstruction and analysis code. More...

#include <Module.h>

Inheritance diagram for jobc::Module:

cfg::Observer calhit::CalHit cluster::Clusterer demo::Module mcchk::GenCheck ModuleA ModuleB novamc::NOVAMC photrans::SimpleTransport RICHReco rpr::FindTrackSeg rpr::TrackReco rsim::ReadoutSim spider::SpiderWeb subshower::RecoSubShower2D subshower::RecoSubShower3D TPCdEdx TPCPass1 TPCPass2 List of all members.

Public Member Functions

 Module (const char *name)
virtual ~Module ()
virtual Result Reco (edm::EventHandle &evt)
virtual Result Ana (const edm::EventHandle &evt)
virtual void NewFile (const char *filename)
virtual void EndFile (const char *filename)
virtual void NewRun (int run, int subrun)
virtual void EndRun (int run, int subrun)
virtual void NewSubrun (int run, int subrun)
virtual void EndSubrun (int run, int subrun)
virtual void CheckInit ()
virtual void Reset ()
virtual void Report ()
const char * Name () const
const char * Version () const
void SetCfgVersion (const char *cfgv)

Protected Attributes

std::string fName
 Name of module.

std::string fCfgVersion
 Version of configuration in use.

bool fIsInit
 Init to false constructor.


Detailed Description

Base class for a basic unit of reconstruction and analysis code.

Definition at line 30 of file fmwk/JobControl/Module.h.


Constructor & Destructor Documentation

Module::Module const char *  name  ) 
 

Reimplemented in demo::Module.

Definition at line 11 of file fmwk/JobControl/Module.cxx.

00011                                 :
00012   fName      ( name  ),
00013   fCfgVersion( ""    ),
00014   fIsInit    ( false )
00015 { }

virtual jobc::Module::~Module  )  [inline, virtual]
 

Reimplemented in demo::Module.

Definition at line 33 of file fmwk/JobControl/Module.h.

00033 { }


Member Function Documentation

Result Module::Ana const edm::EventHandle evt  )  [virtual]
 

Reimplemented in demo::Module, mcchk::GenCheck, subshower::RecoSubShower2D, subshower::RecoSubShower3D, RICHReco, ModuleA, ModuleB, TPCdEdx, TPCPass1, and TPCPass2.

Definition at line 30 of file fmwk/JobControl/Module.cxx.

References assert_jobc, fName, and jobc::Result.

Referenced by jobc::Node::Exec().

00031 {
00032   char msg[256];
00033   sprintf(msg, "Calling default %s::Ana()", fName.c_str());
00034   assert_jobc(0, msg);
00035   return kPassed;
00036 }

void Module::CheckInit  )  [virtual]
 

Definition at line 69 of file fmwk/JobControl/Module.cxx.

References fCfgVersion, fIsInit, and fName.

00070 {
00071   if (fIsInit) return;
00072   std::cout << "Module " << fName << "/" << fCfgVersion
00073        << " is not initialized. Stopping the job." << std::endl;
00074   exit(-1);
00075 }

void Module::EndFile const char *  filename  )  [virtual]
 

Reimplemented in RICHReco, TPCdEdx, TPCPass1, and TPCPass2.

Definition at line 39 of file fmwk/JobControl/Module.cxx.

Referenced by jobc::Sequence::EndFile().

00039 { }

void Module::EndRun int  run,
int  subrun
[virtual]
 

Reimplemented in RICHReco, TPCdEdx, TPCPass1, and TPCPass2.

Definition at line 41 of file fmwk/JobControl/Module.cxx.

Referenced by jobc::Sequence::EndRun().

00041 { }

void Module::EndSubrun int  run,
int  subrun
[virtual]
 

Reimplemented in RICHReco, TPCdEdx, TPCPass1, and TPCPass2.

Definition at line 43 of file fmwk/JobControl/Module.cxx.

Referenced by jobc::Sequence::EndSubrun().

00043 { }

const char* jobc::Module::Name  )  const [inline]
 

Definition at line 58 of file fmwk/JobControl/Module.h.

References fName.

00058 { return fName.c_str();       }

void Module::NewFile const char *  filename  )  [virtual]
 

Reimplemented in RICHReco, TPCdEdx, TPCPass1, and TPCPass2.

Definition at line 38 of file fmwk/JobControl/Module.cxx.

Referenced by jobc::Sequence::NewFile().

00038 { }

void Module::NewRun int  run,
int  subrun
[virtual]
 

Reimplemented in RICHReco, TPCdEdx, TPCPass1, and TPCPass2.

Definition at line 40 of file fmwk/JobControl/Module.cxx.

Referenced by jobc::Sequence::NewRun().

00040 { }

void Module::NewSubrun int  run,
int  subrun
[virtual]
 

Reimplemented in RICHReco, TPCdEdx, TPCPass1, and TPCPass2.

Definition at line 42 of file fmwk/JobControl/Module.cxx.

Referenced by jobc::Sequence::NewSubrun().

00042 { }

Result Module::Reco edm::EventHandle evt  )  [virtual]
 

Reimplemented in calhit::CalHit, cluster::Clusterer, demo::Module, novamc::NOVAMC, photrans::SimpleTransport, rsim::ReadoutSim, rpr::FindTrackSeg, rpr::TrackReco, subshower::RecoSubShower2D, subshower::RecoSubShower3D, spider::SpiderWeb, RICHReco, ModuleA, ModuleB, TPCdEdx, TPCPass1, and TPCPass2.

Definition at line 19 of file fmwk/JobControl/Module.cxx.

References assert_jobc, fName, and jobc::Result.

Referenced by jobc::Node::Exec().

00019                                               { 
00020   char msg[256];
00021   sprintf(msg, "Calling default %s::Reco()", fName.c_str());
00022 
00023   assert_jobc(0, msg);
00024 
00025   return kPassed;
00026 }

void Module::Report  )  [virtual]
 

Definition at line 62 of file fmwk/JobControl/Module.cxx.

References fName.

00063 {
00064   std::cout << fName << ": Nothing to report." << std::endl;
00065 }

void Module::Reset  )  [virtual]
 

Definition at line 47 of file fmwk/JobControl/Module.cxx.

References SetCfgVersion().

Referenced by novamc::NOVAMC::Reco().

00047 { this->SetCfgVersion("default"); }

void Module::SetCfgVersion const char *  cfgv  ) 
 

Definition at line 51 of file fmwk/JobControl/Module.cxx.

References fCfgVersion, fName, cfg::Observer::RemoveWatch(), and cfg::Observer::SetWatch().

Referenced by calhit::CalHit::CalHit(), rpr::FindTrackSeg::FindTrackSeg(), mcchk::GenCheck::GenCheck(), demo::Module::Module(), ModuleA::ModuleA(), ModuleB::ModuleB(), calhit::MyHit::MyHit(), novamc::NOVAMC::NOVAMC(), subshower::RecoSubShower2D::RecoSubShower2D(), subshower::RecoSubShower3D::RecoSubShower3D(), Reset(), RICHReco::RICHReco(), photrans::SimpleTransport::SimpleTransport(), TPCdEdx::TPCdEdx(), TPCPass1::TPCPass1(), TPCPass2::TPCPass2(), and rpr::TrackReco::TrackReco().

00052 {
00053   if (fCfgVersion == cfgv) return; // Nothing to do...
00054   this->RemoveWatch(fCfgVersion.c_str());
00055   fCfgVersion = cfgv;
00056   this->SetWatch(fName.c_str(), fCfgVersion.c_str());
00057   // std::cerr << "Set watch for " << this->Name() << cfgv << std::endl;
00058 }

const char* jobc::Module::Version  )  const [inline]
 

Definition at line 59 of file fmwk/JobControl/Module.h.

References fCfgVersion.

00059 { return fCfgVersion.c_str(); }


Member Data Documentation

std::string jobc::Module::fCfgVersion [protected]
 

Version of configuration in use.

Definition at line 65 of file fmwk/JobControl/Module.h.

Referenced by CheckInit(), SetCfgVersion(), and Version().

bool jobc::Module::fIsInit [protected]
 

Init to false constructor.

Definition at line 66 of file fmwk/JobControl/Module.h.

Referenced by CheckInit().

std::string jobc::Module::fName [protected]
 

Name of module.

Definition at line 64 of file fmwk/JobControl/Module.h.

Referenced by Ana(), CheckInit(), Name(), Reco(), Report(), and SetCfgVersion().


The documentation for this class was generated from the following files:
Generated on Thu Jul 24 12:01:17 2008 for NOvA Offline by doxygen 1.3.5