Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | 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 Types

typedef std::list< Job * > JobList

Public Member Functions

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

Static Public Member Functions

StackInstance ()

Private Attributes

JobList 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 Typedef Documentation

typedef std::list<Job*> jobc::Stack::JobList
 

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


Member Function Documentation

void Stack::AdoptJob Job j  ) 
 

Definition at line 57 of file Stack.cxx.

References fJobStack.

Referenced by jobc::jobBuilder::Build().

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 }

const JobList& jobc::Stack::GetList  )  const [inline]
 

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

Referenced by jobc::XMLConfiguration().

00026 { return fJobStack; }

Stack & Stack::Instance  )  [static]
 

Definition at line 13 of file Stack.cxx.

References fInstance.

Referenced by jobc::jobBuilder::Build(), main(), evdb::JobMenu::OpenJobXML(), evdb::JobInterface::ProcEvent(), and jobc::XMLConfiguration().

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.

Referenced by RunOne().

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, and Run().

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().

JobList jobc::Stack::fJobStack [private]
 

List of jobs to be run.

Definition at line 30 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 Mon Nov 23 04:45:33 2009 for NOvA Offline by  doxygen 1.3.9.1