CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/SimGeneral/MixingModule/interface/DigiAccumulatorMixMod.h

Go to the documentation of this file.
00001 #ifndef SimGeneral_MixingModule_DigiAccumulatorMixMod_h
00002 #define SimGeneral_MixingModule_DigiAccumulatorMixMod_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     MixingModule
00006 // Class  :     DigiAccumulatorMixMod
00007 //
00016 //
00017 // Original Author:  Werner Sun
00018 //         Created:  Tue Sep 20 17:33:33 CEST 2011
00019 //
00020 
00021 // system include files
00022 #include <vector>
00023 
00024 // user include files
00025 
00026 // forward declarations
00027 
00028 namespace edm {
00029   class Event;
00030   class EventPrincipal;
00031   class EventSetup;
00032   class LuminosityBlock;
00033   class Run;
00034 }
00035 
00036 class PileUpEventPrincipal;
00037 
00038 class DigiAccumulatorMixMod {
00039 
00040   public:
00041     DigiAccumulatorMixMod();
00042 
00043     virtual ~DigiAccumulatorMixMod();
00044 
00045     // ---------- const member functions ---------------------
00046 
00047     // ---------- static member functions --------------------
00048 
00049     // ---------- member functions ---------------------------
00050     // Perform algorithm setup for each event before any signal/pileup events are processed.
00051     virtual void initializeEvent(edm::Event const& event, edm::EventSetup const& setup) = 0;
00052 
00053     // Accumulate digis or other data for each signal event.
00054     virtual void accumulate(edm::Event const& event, edm::EventSetup const& setup) = 0;
00055 
00056     // Accumulate digis or other data for each pileup event, one at a time.
00057     virtual void accumulate(PileUpEventPrincipal const& event, edm::EventSetup const& setup) = 0;
00058 
00059     // 1. Finalize digi collections or other data for each event.
00060     // 2. Put products in Event with appropriate instance labels
00061     virtual void finalizeEvent(edm::Event& event, edm::EventSetup const& setup) = 0;  // event is non-const
00062 
00063     // Perform any necessary actions before pileup events for a given bunch crossing are processed.
00064     virtual void initializeBunchCrossing(edm::Event const& event, edm::EventSetup const& setup, int bunchCrossing) {}
00065 
00066     // Perform any necessary actions after pileup events for a given bunch crossing are processed.
00067     // This may include putting bunch crossing specific products into the event.
00068     virtual void finalizeBunchCrossing(edm::Event& event, edm::EventSetup const& setup, int bunchCrossing) {}
00069 
00070     virtual void beginRun(edm::Run const& run, edm::EventSetup const& setup) {}
00071     virtual void endRun(edm::Run const& run, edm::EventSetup const& setup) {}
00072     virtual void beginLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& setup) {}
00073     virtual void endLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& setup) {}
00074 
00075   private:
00076     DigiAccumulatorMixMod(DigiAccumulatorMixMod const&); // stop default
00077 
00078     DigiAccumulatorMixMod const& operator=(DigiAccumulatorMixMod const&); // stop default
00079 
00080     // ---------- member data --------------------------------
00081 };
00082 
00083 #endif