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