BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
BesRunAction Class Reference

#include <BesRunAction.hh>

+ Inheritance diagram for BesRunAction:

Public Member Functions

 BesRunAction ()
 
 ~BesRunAction ()
 
void BeginOfRunAction (const G4Run *)
 
void EndOfRunAction (const G4Run *)
 
G4int GetRunId ()
 
G4int GetMCTruthFlag ()
 
BesAsciiIOGetAsciiIO ()
 
BesRootIOGetRootIO ()
 
BesTuningIOGetTuningIO ()
 
G4bool GetTDSFlag ()
 
BesTDSWriterGetTDSWriter ()
 
void SetMCTruthFlag (G4int flag)
 
void SetAsciiFlag (std::string flag)
 
void SetAsciiFile (std::string file)
 
void SetRootFlag (G4bool flag)
 
void SetRootFile (std::string file)
 
void SetTuningFile (std::vector< std::string > file)
 
void SetTDSFlag (G4bool flag)
 
 BesRunAction ()
 
 ~BesRunAction ()
 
void BeginOfRunAction (const G4Run *)
 
void EndOfRunAction (const G4Run *)
 
G4int GetRunId ()
 
G4int GetMCTruthFlag ()
 
BesAsciiIOGetAsciiIO ()
 
BesRootIOGetRootIO ()
 
BesTuningIOGetTuningIO ()
 
G4bool GetTDSFlag ()
 
BesTDSWriterGetTDSWriter ()
 
void SetMCTruthFlag (G4int flag)
 
void SetAsciiFlag (std::string flag)
 
void SetAsciiFile (std::string file)
 
void SetRootFlag (G4bool flag)
 
void SetRootFile (std::string file)
 
void SetTuningFile (std::vector< std::string > file)
 
void SetTDSFlag (G4bool flag)
 

Detailed Description

Constructor & Destructor Documentation

◆ BesRunAction() [1/2]

BesRunAction::BesRunAction ( )

Definition at line 21 of file BesRunAction.cc.

22 :m_runId(0), m_MCTruthFlag(1),
23 m_asciiFlag(""),m_asciiFile(""),m_asciiIO(0),m_rootFlag(true),m_rootFile(""),m_rootIO(0),
24 m_tuningIO(0),m_TDSFlag(false),m_TDSWriter(0)
25{
26 //m_runMessenger = new BesRunActionMessenger(this);
27}

◆ ~BesRunAction() [1/2]

BesRunAction::~BesRunAction ( )

Definition at line 29 of file BesRunAction.cc.

30{
31 //delete m_runMessenger;
32}

◆ BesRunAction() [2/2]

BesRunAction::BesRunAction ( )

◆ ~BesRunAction() [2/2]

BesRunAction::~BesRunAction ( )

Member Function Documentation

◆ BeginOfRunAction() [1/2]

void BesRunAction::BeginOfRunAction ( const G4Run *  aRun)

Definition at line 34 of file BesRunAction.cc.

35{
36 //set run Id, use old BES convention, -9 as default
37 //aRun->SetRunID(runNumber);
38 G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
39 m_runId= aRun->GetRunID();
40
41 G4int flag[8];
42 G4int allflag=0;
43 for (G4int i=0;i<8;i++)
44 {
45 flag[i]=m_asciiFlag[i]-'0';
46 allflag += flag[i];
47 }
48 if (allflag)
49 m_asciiIO = new BesAsciiIO(flag[0],flag[1],flag[2],flag[3],flag[4],flag[5],flag[6],flag[7],m_asciiFile);
50
51 if (m_rootFlag)
52 m_rootIO = new BesRootIO(1,1,1,1,1,1,1,1,m_rootFile);
53
54 if (m_TDSFlag)
55 m_TDSWriter = new BesTDSWriter;
56
58 std::vector<std::string>::iterator pd;
59 for (pd = m_tuningFile.begin(); pd != m_tuningFile.end(); pd++){
60 std::cout << "BesRunAction tuning File: " << *pd << std::endl;
61 }
62
63 m_tuningIO = new BesTuningIO(m_tuningFile);
64 }
65}

◆ BeginOfRunAction() [2/2]

void BesRunAction::BeginOfRunAction ( const G4Run *  )

