CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/FWCore/Framework/src/EarlyDeleteHelper.h

Go to the documentation of this file.
00001 #ifndef FWCore_Framework_EarlyDeleteHelper_h
00002 #define FWCore_Framework_EarlyDeleteHelper_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Framework
00006 // Class  :     EarlyDeleteHelper
00007 // 
00016 //
00017 // Original Author:  Chris Jones
00018 //         Created:  Mon Feb  6 16:17:08 CST 2012
00019 // $Id: EarlyDeleteHelper.h,v 1.1 2012/02/09 22:12:56 chrjones Exp $
00020 //
00021 
00022 // system include files
00023 #include <vector>
00024 
00025 // user include files
00026 
00027 // forward declarations
00028 namespace edm {
00029   class BranchID;
00030   class EventPrincipal;
00031   
00032   class EarlyDeleteHelper
00033   {
00034     
00035   public:
00036     EarlyDeleteHelper(unsigned int* iBeginIndexItr,
00037                       unsigned int* iEndIndexItr,
00038                       std::vector<std::pair<edm::BranchID,unsigned int>>* iBranchCounts);
00039     EarlyDeleteHelper(const EarlyDeleteHelper&) = default;
00040         EarlyDeleteHelper& operator=(const EarlyDeleteHelper&) = default;
00041     //virtual ~EarlyDeleteHelper();
00042     
00043     // ---------- const member functions ---------------------
00044     
00045     // ---------- static member functions --------------------
00046     
00047     // ---------- member functions ---------------------------
00048     void reset() {pathsLeftToComplete_ = nPathsOn_;}
00049     void moduleRan(EventPrincipal&);
00050     void pathFinished(EventPrincipal&);
00051     void addedToPath() { ++nPathsOn_;}
00052     void appendIndex(unsigned int index);
00053     void shiftIndexPointers(unsigned int iShift);
00054     
00055     unsigned int* begin() { return pBeginIndex_;}
00056     unsigned int* end() { return pEndIndex_;}
00057     
00058   private:
00059     
00060     // ---------- member data --------------------------------
00061     unsigned int* pBeginIndex_;
00062     unsigned int* pEndIndex_;
00063     std::vector<std::pair<edm::BranchID,unsigned int>>* pBranchCounts_;
00064     unsigned int pathsLeftToComplete_;
00065     unsigned int nPathsOn_;
00066     
00067   };
00068 }
00069 
00070 
00071 #endif