CMS 3D CMS Logo

MixingModule.h
Go to the documentation of this file.
1 #ifndef MixingModule_h
2 #define MixingModule_h
3 
18 
22 
32 
35 #include <vector>
36 #include <string>
37 
41 
42 namespace edm {
43  class AdjusterBase;
44  class ConsumesCollector;
45  class MixingWorkerBase;
46  class ModuleCallingContext;
47  class StreamID;
48 
49  class MixingModule : public BMixingModule {
50  public:
51  typedef std::vector<DigiAccumulatorMixMod*> Accumulators;
52 
54  explicit MixingModule(const edm::ParameterSet& ps, MixingCache::Config const* globalConf);
55 
57  virtual ~MixingModule();
58 
59  virtual void beginJob() {}
60 
61  virtual void beginRun(Run const& r1, EventSetup const& c) override;
62 
63  virtual void endRun(Run const& r1, EventSetup const& c) override;
64 
65  virtual void beginLuminosityBlock(LuminosityBlock const& l1, EventSetup const& c) override;
66 
67  virtual void endLuminosityBlock(LuminosityBlock const& l1, EventSetup const& c) override;
68 
69  void initializeEvent(Event const& event, EventSetup const& setup) override;
70 
71  void accumulateEvent(Event const& event, EventSetup const& setup);
72 
73  void accumulateEvent(PileUpEventPrincipal const& event, EventSetup const& setup, edm::StreamID const&);
74 
75  void finalizeEvent(Event& event, EventSetup const& setup) override;
76 
77  virtual void reload(const edm::EventSetup &) override;
78 
79  private:
80  virtual void branchesActivate(const std::string &friendlyName, const std::string &subdet, InputTag &tag, std::string &label);
81  virtual void put(edm::Event &e,const edm::EventSetup& es) override;
82  virtual void createnewEDProduct() override;
83  virtual void checkSignal(const edm::Event &e) override;
84  virtual void addSignals(const edm::Event &e, const edm::EventSetup& es) override;
85  virtual void doPileUp(edm::Event &e, const edm::EventSetup& es) override;
86  void pileAllWorkers(EventPrincipal const& ep, ModuleCallingContext const*, int bcr, int id, int& offset,
87  const edm::EventSetup& setup, edm::StreamID const&);
89 
94 
95  std::vector<AdjusterBase *> adjusters_;
96  std::vector<AdjusterBase *> adjustersObjects_;
97  std::vector<MixingWorkerBase *> workers_;
98  std::vector<MixingWorkerBase *> workersObjects_;
99  std::vector<std::string> wantedBranches_;
102 
103  // Digi-producing algorithms
104  Accumulators digiAccumulators_ ;
105 
106  };
107 }//edm
108 
109 #endif
virtual ~MixingModule()
virtual void beginLuminosityBlock(LuminosityBlock const &l1, EventSetup const &c) override
void createDigiAccumulators(const edm::ParameterSet &mixingPSet, edm::ConsumesCollector &iC)
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
virtual void addSignals(const edm::Event &e, const edm::EventSetup &es) override
virtual void beginJob()
Definition: MixingModule.h:59
std::vector< DigiAccumulatorMixMod * > Accumulators
Definition: MixingModule.h:51
virtual void put(edm::Event &e, const edm::EventSetup &es) override
virtual void reload(const edm::EventSetup &) override
std::string friendlyName(std::string const &iFullName)
virtual void endLuminosityBlock(LuminosityBlock const &l1, EventSetup const &c) override
virtual void checkSignal(const edm::Event &e) override
std::vector< MixingWorkerBase * > workers_
Definition: MixingModule.h:97
Accumulators digiAccumulators_
Definition: MixingModule.h:104
void initializeEvent(Event const &event, EventSetup const &setup) override
MixingModule(const edm::ParameterSet &ps, MixingCache::Config const *globalConf)
Definition: MixingModule.cc:41
std::vector< AdjusterBase * > adjusters_
Definition: MixingModule.h:95
std::vector< MixingWorkerBase * > workersObjects_
Definition: MixingModule.h:98
virtual void beginRun(Run const &r1, EventSetup const &c) override
CrossingFramePlaybackInfoNew * playbackInfo_
Definition: MixingModule.h:93
virtual void branchesActivate(const std::string &friendlyName, const std::string &subdet, InputTag &tag, std::string &label)
std::vector< std::string > wantedBranches_
Definition: MixingModule.h:99
std::vector< AdjusterBase * > adjustersObjects_
Definition: MixingModule.h:96
InputTag inputTagPlayback_
Definition: MixingModule.h:90
HLT enums.
void accumulateEvent(Event const &event, EventSetup const &setup)
virtual void createnewEDProduct() override
void finalizeEvent(Event &event, EventSetup const &setup) override
virtual void doPileUp(edm::Event &e, const edm::EventSetup &es) override
Definition: event.py:1
Definition: Run.h:42
void pileAllWorkers(EventPrincipal const &ep, ModuleCallingContext const *, int bcr, int id, int &offset, const edm::EventSetup &setup, edm::StreamID const &)
virtual void endRun(Run const &r1, EventSetup const &c) override