DESY Hbb Analysis Framework
Public Member Functions | Private Attributes | List of all members
analysis::ntuple::Definitions Class Reference

#include <Definitions.h>

Public Member Functions

void Add (const std::vector< std::string > &, const std::vector< std::string > &)
 
void Add (const std::string &, const std::string &)
 
 Definitions ()
 
 Definitions (edm::Service< TFileService > &)
 
 Definitions (edm::Service< TFileService > &, const std::string &)
 
 Definitions (TFileDirectory &)
 
 Definitions (TFileDirectory &, const std::string &)
 
void Fill ()
 
void Init ()
 
TTree * Tree ()
 
 ~Definitions ()
 

Private Attributes

TTree * tree_
 

Detailed Description

Definition at line 38 of file Definitions.h.

Constructor & Destructor Documentation

Definitions::Definitions ( )

Definition at line 35 of file Definitions.cc.

36 {
37  // default constructor
38 }
Definitions::Definitions ( edm::Service< TFileService > &  fs)

Definition at line 40 of file Definitions.cc.

References tree_.

41 {
42  std::string category = "Definitions";
43  tree_ = fs->make<TTree>(category.c_str(),category.c_str());
44 
45 }
Definitions::Definitions ( edm::Service< TFileService > &  fs,
const std::string &  category 
)

Definition at line 47 of file Definitions.cc.

References tree_.

48 {
49  TFileDirectory subDir = fs->mkdir( "Definitions" );
50  tree_ = subDir.make<TTree>(category.c_str(),category.c_str());
51 }
Definitions::Definitions ( TFileDirectory &  subDir)

Definition at line 53 of file Definitions.cc.

References tree_.

54 {
55  std::string category = "Definitions";
56  tree_ = subDir.make<TTree>(category.c_str(),category.c_str());
57 
58 }
Definitions::Definitions ( TFileDirectory &  subDir,
const std::string &  category 
)

Definition at line 60 of file Definitions.cc.

References tree_.

61 {
62  TFileDirectory subSubDir = subDir.mkdir( "Definitions" );
63  tree_ = subSubDir.make<TTree>(category.c_str(),category.c_str());
64 
65 }
Definitions::~Definitions ( )

Definition at line 67 of file Definitions.cc.

68 {
69  // do anything here that needs to be done at desctruction time
70  // (e.g. close files, deallocate resources etc.)
71 }

Member Function Documentation

void Definitions::Add ( const std::vector< std::string > &  names,
const std::vector< std::string > &  aliases 
)

Definition at line 89 of file Definitions.cc.

90 {
91  for ( size_t i = 0 ; i < names.size() ; ++i )
92  this -> Add(names[i],aliases[i]);
93 }
void Add(const std::vector< std::string > &, const std::vector< std::string > &)
Definition: Definitions.cc:89
void Definitions::Add ( const std::string &  name,
const std::string &  alias 
)

Definition at line 95 of file Definitions.cc.

References tree_.

96 {
97  tree_ ->Branch(alias.c_str(),(void*)name.c_str(),"string/C",1024);
98 }
void Definitions::Fill ( )

Definition at line 79 of file Definitions.cc.

References tree_.

void Definitions::Init ( )

Definition at line 85 of file Definitions.cc.

86 {
87 }
TTree * Definitions::Tree ( )

Definition at line 101 of file Definitions.cc.

References tree_.

102 {
103  return tree_;
104 }

Member Data Documentation

TTree* analysis::ntuple::Definitions::tree_
private

Definition at line 56 of file Definitions.h.

Referenced by Add(), Definitions(), Fill(), and Tree().


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