VMC Examples Version 6.6
Loading...
Searching...
No Matches
read.C
Go to the documentation of this file.
1//------------------------------------------------
2// The Virtual Monte Carlo examples
3// Copyright (C) 2007 - 2014 Ivana Hrivnacova
4// All rights reserved.
5//
6// For the licensing terms see geant4_vmc/LICENSE.
7// Contact: root-vmc@cern.ch
8//-------------------------------------------------
9
10/// \file A01/read.C
11/// \brief Macro for reading the A01 simulated data from Root file
12
13#include "../macro/basiclibs.C"
14
15void read()
16{
17/// Macro for reading the E03 simulated data from Root file
18
19 // Load basic libraries
20 basiclibs();
21
22 // Load this example library
23 gSystem->Load("libexampleA01");
24
25 // MC application
27 = new A01MCApplication("Example A01", "The Example A01 MC application", kRead);
28
29 for (Int_t i=0; i<5; i++) {
30 cout << " Event no " << i+1 << ":" << endl;
31 appl->ReadEvent(i);
32 appl->GetHodoscopeSD1()->Print();
33 appl->GetHodoscopeSD2()->Print();
34 appl->GetDriftChamberSD1()->Print();
35 appl->GetDriftChamberSD2()->Print();
38 cout << endl;
39 }
40}
void read()
Definition read.C:15
Macro for loading basic libraries used with all MCs.
void basiclibs()
Definition basiclibs.C:30
virtual void Print(Option_t *option="") const
virtual void Print(Option_t *option="") const
Implementation of the TVirtualMCApplication.
void ReadEvent(Int_t i)
A01HodoscopeSD * GetHodoscopeSD2() const
A01DriftChamberSD * GetDriftChamberSD2() const
A01HodoscopeSD * GetHodoscopeSD1() const
A01EmCalorimeterSD * GetEmCalorimeterSD() const
A01DriftChamberSD * GetDriftChamberSD1() const
A01HadCalorimeterSD * GetHadCalorimeterSD() const