VMC Version 2.1
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
TMCVerbose(Int_t level)
Standard constructor.
virtual void InitMC()
Initialize MC info.
virtual void AddIons()
Add ions info.
virtual void FinishEvent()
Finish of an event info.
void PrintTrackInfo() const
Prints track information.
virtual void AddParticles()
Add particles info.
virtual void BeginPrimary()
Begin of a primary track info.
virtual void GeneratePrimaries()
Generate primaries info.
virtual void RunMC(Int_t nofEvents)
MC run info.
virtual void ConstructGeometry()
Construct geometry info.
Int_t fLevel
Verbose level.
Definition TMCVerbose.h:76
virtual void EndOfEvent()
End of event info.
virtual void FinishRun()
Finish MC run info.
void PrintStepHeader() const
Prints the header for stepping information.
virtual void InitGeometry()
Initialize geometry info.
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.
TMCVerbose()
Default constructor.
virtual void BeginEvent()
Begin event info.
virtual ~TMCVerbose()
Destructor.
virtual void ConstructOpGeometry()
Construct geometry for optical physics info.
void PrintBanner() const
Prints banner for track information.
virtual void Stepping()
Stepping info.
virtual void PreTrack()
Begin of each track info.
virtual void PostTrack()
Finish of each track info.
void SetLevel(Int_t level)
Definition TMCVerbose.h:84
Interface to a user defined particles stack.