#include "StageDataManager.h"
#include "Stage/HeaderStageData.h"
#include "Event/HeaderObject.h"
#include "GaudiKernel/IDataProviderSvc.h"
#include <vector>
Include dependency graph for StageDataManager.cc:
Go to the source code of this file.
Functions | |
static bool | find_hos (const HeaderObject *ho, vector< const HeaderObject * > &hos) |
static IStageDataList::iterator | find_ho (IStageDataList &sdlist, const HeaderObject *ho) |
static vector< const HeaderObject * > | strip_sdlist (IStageDataList &sdlist, IStageDataList::iterator last) |
static bool find_hos | ( | const HeaderObject * | ho, | |
vector< const HeaderObject * > & | hos | |||
) | [static] |
Definition at line 74 of file StageDataManager.cc.
00075 { 00076 if (!ho) return false; 00077 00078 const vector<const IHeader*>& inHOs = ho->inputHeaders(); 00079 00080 size_t nhos = inHOs.size(); 00081 00082 for (size_t ind=0; ind<nhos; ++ind) { 00083 const IHeader* iho = inHOs[ind]; 00084 const HeaderObject* other_ho = dynamic_cast<const HeaderObject*>(iho); 00085 bool ok = find_hos(other_ho,hos); 00086 if (!ok) return false; 00087 } 00088 00089 hos.push_back(ho); 00090 00091 return true; 00092 }
static IStageDataList::iterator find_ho | ( | IStageDataList & | sdlist, | |
const HeaderObject * | ho | |||
) | [static] |
Definition at line 96 of file StageDataManager.cc.
00097 { 00098 IStageDataList::iterator it, done = sdlist.end(); 00099 for (it = sdlist.begin(); it != done; ++it) { 00100 const HeaderObject* other_ho = &(it->second->header()); 00101 if (ho == other_ho) return it; 00102 } 00103 return done; 00104 }
static vector<const HeaderObject*> strip_sdlist | ( | IStageDataList & | sdlist, | |
IStageDataList::iterator | last | |||
) | [static] |
Definition at line 108 of file StageDataManager.cc.
00109 { 00110 vector<const HeaderObject*> dead_hos; 00111 vector<IStageData*> dead_data; 00112 00113 for (IStageDataList::iterator it = sdlist.begin(); it != last; ++it) { 00114 dead_data.push_back(it->second); 00115 dead_hos.push_back(&(it->second->header())); 00116 } 00117 sdlist.erase(sdlist.begin(), last); 00118 for (size_t ind=0; ind<dead_data.size(); ++ind) { 00119 delete dead_data[ind]; 00120 } 00121 dead_data.clear(); 00122 00123 return dead_hos; 00124 }