◆ EndOfRunAction() [1/2]

void BesRunAction::EndOfRunAction ( const G4Run *  )

Definition at line 68 of file BesRunAction.cc.

69{
70 if (m_asciiIO)
71 delete m_asciiIO;
72 if (m_rootIO)
73 delete m_rootIO;
74 if (m_TDSFlag)
75 delete m_TDSWriter;
76 if (m_tuningIO)
77 delete m_tuningIO;
78}

◆ EndOfRunAction() [2/2]

void BesRunAction::EndOfRunAction ( const G4Run *  )

◆ GetAsciiIO() [1/2]

BesAsciiIO * BesRunAction::GetAsciiIO ( )
inline

Definition at line 36 of file InstallArea/include/BesSim/BesSim/BesRunAction.hh.

36{return m_asciiIO;}

Referenced by BesEventAction::EndOfEventAction().

◆ GetAsciiIO() [2/2]

BesAsciiIO * BesRunAction::GetAsciiIO ( )
inline

Definition at line 36 of file Simulation/BOOST/BesSim/BesSim-00-01-24/BesSim/BesRunAction.hh.

36{return m_asciiIO;}

◆ GetMCTruthFlag() [1/2]

◆ GetMCTruthFlag() [2/2]

G4int BesRunAction::GetMCTruthFlag ( )
inline

Definition at line 35 of file Simulation/BOOST/BesSim/BesSim-00-01-24/BesSim/BesRunAction.hh.

35{return m_MCTruthFlag;}

◆ GetRootIO() [1/2]

BesRootIO * BesRunAction::GetRootIO ( )
inline

Definition at line 37 of file InstallArea/include/BesSim/BesSim/BesRunAction.hh.

37{return m_rootIO;}

Referenced by BesEventAction::EndOfEventAction().

◆ GetRootIO() [2/2]

BesRootIO * BesRunAction::GetRootIO ( )
inline

Definition at line 37 of file Simulation/BOOST/BesSim/BesSim-00-01-24/BesSim/BesRunAction.hh.

37{return m_rootIO;}

◆ GetRunId() [1/2]

G4int BesRunAction::GetRunId ( )
inline

Definition at line 34 of file InstallArea/include/BesSim/BesSim/BesRunAction.hh.

34{return m_runId;}

Referenced by BesEventAction::EndOfEventAction().

◆ GetRunId() [2/2]

G4int BesRunAction::GetRunId ( )
inline

Definition at line 34 of file Simulation/BOOST/BesSim/BesSim-00-01-24/BesSim/BesRunAction.hh.

34{return m_runId;}

◆ GetTDSFlag() [1/2]

G4bool BesRunAction::GetTDSFlag ( )
inline

Definition at line 40 of file InstallArea/include/BesSim/BesSim/BesRunAction.hh.

40{return m_TDSFlag;}

◆ GetTDSFlag() [2/2]

G4bool BesRunAction::GetTDSFlag ( )
inline

Definition at line 40 of file Simulation/BOOST/BesSim/BesSim-00-01-24/BesSim/BesRunAction.hh.

40{return m_TDSFlag;}

◆ GetTDSWriter() [1/2]

BesTDSWriter * BesRunAction::GetTDSWriter ( )
inline

Definition at line 41 of file InstallArea/include/BesSim/BesSim/BesRunAction.hh.

41{return m_TDSWriter;}

Referenced by BesEventAction::EndOfEventAction().

◆ GetTDSWriter() [2/2]

BesTDSWriter * BesRunAction::GetTDSWriter ( )
inline

Definition at line 41 of file Simulation/BOOST/BesSim/BesSim-00-01-24/BesSim/BesRunAction.hh.

41{return m_TDSWriter;}

◆ GetTuningIO() [1/2]

BesTuningIO * BesRunAction::GetTuningIO ( )
inline

Definition at line 38 of file InstallArea/include/BesSim/BesSim/BesRunAction.hh.

38{return m_tuningIO;}

Referenced by BesEventAction::EndOfEventAction().

◆ GetTuningIO() [2/2]

BesTuningIO * BesRunAction::GetTuningIO ( )
inline

Definition at line 38 of file Simulation/BOOST/BesSim/BesSim-00-01-24/BesSim/BesRunAction.hh.

