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 <string>
11 #include <map>
12 
13 typedef std::map
14 <std::pair<std::string,std::string>, int, std::less< std::pair<std::string,std::string> > > mpssi;
15 typedef std::pair<std::string,std::string> pss;
16 typedef std::map<std::string,int,std::less<std::string> > psi;
17 
18 class BeginOfRun;
19 class EndOfRun;
20 class BeginOfTrack;
21 class G4Step;
22 
24  public Observer<const BeginOfRun *>,
25  public Observer<const EndOfRun *>,
26  public Observer<const BeginOfTrack *>,
27  public Observer<const G4Step *>
28 {
29 public:
31  ~CountProcessesAction() override;
32  void update(const BeginOfRun * run) override;
33  void update(const BeginOfTrack * trk) override;
34  void update(const EndOfRun * track) override;
35  void update(const G4Step * track) override;
36  //---- Dump list of processes for each particle.
37  // printNsteps = 1 print in how many step the process was called,
38  // print only those processes with this number <> 0
39  void DumpProcessList(bool printNsteps, std::ostream& out = std::cout);
40  void DumpCreatorProcessList(bool printNsteps, std::ostream& out = std::cout);
41  void DumpParticleList(std::ostream& out = std::cout);
42 private:
43  bool fDEBUG;
47 };
48 
49 #endif
std::pair< std::string, std::string > pss
void DumpProcessList(bool printNsteps, std::ostream &out=std::cout)
void DumpParticleList(std::ostream &out=std::cout)
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
CountProcessesAction(edm::ParameterSet const &p)
void update(const BeginOfRun *run) override
This routine will be called when the appropriate signal arrives.