NeardetBeamSelect Class Reference

#include <NeardetBeamSelect.h>

Inheritance diagram for NeardetBeamSelect:
JobCModule

List of all members.

Public Member Functions

 NeardetBeamSelect ()
 ~NeardetBeamSelect ()
JobCResult Ana (const MomNavigator *mom)
const RegistryDefaultConfig () const
void Config (const Registry &r)

Detailed Description

Definition at line 19 of file NeardetBeamSelect.h.


Constructor & Destructor Documentation

NeardetBeamSelect::NeardetBeamSelect (  ) 

Definition at line 31 of file NeardetBeamSelect.cxx.

00032 {
00033 }

NeardetBeamSelect::~NeardetBeamSelect (  ) 

Definition at line 37 of file NeardetBeamSelect.cxx.

00038 {
00039 }


Member Function Documentation

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

Implement this for read only access to the MomNavigator

Select candidate beam events. Return kPassed for Spill (SGATE) triggered events, kFailed otherwise.

Reimplemented from JobCModule.

Definition at line 43 of file NeardetBeamSelect.cxx.

References RawDaqSnarlHeader::GetTrigSrc(), header, JobCResult::kFailed, JobCResult::kPassed, and TRIGGER_BIT_SPILL.

00044 {
00050 
00051   const RawDaqSnarlHeader* header = 
00052     DataUtil::GetRawHeader<RawDaqSnarlHeader>(mom);
00053 
00054   if(!header) return JobCResult::kFailed;
00055   
00056   // Look at trigger.
00057   Int_t trigger  = header->GetTrigSrc();
00058 
00059   if((trigger & TRIGGER_BIT_SPILL)>0) {
00060     return JobCResult::kPassed;
00061   }
00062   
00063   return JobCResult::kFailed;
00064 }

void NeardetBeamSelect::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 89 of file NeardetBeamSelect.cxx.

00090 {
00091   //======================================================================
00092   // Configure the module given the Registry r
00093   //======================================================================
00094 }

const Registry & NeardetBeamSelect::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 68 of file NeardetBeamSelect.cxx.

References JobCModule::GetName(), Registry::LockValues(), and Registry::UnLockValues().

00069 {
00070   //======================================================================
00071   // Supply the default configuration for the module
00072   //======================================================================
00073   static Registry r; // Default configuration for module
00074 
00075   // Set name of config
00076   std::string name = this->GetName();
00077   name += ".config.default";
00078   r.SetName(name.c_str());
00079 
00080   // Set values in configuration
00081   r.UnLockValues();
00082   r.LockValues();
00083 
00084   return r;
00085 }


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1