38{return m_tuningIO;}

◆ SetAsciiFile() [1/2]

void BesRunAction::SetAsciiFile ( std::string  file)
inline

Definition at line 56 of file InstallArea/include/BesSim/BesSim/BesRunAction.hh.

56{m_asciiFile = file;}
char * file
Definition: DQA_TO_DB.cxx:15

Referenced by BesSim::initialize().

◆ SetAsciiFile() [2/2]

void BesRunAction::SetAsciiFile ( std::string  file)
inline

Definition at line 56 of file Simulation/BOOST/BesSim/BesSim-00-01-24/BesSim/BesRunAction.hh.

56{m_asciiFile = file;}

◆ SetAsciiFlag() [1/2]

void BesRunAction::SetAsciiFlag ( std::string  flag)
inline

Definition at line 55 of file InstallArea/include/BesSim/BesSim/BesRunAction.hh.

55{m_asciiFlag = flag;}

Referenced by BesSim::initialize().

◆ SetAsciiFlag() [2/2]

void BesRunAction::SetAsciiFlag ( std::string  flag)
inline

Definition at line 55 of file Simulation/BOOST/BesSim/BesSim-00-01-24/BesSim/BesRunAction.hh.

55{m_asciiFlag = flag;}

◆ SetMCTruthFlag() [1/2]

void BesRunAction::SetMCTruthFlag ( G4int  flag)
inline

Definition at line 43 of file InstallArea/include/BesSim/BesSim/BesRunAction.hh.

43{m_MCTruthFlag = flag;}

Referenced by BesRunActionMessenger::SetNewValue().

◆ SetMCTruthFlag() [2/2]

void BesRunAction::SetMCTruthFlag ( G4int  flag)
inline

Definition at line 43 of file Simulation/BOOST/BesSim/BesSim-00-01-24/BesSim/BesRunAction.hh.

43{m_MCTruthFlag = flag;}

◆ SetRootFile() [1/2]

void BesRunAction::SetRootFile ( std::string  file)
inline

Definition at line 58 of file InstallArea/include/BesSim/BesSim/BesRunAction.hh.

58{m_rootFile = file;}

Referenced by BesSim::initialize().

◆ SetRootFile() [2/2]

void BesRunAction::SetRootFile ( std::string  file)
inline

Definition at line 58 of file Simulation/BOOST/BesSim/BesSim-00-01-24/BesSim/BesRunAction.hh.

58{m_rootFile = file;}

◆ SetRootFlag() [1/2]

void BesRunAction::SetRootFlag ( G4bool  flag)
inline

Definition at line 57 of file InstallArea/include/BesSim/BesSim/BesRunAction.hh.

57{m_rootFlag = flag;}

Referenced by BesSim::initialize().

◆ SetRootFlag() [2/2]

void BesRunAction::SetRootFlag ( G4bool  flag)
inline

Definition at line 57 of file Simulation/BOOST/BesSim/BesSim-00-01-24/BesSim/BesRunAction.hh.

57{m_rootFlag = flag;}

◆ SetTDSFlag() [1/2]

void BesRunAction::SetTDSFlag ( G4bool  flag)
inline

Definition at line 61 of file InstallArea/include/BesSim/BesSim/BesRunAction.hh.

61{m_TDSFlag = flag;}

Referenced by BesSim::initialize().

◆ SetTDSFlag() [2/2]

void BesRunAction::SetTDSFlag ( G4bool  flag)
inline

Definition at line 61 of file Simulation/BOOST/BesSim/BesSim-00-01-24/BesSim/BesRunAction.hh.

61{m_TDSFlag = flag;}

◆ SetTuningFile() [1/2]

void BesRunAction::SetTuningFile ( std::vector< std::string >  file)
inline

Definition at line 59 of file InstallArea/include/BesSim/BesSim/BesRunAction.hh.

59{m_tuningFile = file;}

Referenced by BesSim::initialize().

◆ SetTuningFile() [2/2]

void BesRunAction::SetTuningFile ( std::vector< std::string >  file)
inline

Definition at line 59 of file Simulation/BOOST/BesSim/BesSim-00-01-24/BesSim/BesRunAction.hh.

59{m_tuningFile = file;}

The documentation for this class was generated from the following files: