CMS 3D CMS Logo

CountProcessesAction.h
Go to the documentation of this file.
1 #ifndef SimG4Core_CountProcessesAction_H
2 #define SimG4Core_CountProcessesAction_H
3 
7 
8 #include "G4ParticleDefinition.hh"
9 
10 #include <map>
11 #include <string>
12 
13 typedef std::map<std::pair<std::string, std::string>, int, std::less<std::pair<std::string, std::string>>> mpssi;
14 typedef std::pair<std::string, std::string> pss;
15 typedef std::map<std::string, int, std::less<std::string>> psi;
16 
17 class BeginOfRun;
18 class EndOfRun;
19 class BeginOfTrack;
20 class G4Step;
21 
23  public Observer<const BeginOfRun *>,
24  public Observer<const EndOfRun *>,
25  public Observer<const BeginOfTrack *>,
26  public Observer<const G4Step *> {
27 public:
29  ~CountProcessesAction() override;
30  void update(const BeginOfRun *run) override;
31  void update(const BeginOfTrack *trk) override;
32  void update(const EndOfRun *track) override;
33  void update(const G4Step *track) override;
34  //---- Dump list of processes for each particle.
35  // printNsteps = 1 print in how many step the process was called,
36  // print only those processes with this number <> 0
37  void DumpProcessList(bool printNsteps, std::ostream &out = std::cout);
38  void DumpCreatorProcessList(bool printNsteps, std::ostream &out = std::cout);
39  void DumpParticleList(std::ostream &out = std::cout);
40 
41 private:
42  bool fDEBUG;
46 };
47 
48 #endif
void DumpProcessList(bool printNsteps, std::ostream &out=std::cout)
void DumpParticleList(std::ostream &out=std::cout)
Trktree trk
Definition: Trktree.cc:2
std::map< std::string, int, std::less< std::string > > psi
void DumpCreatorProcessList(bool printNsteps, std::ostream &out=std::cout)
std::map< std::pair< std::string, std::string >, int, std::less< std::pair< std::string, std::string > > > mpssi
std::pair< std::string, std::string > pss
CountProcessesAction(edm::ParameterSet const &p)
void update(const BeginOfRun *run) override
This routine will be called when the appropriate signal arrives.