File indexing completed on 2024-04-06 12:30:25
0001 #ifndef HelpfulWatchers_BeginOfTrackCounter_h
0002 #define HelpfulWatchers_BeginOfTrackCounter_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #include <string>
0026
0027
0028 #include "SimG4Core/Notification/interface/BeginOfTrack.h"
0029 #include "SimG4Core/Notification/interface/Observer.h"
0030 #include "SimG4Core/Watcher/interface/SimProducer.h"
0031
0032
0033 namespace edm {
0034 class ParameterSet;
0035 }
0036
0037 namespace simwatcher {
0038 class BeginOfTrackCounter : public SimProducer, public Observer<const BeginOfTrack *> {
0039 public:
0040 BeginOfTrackCounter(const edm::ParameterSet &);
0041 BeginOfTrackCounter(const BeginOfTrackCounter &) = delete;
0042 const BeginOfTrackCounter &operator=(const BeginOfTrackCounter &) = delete;
0043
0044
0045
0046
0047
0048
0049 void produce(edm::Event &, const edm::EventSetup &) override;
0050
0051 private:
0052 void update(const BeginOfTrack *) override;
0053
0054 int m_count;
0055 std::string m_label;
0056 };
0057
0058 }
0059 #endif