GGS(GenericGEANT4Simulation)Software  2.6.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 
15  _randomStatusInfo(NULL), _randomStatusChain(NULL) {
16 
17 }
18 
19 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
20 
22  delete _randomStatusInfo;
23 }
24 
25 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
26 
27 bool GGSTRandomStatusReader::SetChain(TChain *randomStatusChain) {
28 
29  _randomStatusChain = randomStatusChain;
30  if (_randomStatusChain->SetBranchAddress("randomStatus", &_randomStatusInfo) != 0) {
31  return true;
32  }
33  else
34  return false;
35 
36 }
37 
38 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
39 
40 void GGSTRandomStatusReader::GetEntry(Long64_t entry) {
41  if (entry != _randomStatusChain->GetEntries()) {
42  _randomStatusChain->GetEntry(entry);
43  }
44 }
45 
bool SetChain(TChain *randomStatusChain)
Sets the chain.
void GetEntry(Long64_t entry)