Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
genie::CacheBranchNtp Class Reference

A simple cache branch storing the cached data in a TNtuple. More...

#include <CacheBranchNtp.h>

Inheritance diagram for genie::CacheBranchNtp:
genie::CacheBranchI

Public Member Functions

 CacheBranchNtp ()
 
 CacheBranchNtp (string name, string brdef)
 
 ~CacheBranchNtp ()
 
TNtupleD * Ntuple (void) const
 
void CreateNtuple (string name, string branch_def)
 
void Reset (void)
 
void Print (ostream &stream) const
 
TNtupleD * operator() (void) const
 
- Public Member Functions inherited from genie::CacheBranchI
virtual ~CacheBranchI ()
 

Private Member Functions

void Init (void)
 
void CleanUp (void)
 

Private Attributes

TNtupleD * fNtp
 

Friends

ostream & operator<< (ostream &stream, const CacheBranchNtp &cbntp)
 

Additional Inherited Members

- Protected Member Functions inherited from genie::CacheBranchI
 CacheBranchI ()
 

Detailed Description

A simple cache branch storing the cached data in a TNtuple.

Author
Costas Andreopoulos <constantinos.andreopoulos cern.ch> University of Liverpool & STFC Rutherford Appleton Laboratory

November 26, 2004

Copyright (c) 2003-2020, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 35 of file CacheBranchNtp.h.

Constructor & Destructor Documentation

CacheBranchNtp::CacheBranchNtp ( void  )

Definition at line 29 of file CacheBranchNtp.cxx.

29  :
31 {
32  this->Init();
33 }
CacheBranchNtp::CacheBranchNtp ( string  name,
string  brdef 
)

Definition at line 35 of file CacheBranchNtp.cxx.

35  :
37 {
38  this->Init();
39  this->CreateNtuple(name, branch_def);
40 }
static QCString name
Definition: declinfo.cpp:673
void CreateNtuple(string name, string branch_def)
CacheBranchNtp::~CacheBranchNtp ( )

Definition at line 42 of file CacheBranchNtp.cxx.

43 {
44  this->CleanUp();
45 }

Member Function Documentation

void CacheBranchNtp::CleanUp ( void  )
private

Definition at line 52 of file CacheBranchNtp.cxx.

53 {
54  if(fNtp) delete fNtp;
55 }
void CacheBranchNtp::CreateNtuple ( string  name,
string  branch_def 
)

Definition at line 63 of file CacheBranchNtp.cxx.

64 {
65  this->Reset();
66 
67  fNtp = new TNtupleD(name.c_str(), "CacheBranchNtp", branch_def.c_str());
68  fNtp->SetDirectory(0);
69  fNtp->SetCircular(1600000);
70 }
static QCString name
Definition: declinfo.cpp:673
void CacheBranchNtp::Init ( void  )
private

Definition at line 47 of file CacheBranchNtp.cxx.

48 {
49  fNtp = 0;
50 }
TNtupleD* genie::CacheBranchNtp::Ntuple ( void  ) const
inline

Definition at line 44 of file CacheBranchNtp.h.

44 { return fNtp; }
TNtupleD * CacheBranchNtp::operator() ( void  ) const

Definition at line 81 of file CacheBranchNtp.cxx.

82 {
83  return this->Ntuple();
84 }
TNtupleD * Ntuple(void) const
void CacheBranchNtp::Print ( ostream &  stream) const

Definition at line 72 of file CacheBranchNtp.cxx.

73 {
74  if(fNtp) {
75  stream << "type: [CacheBranchNtp] - nentries: " << fNtp->GetEntries();
76  } else {
77  stream << " *** NULL ***";
78  }
79 }
void CacheBranchNtp::Reset ( void  )

Definition at line 57 of file CacheBranchNtp.cxx.

58 {
59  this->CleanUp();
60  this->Init();
61 }

Friends And Related Function Documentation

ostream& operator<< ( ostream &  stream,
const CacheBranchNtp cbntp 
)
friend

Definition at line 22 of file CacheBranchNtp.cxx.

23  {
24  cbntp.Print(stream);
25  return stream;
26  }
void Print(ostream &stream) const

Member Data Documentation

TNtupleD* genie::CacheBranchNtp::fNtp
private

Definition at line 58 of file CacheBranchNtp.h.


The documentation for this class was generated from the following files: