CfgObserver Class Reference

#include <CfgObserver.h>

Inheritance diagram for CfgObserver:

CkovDParam DCTimeFitter DCTimeFitter EVDChamOption EVDCKOVOption EVDECalOption EVDRBTrack3D EVDRICHOption EVDTOFOption EVDTPCOption EVDTriggerOption EVDTrkDisplayOption EVDTrkRBOption JobCModule MCConfig MCIModule OMShiftHistView RICHExample RunConfig StartUpOptions StartUpOptions SwimDrift TestObs TestObserver List of all members.

Public Member Functions

virtual ~CfgObserver ()
 Defines the interface for CfgConfig clients.
virtual void Update (const CfgConfig &c)=0
void RemoveWatch (const char *config)
void RemoveAllWatches ()
void SetWatch (const char *config, const char *version="default")

Detailed Description

Definition at line 13 of file CfgObserver.h.


Constructor & Destructor Documentation

CfgObserver::~CfgObserver (  )  [virtual]

Defines the interface for CfgConfig clients.

Definition at line 15 of file CfgObserver.cxx.

References RemoveAllWatches().

00015 { this->RemoveAllWatches(); }


Member Function Documentation

void CfgObserver::RemoveAllWatches (  ) 

Definition at line 29 of file CfgObserver.cxx.

References CfgTable::Instance(), and CfgTable::RemoveAllWatches().

Referenced by ~CfgObserver().

00030 {
00031 //======================================================================
00032 // Remove all watches set by this observer
00033 //======================================================================
00034   CfgTable::Instance().RemoveAllWatches(this);
00035 }

void CfgObserver::RemoveWatch ( const char *  config  ) 

Definition at line 19 of file CfgObserver.cxx.

References CfgTable::Instance(), and CfgTable::RemoveWatch().

Referenced by JobCModule::SetCfgVersion().

00020 {
00021 //======================================================================
00022 // Remove this observer from the list of clients of config
00023 //======================================================================
00024   CfgTable::Instance().RemoveWatch(config,this);
00025 }

void CfgObserver::SetWatch ( const char *  config,
const char *  version = "default" 
)

Definition at line 39 of file CfgObserver.cxx.

References CfgTable::GetConfig(), CfgTable::Instance(), CfgException::Print(), CfgTable::SetWatch(), and Update().

Referenced by CkovDParam::CkovDParam(), CkovSThruStudy::CkovSThruStudy(), DCTimeFitter::DCTimeFitter(), EVDChamOption::EVDChamOption(), EVDCKOVOption::EVDCKOVOption(), EVDECalOption::EVDECalOption(), EVDRBTrack3D::EVDRBTrack3D(), EVDRICHOption::EVDRICHOption(), EVDTOFOption::EVDTOFOption(), EVDTPCOption::EVDTPCOption(), EVDTriggerOption::EVDTriggerOption(), EVDTrkDisplayOption::EVDTrkDisplayOption(), EVDTrkRBOption::EVDTrkRBOption(), main(), MCConfig::MCConfig(), MCIDoDigi::MCIDoDigi(), MCIDoKine::MCIDoKine(), MCIStoreHits::MCIStoreHits(), OMShiftHistView::OMShiftHistView(), RICHExample::RICHExample(), RunConfig::RunConfig(), JobCModule::SetCfgVersion(), StartUpOptions::StartUpOptions(), SwimDrift::SwimDrift(), TestObs::TestObs(), and TestObserver::TestObserver().

00040 {
00041 //======================================================================
00042 // Set a watch for the named version of the configuration config
00043 //======================================================================
00044   // Set the new watch
00045   CfgTable::Instance().SetWatch(config, version, this);
00046 
00047   // Trigger the first update
00048   CfgConfig* c = CfgTable::Instance().GetConfig(config, version);
00049   if (c) try { this->Update(*c); }
00050   catch (CfgException e) { 
00051     std::cout << " *-> " << config << "." << version << " ";
00052     e.Print(); 
00053     exit(-1);
00054   }
00055 }

virtual void CfgObserver::Update ( const CfgConfig c  )  [pure virtual]

Implemented in AlignBC, AlignChamW0, AlignChamZ, AlignChamZNoBF, AlignRotB, AlignTPCDrift, AlignTPCDrift2, AlProject56, BCDigitizer, BCkovCalib, BCkovPlot, BCkovReco, BCReco, BeamMCloss, BeamMomCalc, BeamSwimMC, CalDigitizer, DCTimeCalib, DCTimeFitter, MWPCBadWireSearch, ChamDigitizer, ChamLinkTest, CkovDigi, CkovDigitizer, CkovDParam, CkovSThruStudy, CkovMatchTrk, CkovPedCalculator, CkovTdcCalib, TestObserver, TestObs, RunConfig, RICHExample, DCDigitizer, DCTimeCalib, DCTimeFitter, DebugPrint, DemoModule, FillEventSummary, MCIDoDigi, MCIDoKine, MCIModule, MCIStoreHits, EMCalPass2, EMCalPedCalib, EMCalReco, EMCalSeg456, EVDChamOption, EVDCKOVOption, EVDECalOption, EVDRBTrack3D, EVDRICHOption, EVDTOFOption, EVDTPCOption, EVDTriggerOption, EVDTrkDisplayOption, EVDTrkRBOption, StartUpOptions, RICHReco, ModuleA, ModuleB, TPCdEdx, TPCPass1, TPCPass2, KalmanReco, KalmanRefit, KMassAlignNtuple, KMassAna, KMassContour, KMassEventFilter, KMassHits, KMassLiteNtuple, KMassNtuple, KMassSegNtuple, KMassSplitRing, MirFrac, MCMatch, MWPCDigitizer, MWPCBadWireSearch, OMShiftHistView, RecoAnalysis, RICHDigitizer, RICHCal, RICHChan, RICHCircComp, RICHCircFit, RICHMatch, RICHRadFit, RICHReco, RICHSeedFit, RICHTrkMatch, ScintDigitizer, ScintPedCalc, _MODULE_, SPFit, SPFitTrkComp, SPSegAssn, SPTrkBuilder, SwimDrift, T0Calib, T0Reco, TOFDigitizer, BeamTOF, TOFFindBadChan, TOFPedCalc, TOFTReco, TOFWallCalib, TPCDigitizer, TPCR2DClusterFind, TPCRAnodeCalib, TPCRdEdxCalib, TPCRDriftCalib, TPCRHitFind, TPCRPid, TPCRTrackFind, TPCDigiGain, TPCGainAnalysis, TPCRdEdxStudies, TPCBadChannel, TrackReco, TrackBeamPart, TrackEffCham, TrackFitRes, TrackProjector, TrackSegComp, TrackStudies, TrackTDrift, TrkCheckBC, TrigBTOFana, TrigCalibration, TrigDoCalib, TrigDoT0, TrigLatchSelect, TrigPlot, TrigReco, CkovBeamPID, NuMITrigStudy, ScinteractionPlots, Trk456Ana, TrkCandBuilder, TrkChamT0, TrkMakeClust, TrkMakeCross, TrkSegBuilder, TrkSegFitter, TrkWireFilter, Merge, UtilMemCheck, VFinder, VtxConFit, VtxDAFit, StartUpOptions, and MCConfig.

Referenced by SetWatch().


The documentation for this class was generated from the following files:
Generated on Mon Nov 23 08:04:00 2009 for MIPP(E907) by  doxygen 1.4.7