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

jobc::Stack Class Reference

The list of jobs to be executed when the program runs. More...

#include <Stack.h>

List of all members.

Public Member Functions

void AdoptJob (Job *j)
void CleanUp ()
void Exec (edm::EventHandle &e)
void PrintAll ()
void Run ()
void RunOne ()

Static Public Member Functions

StackInstance ()

Private Attributes

std::list< Job * > fJobStack
 List of jobs to be run.


Static Private Attributes

StackfInstance = 0
 The sole instance.


Detailed Description

The list of jobs to be executed when the program runs.

Definition at line 14 of file JobControl/Stack.h.


Member Function Documentation

void Stack::AdoptJob Job j  ) 
 

Definition at line 57 of file Stack.cxx.

References fJobStack.

00057 { fJobStack.push_back(j); }

void Stack::CleanUp  ) 
 

Definition at line 32 of file Stack.cxx.

References fJobStack.

00033 {
00034   std::list<Job*>::iterator itr(fJobStack.begin());
00035   std::list<Job*>::iterator itrEnd(fJobStack.end());
00036   for (; itr!=itrEnd; ++itr) {
00037     if (*itr) delete *itr;
00038   }
00039 }

void Stack::Exec edm::EventHandle e  ) 
 

Definition at line 43 of file Stack.cxx.

References fJobStack.

00044 {
00045   std::list<Job*>::iterator itr(fJobStack.begin());
00046   std::list<Job*>::iterator itrEnd(fJobStack.end());
00047   for (; itr!=itrEnd; ++itr) {
00048     if (*itr) {
00049       (*itr)->CheckStatus(std::string(""),&e);
00050       (*itr)->Exec(e);
00051     }
00052   }
00053 }

Stack & Stack::Instance  )  [static]
 

Definition at line 13 of file Stack.cxx.

References fInstance.

Referenced by main(), evdb::JobMenu::OpenJobXML(), and evdb::JobInterface::ProcEvent().

00014 {
00015   if (fInstance==0) fInstance = new Stack();
00016   return *fInstance;
00017 }

void Stack::PrintAll  ) 
 

Definition at line 21 of file Stack.cxx.

References fJobStack.

00022 {
00023   std::list<Job*>::iterator itr(fJobStack.begin());
00024   std::list<Job*>::iterator itrEnd(fJobStack.end());
00025   for (; itr!=itrEnd; ++itr) {
00026     (*itr)->Print();
00027   }
00028 }

void Stack::Run  ) 
 

Definition at line 61 of file Stack.cxx.

References fJobStack.

00062 {
00063   std::list<Job*>::iterator itr(fJobStack.begin());
00064   std::list<Job*>::iterator itrEnd(fJobStack.end());
00065   for (; itr!=itrEnd; ++itr) {
00066     (*itr)->Run(-1); // -1 is flag for "all events"
00067   }
00068 }

void Stack::RunOne  ) 
 

Definition at line 72 of file Stack.cxx.

References fJobStack.

00073 {
00074   std::list<Job*>::iterator itr(fJobStack.begin());
00075   std::list<Job*>::iterator itrEnd(fJobStack.end());
00076   for (; itr!=itrEnd; ++itr) (*itr)->Run(0);
00077 }


Member Data Documentation

Stack * Stack::fInstance = 0 [static, private]
 

The sole instance.

Definition at line 11 of file Stack.cxx.

Referenced by Instance().

std::list<Job*> jobc::Stack::fJobStack [private]
 

List of jobs to be run.

Definition at line 27 of file JobControl/Stack.h.

Referenced by AdoptJob(), CleanUp(), Exec(), PrintAll(), Run(), and RunOne().


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