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 
27 // user include files
28 
29 // forward declarations
30 
31 namespace edm {
32  class Event;
33  class EventPrincipal;
34  class EventSetup;
35  class LuminosityBlock;
36  class Run;
37  class StreamID;
38 }
39 
41 
43 
44  public:
46 
47  virtual ~DigiAccumulatorMixMod();
48 
49  // ---------- const member functions ---------------------
50 
51  // ---------- static member functions --------------------
52 
53  // ---------- member functions ---------------------------
54  // Perform algorithm setup for each event before any signal/pileup events are processed.
55  virtual void initializeEvent(edm::Event const& event, edm::EventSetup const& setup) = 0;
56 
57  // Accumulate digis or other data for each signal event.
58  virtual void accumulate(edm::Event const& event, edm::EventSetup const& setup) = 0;
59 
60  // Accumulate digis or other data for each pileup event, one at a time.
61  virtual void accumulate(PileUpEventPrincipal const& event, edm::EventSetup const& setup, edm::StreamID const&) = 0;
62 
63  // 1. Finalize digi collections or other data for each event.
64  // 2. Put products in Event with appropriate instance labels
65  virtual void finalizeEvent(edm::Event& event, edm::EventSetup const& setup) = 0; // event is non-const
66 
67  // Perform any necessary actions before pileup events for a given bunch crossing are processed.
68  virtual void initializeBunchCrossing(edm::Event const& event, edm::EventSetup const& setup, int bunchCrossing) {}
69 
70  // Perform any necessary actions after pileup events for a given bunch crossing are processed.
71  // This may include putting bunch crossing specific products into the event.
72  virtual void finalizeBunchCrossing(edm::Event& event, edm::EventSetup const& setup, int bunchCrossing) {}
73 
74  virtual void beginRun(edm::Run const& run, edm::EventSetup const& setup) {}
75  virtual void endRun(edm::Run const& run, edm::EventSetup const& setup) {}
76  virtual void beginLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& setup) {}
77  virtual void endLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& setup) {}
78 
79 
80  virtual void StorePileupInformation( std::vector<int> &numInteractionList,
81  std::vector<int> &bunchCrossingList,
82  std::vector<float> &TrueInteractionList,
83  std::vector<edm::EventID> &eventList,
84  int bunchSpace){ }
85 
87  std::cout << " You must override the virtual functions in DigiAccumulatorMixMod in\n" << "order to access PileupInformation. Returning empty object." << std::endl;
88 
89  PileupMixingContent* dummyPileupObject = new PileupMixingContent();
90 
91  return dummyPileupObject;
92  }
93 
94  private:
95  DigiAccumulatorMixMod(DigiAccumulatorMixMod const&) = delete; // stop default
96 
97  DigiAccumulatorMixMod const& operator=(DigiAccumulatorMixMod const&) = delete; // stop default
98 
99  // ---------- member data --------------------------------
100 };
101 
102 #endif
virtual void endRun(edm::Run const &run, edm::EventSetup const &setup)
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)
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
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)
virtual PileupMixingContent * getEventPileupInfo()
virtual void finalizeBunchCrossing(edm::Event &event, edm::EventSetup const &setup, int bunchCrossing)
HLT enums.
Definition: event.py:1
Definition: Run.h:43