GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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:
Inheritance graph
[legend]
Collaboration diagram for genie::CacheBranchNtp:
Collaboration graph
[legend]

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 <c.andreopoulos cern.ch> University of Liverpool
Created:
November 26, 2004
License:
Copyright (c) 2003-2024, 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.

References Init().

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

Definition at line 35 of file CacheBranchNtp.cxx.

References CreateNtuple(), and Init().

35  :
37 {
38  this->Init();
39  this->CreateNtuple(name, branch_def);
40 }
void CreateNtuple(string name, string branch_def)
const char * name
CacheBranchNtp::~CacheBranchNtp ( )

Definition at line 42 of file CacheBranchNtp.cxx.

References CleanUp().

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

Member Function Documentation

void CacheBranchNtp::CleanUp ( void  )
private

Definition at line 52 of file CacheBranchNtp.cxx.

References fNtp.

Referenced by Reset(), and ~CacheBranchNtp().

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

Definition at line 63 of file CacheBranchNtp.cxx.

References fNtp, and Reset().

Referenced by CacheBranchNtp().

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 }
const char * name
void CacheBranchNtp::Init ( void  )
private

Definition at line 47 of file CacheBranchNtp.cxx.

References fNtp.

Referenced by CacheBranchNtp(), and Reset().

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

Definition at line 44 of file CacheBranchNtp.h.

References fNtp.

Referenced by operator()().

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

Definition at line 81 of file CacheBranchNtp.cxx.

References Ntuple().

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

Definition at line 72 of file CacheBranchNtp.cxx.

References fNtp.

Referenced by genie::operator<<().

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.

References CleanUp(), and Init().

Referenced by CreateNtuple().

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.

Referenced by CleanUp(), CreateNtuple(), Init(), Ntuple(), and Print().


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