CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
TkOfflineVariables Class Reference

#include <PlotAlignmentValidation.h>

Public Member Functions

TFile * getFile ()
 
int getLineColor ()
 
int getLineStyle ()
 
std::string getName ()
 
TTree * getTree ()
 
 TkOfflineVariables (std::string fileName, std::string baseDir, std::string legName="", int color=1, int style=1)
 

Private Attributes

TFile * file
 
std::string legendName
 
int lineColor
 
int lineStyle
 
TTree * tree
 

Detailed Description

Definition at line 27 of file PlotAlignmentValidation.h.

Constructor & Destructor Documentation

TkOfflineVariables::TkOfflineVariables ( std::string  fileName,
std::string  baseDir,
std::string  legName = "",
int  color = 1,
int  style = 1 
)

Definition at line 44 of file PlotAlignmentValidation.h.

References gather_cfg::cout, ztail::d, file, legendName, lineColor, lineStyle, dqm_diff::start, and tree.

45 {
46  lineColor = lColor;
47  lineStyle = lStyle;
48  if (legName=="") {
49  int start = 0;
50  if (fileName.find('/') ) start =fileName.find_last_of('/')+1;
51  int stop = fileName.find_last_of('.');
52  legendName = fileName.substr(start,stop-start);
53  } else {
54  legendName = legName;
55  }
56 
57  //fill the tree pointer
58  file = TFile::Open( fileName.c_str() );
59  TDirectoryFile *d = 0;
60  if (file->Get( baseDir.c_str() ) ) {
61  d = (TDirectoryFile*)file->Get( baseDir.c_str() );
62  if ((*d).Get("TkOffVal")) {
63  tree = (TTree*)(*d).Get("TkOffVal");
64  } else {
65  std::cout<<"no tree named TkOffVal"<<std::endl;
66  }
67  } else {
68  std::cout<<"no directory named "<<baseDir.c_str()<<std::endl;
69  }
70 }
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
tuple d
Definition: ztail.py:151
tuple cout
Definition: gather_cfg.py:121

Member Function Documentation

TFile* TkOfflineVariables::getFile ( )
inline

Definition at line 34 of file PlotAlignmentValidation.h.

References file.

34 { return file; };
int TkOfflineVariables::getLineColor ( )
inline

Definition at line 30 of file PlotAlignmentValidation.h.

References lineColor.

30 { return lineColor; };
int TkOfflineVariables::getLineStyle ( )
inline

Definition at line 31 of file PlotAlignmentValidation.h.

References lineStyle.

31 { return lineStyle; };
std::string TkOfflineVariables::getName ( )
inline

Definition at line 32 of file PlotAlignmentValidation.h.

References legendName.

32 { return legendName; }
TTree* TkOfflineVariables::getTree ( )
inline

Definition at line 33 of file PlotAlignmentValidation.h.

References tree.

33 { return tree; };

Member Data Documentation

TFile* TkOfflineVariables::file
private

Definition at line 34 of file PlotAlignmentValidation.h.

Referenced by ztee.GZipLog::finish(), getFile(), and TkOfflineVariables().

std::string TkOfflineVariables::legendName
private

Definition at line 40 of file PlotAlignmentValidation.h.

Referenced by getName(), and TkOfflineVariables().

int TkOfflineVariables::lineColor
private

Definition at line 38 of file PlotAlignmentValidation.h.

Referenced by getLineColor(), and TkOfflineVariables().

int TkOfflineVariables::lineStyle
private

Definition at line 39 of file PlotAlignmentValidation.h.

Referenced by getLineStyle(), and TkOfflineVariables().

TTree* TkOfflineVariables::tree
private