GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
GGSTRandomStatusReader.cpp
Go to the documentation of this file.
1 /*
2  * GGSTRandomStatusReader.cpp
3  *
4  * Created on: 01 Jan 2015
5  * Author: Nicola Mori
6  */
7 
11 
12 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
13 
14 GGSTRandomStatusReader::GGSTRandomStatusReader() : _randomStatusInfo(NULL), _randomStatusChain(NULL) {}
15 
16 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
17 
18 GGSTRandomStatusReader::~GGSTRandomStatusReader() { delete _randomStatusInfo; }
19 
20 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
21 
22 bool GGSTRandomStatusReader::SetChain(TChain *randomStatusChain) {
23 
24  _randomStatusChain = randomStatusChain;
25  if (_randomStatusChain->SetBranchAddress("randomStatus", &_randomStatusInfo) != 0) {
26  return true;
27  } else
28  return false;
29 }
30 
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
32 
33 void GGSTRandomStatusReader::GetEntry(Long64_t entry) {
34  if (entry != _randomStatusChain->GetEntries()) {
35  _randomStatusChain->GetEntry(entry);
36  }
37 }
bool SetChain(TChain *randomStatusChain)
Sets the chain.
void GetEntry(Long64_t entry)