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

JobCGraphVtx.h

Go to the documentation of this file.
00001 
00002 // $Id: JobCGraphVtx.h,v 1.6 2008/02/05 19:02:39 scavan Exp $
00003 // 
00004 // A single vertex in a directed graph
00005 //
00006 // messier@huhepl.harvard.edu
00008 #ifndef JOBCGRAPHVTX_H
00009 #define JOBCGRAPHVTX_H
00010 #ifndef VECTOR
00011 #include <vector>
00012 #define VECTOR
00013 #endif
00014 #ifndef ROOT_Rtypes
00015 #if !defined(__CINT__) || defined(__MAKECINT__)
00016 #include "Rtypes.h" // Needed for ClassDef and ClassImp macros
00017 #endif
00018 #endif
00019 
00020 using namespace std;
00021 
00022 class JobCRecord;
00023 
00024 class JobCGraphVtx
00025 {
00026 public:
00027   JobCGraphVtx();
00028   virtual ~JobCGraphVtx() { }
00029 
00030   JobCGraphVtx* GetAttached(unsigned int i) const;
00031   
00032   virtual bool EvalInput(JobCRecord* rec) = 0;
00033   virtual void Attach(JobCGraphVtx *p);
00034   virtual void Detach(JobCGraphVtx *p);
00035 
00036   void EvaluateGraph(JobCRecord* rec);
00037   void EvaluateNode(JobCRecord* rec);
00038 
00039 private:
00040   void AddUpStream();
00041   void ReceiveNotification(bool passfail);
00042   void SendNotification(bool passfail);
00043   void InitGraphEvaluate();
00044   virtual void DerivedInitGraphEvaluate() { }
00045 
00046   int fNupStream;          // # of nodes upstream of this node
00047   int fNupStreamPassed;    // # of upstream nodes that have reported pass
00048   int fNupStreamFailed;    // # of upstream nodes that have reported fail
00049   vector<JobCGraphVtx*> fDownStream; // List of nodes connected to this node
00050 
00051   ClassDef(JobCGraphVtx,0) // A single vertex in a directed graph
00052 };
00053 #endif // JOBCGRAPHVTX_H

Generated on Mon Feb 15 11:06:48 2010 for loon by  doxygen 1.3.9.1