CMS 3D CMS Logo

Public Member Functions | Private Attributes

HcalTestHistoManager Class Reference

#include <HcalTestHistoManager.h>

List of all members.

Public Member Functions

void fillTree (HcalTestHistoClass *histos)
 HcalTestHistoManager (const std::string &)
virtual ~HcalTestHistoManager ()

Private Attributes

edm::Service< TFileServicefs
HcalTestHistoClassh
int kount
TTree * tree

Detailed Description

Definition at line 22 of file HcalTestHistoManager.h.


Constructor & Destructor Documentation

HcalTestHistoManager::HcalTestHistoManager ( const std::string &  file)

Definition at line 13 of file HcalTestHistoManager.cc.

References fs, h, edm::Service< T >::isAvailable(), and tree.

                                                                 :
  tree(0), h(0), kount(0) {
  if (fs.isAvailable()) {
    h    = new HcalTestHistoClass();

    tree = fs->make<TTree>("HcalTest", "HcalTest");
    tree->SetAutoSave(10000);
    tree->Branch("HcalTestHisto", "HcalTestHistoClass", &h); 
    edm::LogInfo("HcalSim") << "HcalTestHistoManager:===>>>  Book the Tree";
  } else {
    edm::LogInfo("HcalSim") << "HcalTestHistoManager:===>>> No file provided";
  }
}
HcalTestHistoManager::~HcalTestHistoManager ( ) [virtual]

Definition at line 27 of file HcalTestHistoManager.cc.

References h, and kount.

                                            {

  edm::LogInfo("HcalSim") << "============================================="
                          << "========================================\n"
                          << "=== HcalTestHistoManager: Start writing user "
                          << "histograms after " << kount << " events ";
  if (h) delete h;
}

Member Function Documentation

void HcalTestHistoManager::fillTree ( HcalTestHistoClass histos)

Definition at line 36 of file HcalTestHistoManager.cc.

References h, mergeVDriftHistosByStation::histos, kount, LogDebug, and tree.

                                                                {

  kount++;
  LogDebug("HcalSim") << "HcalTestHistoManager: tree pointer for " << kount 
                      << " = " << histos;
  if (tree) {
    h = histos;
    tree->Fill();
  }
}

Member Data Documentation

Definition at line 33 of file HcalTestHistoManager.h.

Referenced by HcalTestHistoManager().

Definition at line 35 of file HcalTestHistoManager.h.

Referenced by fillTree(), HcalTestHistoManager(), and ~HcalTestHistoManager().

Definition at line 36 of file HcalTestHistoManager.h.

Referenced by fillTree(), and ~HcalTestHistoManager().

TTree* HcalTestHistoManager::tree [private]

Definition at line 34 of file HcalTestHistoManager.h.

Referenced by fillTree(), and HcalTestHistoManager().