GGS(GenericGEANT4Simulation)Software  2.6.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
GGSTMCTruthReader.cpp
Go to the documentation of this file.
1 /*
2  * GGSTMCTruthReader.cpp
3  *
4  * Created on: 25 Aug 2011
5  * Author: Nicola Mori
6  */
7 
11 
12 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
13 
15  _mcTruthInfo(NULL), _mcTruthChain(NULL) {
16 
17 }
18 
19 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
20 
22  delete _mcTruthInfo;
23 }
24 
25 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
26 
27 bool GGSTMCTruthReader::SetChain(TChain *mcTruthChain) {
28 
29  _mcTruthChain = mcTruthChain;
30  if (_mcTruthChain->SetBranchAddress("mcTruthInfo", &_mcTruthInfo) == 0) {
31  return true;
32  }
33  else
34  return false;
35 }
36 
37 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
38 
39 void GGSTMCTruthReader::GetEntry(Long64_t entry) {
40  if (entry != _mcTruthChain->GetEntries()) {
41  _mcTruthChain->GetEntry(entry);
42  }
43 }
void GetEntry(Long64_t entry)
~GGSTMCTruthReader()
Destructor.
bool SetChain(TChain *mcTruthChain)
Sets the chain.
GGSTMCTruthReader()
Constructor.