FiltCosmicModule Class Reference

#include <FiltCosmicModule.h>

Inheritance diagram for FiltCosmicModule:
JobCModule

List of all members.

Public Member Functions

 FiltCosmicModule ()
 ~FiltCosmicModule ()
void BeginJob ()
void EndJob ()
void BeginFile ()
void EndFile ()
void BeginRun ()
void EndRun ()
JobCResult Ana (const MomNavigator *mom)
JobCResult Reco (MomNavigator *mom)
void Report ()
void Reset ()
void HandleCommand (JobCommand *c)

Detailed Description

Id
FiltCosmicModule.h,v 1.1 2008/09/17 02:56:19 tjyang Exp

(Document me!)

Definition at line 13 of file FiltCosmicModule.h.


Constructor & Destructor Documentation

FiltCosmicModule::FiltCosmicModule (  ) 

(Document me!)

Definition at line 27 of file FiltCosmicModule.cxx.

00028 {
00032 
00033 }

FiltCosmicModule::~FiltCosmicModule (  ) 

(Document me!)

Definition at line 36 of file FiltCosmicModule.cxx.

00037 {
00041 }


Member Function Documentation

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

Implement this for read only access to the MomNavigator

Reimplemented from JobCModule.

Definition at line 99 of file FiltCosmicModule.cxx.

References CandRecord::FindCandHandle(), CandHandle::GetDaughterIterator(), MomNavigator::GetFragment(), RecMinos::GetHeader(), CandHeader::GetRun(), CandHeader::GetSnarl(), header, Msg::kDebug, Msg::kError, JobCResult::kFailed, JobCResult::kPassed, and MSG.

00100 {
00101   JobCResult result = JobCResult::kFailed;
00102 
00103   CandRecord *record = dynamic_cast<CandRecord *>(mom->GetFragment("CandRecord", "PrimaryCandidateRecord"));
00104  
00105   if (record == 0) {
00106     MSG("Filt",Msg::kError) << "No PrimaryCandidateRecord CandRecord found." << endl;
00107     return result;
00108   }
00109 
00110   const CandHeader* header  = dynamic_cast<const CandHeader*>(record->GetHeader());
00111   if(header){
00112     MSG("Filt",Msg::kDebug) << " Run/Snarl: " << header->GetRun() << " / "<< header->GetSnarl() <<endl;
00113   }
00114 
00115   const CandEventListHandle * eventlist = dynamic_cast<CandEventListHandle*>(record->FindCandHandle("CandEventListHandle")); 
00116 
00117   if (eventlist==NULL) {
00118     MSG("Filt",Msg::kDebug) << " Bailing out of Event eventlist = " << eventlist << endl;
00119     return result;
00120   }
00121 
00122   TIter event_iter(eventlist->GetDaughterIterator());
00123 
00124   // for cosmic ray, we only test the first event of the snarl
00125   const CandEventHandle* event = dynamic_cast<const CandEventHandle*>(event_iter());  
00126   
00127   if (event == NULL) {
00128     MSG("Filt",Msg::kDebug) << " Bailing out of Event = " << event << endl;
00129     return result;
00130   } else {
00131     MSG("Filt",Msg::kDebug) << " New event " <<endl;
00132   
00133     const int nshowers = event->GetLastShower() + 1;
00134     const int ntracks = event->GetLastTrack() + 1;
00135 
00136     MSG("Filt",Msg::kDebug) << " ntrack : " << ntracks << " nshower : " << nshowers << endl;
00137 
00138     if (nshowers<1 || ntracks<1) {
00139       return result; 
00140     } else {
00141       MSG("Filt",Msg::kDebug) << "event passed" << endl;
00142       result = JobCResult::kPassed; 
00143     }
00144   }
00145   return result;
00146 }

void FiltCosmicModule::BeginFile (  )  [virtual]

Implement for notification of begin of file. See GetCurrentFile().

(Document me!)

Reimplemented from JobCModule.

Definition at line 63 of file FiltCosmicModule.cxx.

00064 {
00068 }

void FiltCosmicModule::BeginJob ( void   )  [virtual]

Implement for notification of begin of job

(Document me!)

Reimplemented from JobCModule.

Definition at line 45 of file FiltCosmicModule.cxx.

00046 {
00050 }

void FiltCosmicModule::BeginRun (  )  [virtual]

Implement for notification of begin of run (meaningful for Daq data only). See GetCurrentRun().

(Document me!)

Reimplemented from JobCModule.

Definition at line 81 of file FiltCosmicModule.cxx.

00082 {
00086 }

void FiltCosmicModule::EndFile (  )  [virtual]

Implement for notification of end of file. See GetLastFile().

(Document me!)

Reimplemented from JobCModule.

Definition at line 72 of file FiltCosmicModule.cxx.

00073 {
00077 }

void FiltCosmicModule::EndJob (  )  [virtual]

Implement for notification of end of job

(Document me!)

Reimplemented from JobCModule.

Definition at line 54 of file FiltCosmicModule.cxx.

00055 {
00059 }

void FiltCosmicModule::EndRun (  )  [virtual]

Implement for notification of end of run (meaningful for Daq data only). See GetLastRun().

(Document me!)

Reimplemented from JobCModule.

Definition at line 90 of file FiltCosmicModule.cxx.

00091 {
00095 }

void FiltCosmicModule::HandleCommand ( JobCommand command  )  [virtual]

Implement to handle a JobCommand

(Document me!)

Reimplemented from JobCModule.

Definition at line 178 of file FiltCosmicModule.cxx.

00179 {
00183 }

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

Implement this for read-write access to the MomNavigator

(Document me!)

Reimplemented from JobCModule.

Definition at line 150 of file FiltCosmicModule.cxx.

References JobCResult::kPassed.

00151 {
00155   return JobCResult::kPassed; // kNoDecision, kFailed, etc.
00156 }

void FiltCosmicModule::Report (  )  [virtual]

Implement to spew end of running report

(Document me!)

Reimplemented from JobCModule.

Definition at line 160 of file FiltCosmicModule.cxx.

00161 {
00165 }

void FiltCosmicModule::Reset (  )  [virtual]

Implement to reset oneself

(Document me!)

Reimplemented from JobCModule.

Definition at line 169 of file FiltCosmicModule.cxx.

00170 {
00174 }


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1