CMS 3D CMS Logo

EarlyDeleteHelper.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_EarlyDeleteHelper_h
2 #define FWCore_Framework_EarlyDeleteHelper_h
3 // -*- C++ -*-
4 //
5 // Package: Framework
6 // Class : EarlyDeleteHelper
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Mon Feb 6 16:17:08 CST 2012
19 //
20 
21 // system include files
22 #include <vector>
23 #include <atomic>
24 
25 // user include files
27 // forward declarations
28 namespace edm {
29  class EventPrincipal;
30 
31  struct BranchToCount {
33  std::atomic<unsigned int> count;
34 
35  BranchToCount(edm::BranchID id, unsigned int count) : branch(id), count(count) {}
36 
37  BranchToCount(BranchToCount const& iOther) : branch(iOther.branch), count(iOther.count.load()) {}
38  };
39 
41  public:
42  EarlyDeleteHelper(unsigned int* iBeginIndexItr,
43  unsigned int* iEndIndexItr,
44  std::vector<BranchToCount>* iBranchCounts);
47  //virtual ~EarlyDeleteHelper();
48 
49  // ---------- const member functions ---------------------
50 
51  // ---------- static member functions --------------------
52 
53  // ---------- member functions ---------------------------
55  void moduleRan(EventPrincipal const&);
56  void pathFinished(EventPrincipal const&);
57  void addedToPath() { ++nPathsOn_; }
58  void appendIndex(unsigned int index);
59  void shiftIndexPointers(unsigned int iShift);
60 
61  unsigned int* begin() { return pBeginIndex_; }
62  unsigned int* end() { return pEndIndex_; }
63 
64  private:
65  // ---------- member data --------------------------------
66  unsigned int* pBeginIndex_;
67  unsigned int* pEndIndex_;
68  std::vector<BranchToCount>* pBranchCounts_;
69  std::atomic<unsigned int> pathsLeftToComplete_;
70  unsigned int nPathsOn_;
71  };
72 } // namespace edm
73 
74 #endif
edm::EarlyDeleteHelper::moduleRan
void moduleRan(EventPrincipal const &)
Definition: EarlyDeleteHelper.cc:68
edm::BranchToCount::branch
const edm::BranchID branch
Definition: EarlyDeleteHelper.h:32
edm::BranchToCount::BranchToCount
BranchToCount(edm::BranchID id, unsigned int count)
Definition: EarlyDeleteHelper.h:35
edm::BranchToCount::count
std::atomic< unsigned int > count
Definition: EarlyDeleteHelper.h:33
edm::EarlyDeleteHelper::pathsLeftToComplete_
std::atomic< unsigned int > pathsLeftToComplete_
Definition: EarlyDeleteHelper.h:69
edm
HLT enums.
Definition: AlignableModifier.h:19
BranchID.h
edm::EarlyDeleteHelper::pathFinished
void pathFinished(EventPrincipal const &)
Definition: EarlyDeleteHelper.cc:80
edm::EarlyDeleteHelper::pBranchCounts_
std::vector< BranchToCount > * pBranchCounts_
Definition: EarlyDeleteHelper.h:68
edm::EarlyDeleteHelper::end
unsigned int * end()
Definition: EarlyDeleteHelper.h:62
edm::EarlyDeleteHelper::nPathsOn_
unsigned int nPathsOn_
Definition: EarlyDeleteHelper.h:70
edm::EarlyDeleteHelper::shiftIndexPointers
void shiftIndexPointers(unsigned int iShift)
Definition: EarlyDeleteHelper.cc:99
edm::EarlyDeleteHelper::begin
unsigned int * begin()
Definition: EarlyDeleteHelper.h:61
edm::EventPrincipal
Definition: EventPrincipal.h:46
edm::EarlyDeleteHelper::pEndIndex_
unsigned int * pEndIndex_
Definition: EarlyDeleteHelper.h:67
edm::BranchID
Definition: BranchID.h:14
svgfig.load
def load(fileName)
Definition: svgfig.py:547
edm::BranchToCount
Definition: EarlyDeleteHelper.h:31
edm::EarlyDeleteHelper::addedToPath
void addedToPath()
Definition: EarlyDeleteHelper.h:57
edm::EarlyDeleteHelper::reset
void reset()
Definition: EarlyDeleteHelper.h:54
edm::EarlyDeleteHelper::appendIndex
void appendIndex(unsigned int index)
Definition: EarlyDeleteHelper.cc:94
edm::EarlyDeleteHelper
Definition: EarlyDeleteHelper.h:40
edm::EarlyDeleteHelper::pBeginIndex_
unsigned int * pBeginIndex_
Definition: EarlyDeleteHelper.h:66
edm::EarlyDeleteHelper::operator=
EarlyDeleteHelper & operator=(const EarlyDeleteHelper &)=delete
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
edm::BranchToCount::BranchToCount
BranchToCount(BranchToCount const &iOther)
Definition: EarlyDeleteHelper.h:37
edm::EarlyDeleteHelper::EarlyDeleteHelper
EarlyDeleteHelper(unsigned int *iBeginIndexItr, unsigned int *iEndIndexItr, std::vector< BranchToCount > *iBranchCounts)
Definition: EarlyDeleteHelper.cc:33
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46