CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/SimG4CMS/Forward/interface/TotemTestGem.h

Go to the documentation of this file.
00001 #ifndef Forward_TotemTestGem_h
00002 #define Forward_TotemTestGem_h 1
00003 // -*- C++ -*-
00004 //
00005 // Package:     Forward
00006 // Class  :     TotemTestGem
00007 //
00016 //
00017 // Original Author: 
00018 //         Created:  Tue May 16 10:14:34 CEST 2006
00019 // $Id: TotemTestGem.h,v 1.2 2006/11/16 16:54:11 sunanda Exp $
00020 //
00021  
00022 // system include files
00023 #include <iostream>
00024 #include <memory>
00025 #include <vector>
00026 #include <string>
00027 
00028 // user include files
00029 #include "SimG4Core/Notification/interface/Observer.h"
00030 #include "SimG4Core/Notification/interface/BeginOfJob.h"
00031 #include "SimG4Core/Notification/interface/BeginOfEvent.h"
00032 #include "SimG4Core/Notification/interface/EndOfEvent.h"
00033 #include "SimG4Core/Watcher/interface/SimProducer.h"
00034 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00035 
00036 #include "SimDataFormats/Forward/interface/TotemTestHistoClass.h"
00037 #include "SimG4CMS/Forward/interface/TotemG4Hit.h"
00038 
00039 class G4Step;
00040 
00041 class TotemTestGem : public SimProducer,
00042                      public Observer<const BeginOfEvent *>,
00043                      public Observer<const EndOfEvent *> {
00044 
00045 public: 
00046 
00047   TotemTestGem(const edm::ParameterSet &p);
00048   virtual ~TotemTestGem();
00049 
00050   virtual void produce(edm::Event&, const edm::EventSetup&);
00051 
00052 private:
00053   // observer classes
00054   void update(const BeginOfEvent * evt);
00055   void update(const EndOfEvent * evt);
00056 
00057   void clear();
00058   void fillEvent(TotemTestHistoClass&);
00059 
00060 private:
00061 
00062   //Keep parameters and internal memory
00063   std::vector<std::string>                names;
00064   int                                     evtnum;
00065   std::vector<TotemG4Hit*>                hits;
00066  
00067 };
00068 
00069 #endif