CMS 3D CMS Logo

DigiAccumulatorMixMod.h
Go to the documentation of this file.
1 #ifndef SimGeneral_MixingModule_DigiAccumulatorMixMod_h
2 #define SimGeneral_MixingModule_DigiAccumulatorMixMod_h
3 // -*- C++ -*-
4 //
5 // Package: MixingModule
6 // Class : DigiAccumulatorMixMod
7 //
16 //
17 // Original Author: Werner Sun
18 // Created: Tue Sep 20 17:33:33 CEST 2011
19 //
20 
21 // system include files
22 #include <vector>
25 
26 // user include files
27 
28 // forward declarations
29 
30 namespace edm {
31  class Event;
32  class EventPrincipal;
33  class EventSetup;
34  class LuminosityBlock;
35  class Run;
36  class StreamID;
37 } // namespace edm
38 
40 
42 public:
44 
45  DigiAccumulatorMixMod(DigiAccumulatorMixMod const&) = delete; // stop default
46 
47  DigiAccumulatorMixMod const& operator=(DigiAccumulatorMixMod const&) = delete; // stop default
48 
49  virtual ~DigiAccumulatorMixMod();
50 
51  // ---------- const member functions ---------------------
52 
53  // ---------- static member functions --------------------
54 
55  // ---------- member functions ---------------------------
56  // Perform algorithm setup for each event before any signal/pileup events are processed.
57  virtual void initializeEvent(edm::Event const& event, edm::EventSetup const& setup) = 0;
58 
59  // Accumulate digis or other data for each signal event.
60  virtual void accumulate(edm::Event const& event, edm::EventSetup const& setup) = 0;
61 
62  // Accumulate digis or other data for each pileup event, one at a time.
63  virtual void accumulate(PileUpEventPrincipal const& event, edm::EventSetup const& setup, edm::StreamID const&) = 0;
64 
65  // 1. Finalize digi collections or other data for each event.
66  // 2. Put products in Event with appropriate instance labels
67  virtual void finalizeEvent(edm::Event& event, edm::EventSetup const& setup) = 0; // event is non-const
68 
69  // Perform any necessary actions before pileup events for a given bunch crossing are processed.
70  virtual void initializeBunchCrossing(edm::Event const& event, edm::EventSetup const& setup, int bunchCrossing) {}
71 
72  // Perform any necessary actions after pileup events for a given bunch crossing are processed.
73  // This may include putting bunch crossing specific products into the event.
74  virtual void finalizeBunchCrossing(edm::Event& event, edm::EventSetup const& setup, int bunchCrossing) {}
75 
76  virtual void beginRun(edm::Run const& run, edm::EventSetup const& setup) {}
77  virtual void endRun(edm::Run const& run, edm::EventSetup const& setup) {}
80 
81  virtual void StorePileupInformation(std::vector<int>& numInteractionList,
82  std::vector<int>& bunchCrossingList,
83  std::vector<float>& TrueInteractionList,
84  std::vector<edm::EventID>& eventList,
85  int bunchSpace) {}
86 
88  std::cout << " You must override the virtual functions in DigiAccumulatorMixMod in\n"
89  << "order to access PileupInformation. Returning empty object." << std::endl;
90 
91  PileupMixingContent* dummyPileupObject = new PileupMixingContent();
92 
93  return dummyPileupObject;
94  }
95 
96 private:
97  // ---------- member data --------------------------------
98 };
99 
100 #endif
virtual void initializeEvent(edm::Event const &event, edm::EventSetup const &setup)=0
virtual void accumulate(edm::Event const &event, edm::EventSetup const &setup)=0
virtual void endRun(edm::Run const &run, edm::EventSetup const &setup)
virtual void finalizeEvent(edm::Event &event, edm::EventSetup const &setup)=0
virtual void StorePileupInformation(std::vector< int > &numInteractionList, std::vector< int > &bunchCrossingList, std::vector< float > &TrueInteractionList, std::vector< edm::EventID > &eventList, int bunchSpace)
virtual void initializeBunchCrossing(edm::Event const &event, edm::EventSetup const &setup, int bunchCrossing)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
virtual void beginRun(edm::Run const &run, edm::EventSetup const &setup)
DigiAccumulatorMixMod const & operator=(DigiAccumulatorMixMod const &)=delete
virtual PileupMixingContent * getEventPileupInfo()
virtual void finalizeBunchCrossing(edm::Event &event, edm::EventSetup const &setup, int bunchCrossing)
HLT enums.
Definition: event.py:1
Definition: Run.h:45