VMC Version 2.0
Loading...
Searching...
No Matches
TMCVerbose.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------
2// Copyright (C) 2019 CERN and copyright holders of VMC Project.
3// This software is distributed under the terms of the GNU General Public
4// License v3 (GPL Version 3), copied verbatim in the file "LICENSE".
5//
6// See https://github.com/vmc-project/vmc for full licensing information.
7// -----------------------------------------------------------------------
8
9// Author: Ivana Hrivnacova; 24/02/2003
10
11/*************************************************************************
12 * Copyright (C) 2006, Rene Brun and Fons Rademakers. *
13 * Copyright (C) 2003, ALICE Experiment at CERN. *
14 * All rights reserved. *
15 * *
16 * For the licensing terms see $ROOTSYS/LICENSE. *
17 * For the list of contributors see $ROOTSYS/README/CREDITS. *
18 *************************************************************************/
19
20#ifndef ROOT_TMCVerbose
21#define ROOT_TMCVerbose
22
23//
24// Class TMCVerbose
25// ----------------
26// Class for printing a detailed infomation from MC application.
27// Defined levels:
28// 0 no output
29// 1 info up to event level
30// 2 info up to tracking level
31// 3 detailed info for each step
32
33#include <TObject.h>
34
35class TVirtualMCStack;
36
37class TMCVerbose : public TObject {
38public:
39 TMCVerbose(Int_t level);
40 TMCVerbose();
41 virtual ~TMCVerbose();
42
43 // methods
44 virtual void InitMC();
45 virtual void RunMC(Int_t nofEvents);
46 virtual void FinishRun();
47
48 virtual void ConstructGeometry();
49 virtual void ConstructOpGeometry();
50 virtual void InitGeometry();
51 virtual void AddParticles();
52 virtual void AddIons();
53 virtual void GeneratePrimaries();
54 virtual void BeginEvent();
55 virtual void BeginPrimary();
56 virtual void PreTrack();
57 virtual void Stepping();
58 virtual void PostTrack();
59 virtual void FinishPrimary();
60 virtual void EndOfEvent();
61 virtual void FinishEvent();
62
63 // set methods
64 void SetLevel(Int_t level);
65
66 // get methods
67 Int_t GetLevel() const;
68
69private:
70 // methods
71 void PrintBanner() const;
72 void PrintTrackInfo() const;
73 void PrintStepHeader() const;
74
75 // data members
76 Int_t fLevel;
78
79 ClassDef(TMCVerbose, 1) // Verbose class for MC application
80};
81
82// inline functions
83
84inline void TMCVerbose::SetLevel(Int_t level)
85{
86 fLevel = level;
87}
88
89inline Int_t TMCVerbose::GetLevel() const
90{
91 return fLevel;
92}
93
94#endif // ROOT_TMCVerbose
Class for printing a detailed information from MC application.
Definition: TMCVerbose.h:37
virtual void InitMC()
Initialize MC info.
Definition: TMCVerbose.cxx:119
virtual void AddIons()
Add ions info.
Definition: TMCVerbose.cxx:182
virtual void FinishEvent()
Finish of an event info.
Definition: TMCVerbose.cxx:326
void PrintTrackInfo() const
Prints track information.
Definition: TMCVerbose.cxx:74
virtual void AddParticles()
Add particles info.
Definition: TMCVerbose.cxx:173
virtual void BeginPrimary()
Begin of a primary track info.
Definition: TMCVerbose.cxx:209
virtual void GeneratePrimaries()
Generate primaries info.
Definition: TMCVerbose.cxx:191
virtual void RunMC(Int_t nofEvents)
MC run info.
Definition: TMCVerbose.cxx:128
virtual void ConstructGeometry()
Construct geometry info.
Definition: TMCVerbose.cxx:146
Int_t fLevel
Verbose level.
Definition: TMCVerbose.h:76
virtual void EndOfEvent()
End of event info.
Definition: TMCVerbose.cxx:317
virtual void FinishRun()
Finish MC run info.
Definition: TMCVerbose.cxx:137
void PrintStepHeader() const
Prints the header for stepping information.
Definition: TMCVerbose.cxx:98
virtual void InitGeometry()
Initialize geometry info.
Definition: TMCVerbose.cxx:164
Int_t GetLevel() const
Definition: TMCVerbose.h:89
Int_t fStepNumber
Current step number.
Definition: TMCVerbose.h:77
virtual void FinishPrimary()
Finish of a primary track info.
Definition: TMCVerbose.cxx:308
TMCVerbose()
Default constructor.
Definition: TMCVerbose.cxx:49
virtual void BeginEvent()
Begin event info.
Definition: TMCVerbose.cxx:200
virtual ~TMCVerbose()
Destructor.
Definition: TMCVerbose.cxx:54
virtual void ConstructOpGeometry()
Construct geometry for optical physics info.
Definition: TMCVerbose.cxx:155
void PrintBanner() const
Prints banner for track information.
Definition: TMCVerbose.cxx:63
virtual void Stepping()
Stepping info.
Definition: TMCVerbose.cxx:238
virtual void PreTrack()
Begin of each track info.
Definition: TMCVerbose.cxx:218
virtual void PostTrack()
Finish of each track info.
Definition: TMCVerbose.cxx:299
void SetLevel(Int_t level)
Definition: TMCVerbose.h:84
Interface to a user defined particles stack.