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