CacheBranchNtp.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::CacheBranchNtp
5 
6 \brief A simple cache branch storing the cached data in a TNtuple
7 
8 \author Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
9  University of Liverpool & STFC Rutherford Appleton Laboratory
10 
11 \created November 26, 2004
12 
13 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15 */
16 //____________________________________________________________________________
17 
18 #ifndef _CACHE_BRANCH_NTP_H_
19 #define _CACHE_BRANCH_NTP_H_
20 
21 #include <iostream>
22 #include <string>
23 #include <TNtupleD.h>
24 
26 
27 using std::string;
28 using std::ostream;
29 
30 namespace genie {
31 
32 class CacheBranchNtp;
33 ostream & operator << (ostream & stream, const CacheBranchNtp & cbntp);
34 
36 {
37 public:
38  using TObject::Print; // suppress clang 'hides overloaded virtual function [-Woverloaded-virtual]' warnings
39 
41  CacheBranchNtp(string name, string brdef);
43 
44  inline TNtupleD * Ntuple (void) const { return fNtp; }
45 
46  void CreateNtuple(string name, string branch_def);
47 
48  void Reset (void);
49  void Print (ostream & stream) const;
50 
51  TNtupleD * operator () (void) const;
52  friend ostream & operator << (ostream & stream, const CacheBranchNtp & cbntp);
53 
54 private:
55  void Init (void);
56  void CleanUp (void);
57 
58  TNtupleD * fNtp;
59 
61 };
62 
63 } // genie namespace
64 #endif // _CACHE_BRANCH_NTP_H_
static QCString name
Definition: declinfo.cpp:673
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
std::string string
Definition: nybbler.cc:12
TNtupleD * operator()(void) const
void CreateNtuple(string name, string branch_def)
void Print(ostream &stream) const
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
friend ostream & operator<<(ostream &stream, const CacheBranchNtp &cbntp)
A simple cache branch storing the cached data in a TNtuple.
TNtupleD * Ntuple(void) const
The TObject at the root of concrete cache branches.
Definition: CacheBranchI.h:25