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 Member Functions | Private Attributes | Friends
TFileDirectory Class Reference

#include <TFileDirectory.h>

Inheritance diagram for TFileDirectory:
fwlite::TFileService TFileService

Public Member Functions

bool cd () const
 
std::string fullPath () const
 return the full path of the stored histograms More...
 
TDirectory * getBareDirectory (const std::string &subdir="") const
 
template<typename T >
TgetObject (const std::string &objname, const std::string &subdir="")
 
template<typename T >
Tmake () const
 make new ROOT object More...
 
template<typename T , typename Arg1 >
Tmake (const Arg1 &a1) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 >
Tmake (const Arg1 &a1, const Arg2 &a2) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5, const Arg6 &a6) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5, const Arg6 &a6, const Arg7 &a7) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5, const Arg6 &a6, const Arg7 &a7, const Arg8 &a8) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5, const Arg6 &a6, const Arg7 &a7, const Arg8 &a8, const Arg9 &a9) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 , typename Arg10 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5, const Arg6 &a6, const Arg7 &a7, const Arg8 &a8, const Arg9 &a9, const Arg10 &a10) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 , typename Arg10 , typename Arg11 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5, const Arg6 &a6, const Arg7 &a7, const Arg8 &a8, const Arg9 &a9, const Arg10 &a10, const Arg11 &a11) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 , typename Arg10 , typename Arg11 , typename Arg12 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5, const Arg6 &a6, const Arg7 &a7, const Arg8 &a8, const Arg9 &a9, const Arg10 &a10, const Arg11 &a11, const Arg12 &a12) const
 make new ROOT object More...
 
TFileDirectory mkdir (const std::string &dir, const std::string &descr="")
 create a new subdirectory More...
 
virtual ~TFileDirectory ()
 descructor More...
 

Private Member Functions

TDirectory * _cd (const std::string &subdir="", bool createNeededDirectories=true) const
 
TObject * _getObj (const std::string &objname, const std::string &subdir="") const
 
TDirectory * _mkdir (TDirectory *dirPtr, const std::string &dir, const std::string &description) const
 
 TFileDirectory (const std::string &dir, const std::string &descr, TFile *file, const std::string &path)
 

Private Attributes

std::string descr_
 
std::string dir_
 
TFile * file_
 
std::string path_
 

Friends

class fwlite::TFileService
 
class TFileService
 

Detailed Description

Definition at line 24 of file TFileDirectory.h.

Constructor & Destructor Documentation

virtual TFileDirectory::~TFileDirectory ( )
inlinevirtual

descructor

Definition at line 27 of file TFileDirectory.h.

27 { }
TFileDirectory::TFileDirectory ( const std::string &  dir,
const std::string &  descr,
TFile *  file,
const std::string &  path 
)
inlineprivate

Definition at line 227 of file TFileDirectory.h.

228  :
229  file_( file ), dir_( dir ), descr_( descr ), path_( path ) {
230  }
std::string path_
std::string dir_
dbl *** dir
Definition: mlp_gen.cc:35
std::string descr_

Member Function Documentation

TDirectory * TFileDirectory::_cd ( const std::string &  subdir = "",
bool  createNeededDirectories = true 
) const
private

Definition at line 26 of file TFileDirectory.cc.

References gather_cfg::cout, dir, sistrip::dir_, edm::hlt::Exception, convertSQLiteXML::ok, and path_.

Referenced by make().

27 {
28  string fpath = fullPath();
29  if (subdir.length())
30  {
31  // not empty, we need to append it to path
32  if (fpath.length())
33  {
34  // path is also not empty, so add a slash and let's get going.
35  fpath += "/" + subdir;
36  } else {
37  // path doesn't exist, so just use subdir
38  fpath = subdir;
39  }
40  }
41  TDirectory * dir = file_->GetDirectory( fpath.c_str() );
42  if ( dir == 0 )
43  {
44  // we didn't find the directory
45  //
46  // If we're not supposed to create the diretory, then we should
47  // complain now that it doesn't exist.
48  if (! createNeededDirectories)
49  {
50  cout << "here " << fpath << endl;
51  throw
52  cms::Exception( "InvalidDirectory" )
53  << "directory " << fpath << " doesn't exist.";
54  }
55  if ( ! path_.empty() )
56  {
57  dir = file_->GetDirectory( path_.c_str() );
58  if ( dir == 0 )
59  {
60  throw
61  cms::Exception( "InvalidDirectory" )
62  << "Can't change directory to path: " << path_;
63  }
64  } else
65  {
66  // the base path 'path_' is empty, so just use the pointer to
67  // the file.
68  dir = file_;
69  }
70  // if a subdirectory was passed in, then this directory better
71  // already exist (since you shoudln't be cd'ing into a directory
72  // before making it and the cd with a subdir is only used to get
73  // histograms that are already made).
74  if (subdir.length())
75  {
76  throw
77  cms::Exception( "InvalidDirectory" )
78  << "directory " << fpath << " doesn't exist.";
79  }
80  // if we're here, then that means that this is the first time
81  // that we are calling cd() on this directory AND cd() has not
82  // been called with a subdirectory, so go ahead and make the
83  // directory.
84  dir = _mkdir (dir, dir_, descr_);
85  }
86  bool ok = file_->cd( fpath.c_str() );
87  if ( ! ok )
88  {
89  throw
90  cms::Exception( "InvalidDirectory" )
91  << "Can't change directory to path: " << fpath;
92  }
93  return dir;
94 }
std::string path_
TDirectory * _mkdir(TDirectory *dirPtr, const std::string &dir, const std::string &description) const
std::string fullPath() const
return the full path of the stored histograms
std::string dir_
tuple cout
Definition: gather_cfg.py:121
dbl *** dir
Definition: mlp_gen.cc:35
std::string descr_
TObject * TFileDirectory::_getObj ( const std::string &  objname,
const std::string &  subdir = "" 
) const
private

Definition at line 134 of file TFileDirectory.cc.

References edm::hlt::Exception.

Referenced by getObject().

135 {
136  TObject *objPtr = getBareDirectory (subdir)->Get (objname.c_str());
137  if ( ! objPtr)
138  {
139  // no histogram found by that name. Sorry dude.
140  if (subdir.length())
141  {
142  throw
143  cms::Exception ("ObjectNotFound")
144  << "Can not find object named " << objname
145  << " in subdir " << subdir;
146  } else {
147  throw
148  cms::Exception ("ObjectNotFound")
149  << "Can not find object named " << objname;
150  }
151  } // if nothing found
152  return objPtr;
153 }
TDirectory * getBareDirectory(const std::string &subdir="") const
TDirectory * TFileDirectory::_mkdir ( TDirectory *  dirPtr,
const std::string &  dir,
const std::string &  description 
) const
private

Definition at line 97 of file TFileDirectory.cc.

References sistrip::dir_, edm::hlt::Exception, and path_.

100 {
101  // do we have this one already
102  TDirectory *subdirPtr = dirPtr->GetDirectory (subdirName.c_str());
103  if (subdirPtr)
104  {
105  subdirPtr->cd();
106  return subdirPtr;
107  }
108  // if we're here, then this directory doesn't exist. Is this
109  // directory a subdirectory?
110  const boost::regex subdirRE ("(.+?)/([^/]+)");
111  boost::smatch matches;
112  TDirectory *parentDir = 0;
113  string useName = subdirName;
114  if( boost::regex_match (subdirName, matches, subdirRE) )
115  {
116  parentDir = _mkdir (dirPtr, matches[1], description);
117  useName = matches[2];
118  } else {
119  // This is not a subdirectory, so we're golden
120  parentDir = dirPtr;
121  }
122  subdirPtr = parentDir->mkdir (useName.c_str());
123  if ( ! subdirPtr )
124  {
125  throw
126  cms::Exception( "InvalidDirectory" )
127  << "Can't create directory " << dir_ << " in path: " << path_;
128  }
129  subdirPtr->cd();
130  return subdirPtr;
131 }
std::string path_
TDirectory * _mkdir(TDirectory *dirPtr, const std::string &dir, const std::string &description) const
tuple description
Definition: idDealer.py:66
std::string dir_
bool TFileDirectory::cd ( ) const

Definition at line 19 of file TFileDirectory.cc.

Referenced by dqm_interfaces.DQMcommunicator::get_root_objects_list_recursive(), dqm_interfaces.DQMcommunicator::get_root_objects_names_list_recursive(), dqm_interfaces.DQMcommunicator::get_root_objects_recursive(), and dqm_interfaces.DirWalkerFile::walk().

20 {
21  _cd ("", false);
22  return true;
23 }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
std::string TFileDirectory::fullPath ( ) const

return the full path of the stored histograms

Definition at line 156 of file TFileDirectory.cc.

References sistrip::dir_, path_, and AlCaHLTBitMon_QueryRunRegistry::string.

157 {
158  return string( path_.empty() ? dir_ : path_ + "/" + dir_ );
159 }
std::string path_
std::string dir_
TDirectory * TFileDirectory::getBareDirectory ( const std::string &  subdir = "") const

Definition at line 13 of file TFileDirectory.cc.

Referenced by FFTJetImageRecorder::analyze(), and FFTJetPileupAnalyzer::analyze().

14 {
15  return _cd (subdir, false);
16 }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
template<typename T >
T* TFileDirectory::getObject ( const std::string &  objname,
const std::string &  subdir = "" 
)
inline

Definition at line 37 of file TFileDirectory.h.

References _getObj(), and edm::hlt::Exception.

39  {
40  TObject *objPtr = _getObj (objname, subdir);
41  // Ok, we've got it. Let's see if it's a histogram
42  T * retval = dynamic_cast< T* > ( objPtr );
43  if ( ! retval )
44  {
45  // object isn't a of class T
46  throw
47  cms::Exception ("ObjectNotCorrectlyTyped")
48  << "Object named " << objname << " is not of correct type";
49  }
50  return retval;
51  }
TObject * _getObj(const std::string &objname, const std::string &subdir="") const
long double T
template<typename T >
T* TFileDirectory::make ( ) const
inline

make new ROOT object

Definition at line 55 of file TFileDirectory.h.

References _cd(), and lumiQTWidget::t.

Referenced by AlCaHOCalibProducer::AlCaHOCalibProducer(), SiStripGainFromCalibTree::algoBeginJob(), AlignmentMonitorMuonSystemMap1D::AlignmentMonitorMuonSystemMap1D(), AlignmentMuonHIPTrajectorySelector::AlignmentMuonHIPTrajectorySelector(), AnalysisTasksAnalyzerBTag::AnalysisTasksAnalyzerBTag(), AnalysisTasksAnalyzerJEC::AnalysisTasksAnalyzerJEC(), MuonAlignmentAnalyzer::analyze(), CentralityTableProducer::analyze(), EcalMipGraphs::analyze(), EcalDisplaysByEvent::analyze(), APVShotsAnalyzer::APVShotsAnalyzer(), tnp::BaseTreeFiller::BaseTreeFiller(), BasicMuonAnalyzer::BasicMuonAnalyzer(), HypothesisAnalyzer::beginJob(), PatTriggerAnalyzerPrescale::beginJob(), PatTriggerAnalyzer::beginJob(), myRawAna::beginJob(), PatTriggerTagAndProbe::beginJob(), WMuNuSelector::beginJob(), StudyHLT::beginJob(), MCPhotonAnalyzer::beginJob(), PhotonsWithConversionsAnalyzer::beginJob(), JetCorrectorDemo::beginJob(), IsoTrig::beginJob(), ShallowTree::beginJob(), FactorizedJetCorrectorDemo::beginJob(), CalibAnalyzer< Ref, Rec, Alg >::beginJob(), SimplePhotonAnalyzer::beginJob(), ResolutionCreator::beginJob(), L1GctValidation::beginJob(), myJetAna::beginJob(), MuonAlignmentAnalyzer::beginJob(), ContainmentCorrectionAnalyzer::beginJob(), SiPixelDQMRocLevelAnalyzer::beginJob(), HitEff::beginJob(), FFTJetImageRecorder::beginJob(), FFTJetPileupAnalyzer::beginJob(), L1TauAnalyzer::beginJob(), CosmicSplitterValidation::beginJob(), PrimaryVertexValidation::beginJob(), ErsatzMEt::beginJob(), IsolatedTracksHcalScale::beginJob(), StudyHLT::beginRun(), HistoParams< T >::beginRun(), HLTOfflineReproducibility::beginRun(), HistoParams< TH2F >::beginRun(), HistoParams< TProfile2D >::beginRun(), BigEventsDebugger< T >::BigEventsDebugger(), BjetAnalysis::BjetAnalysis(), AlignmentMonitorSurvey::book(), VertexHistogramMaker::book(), MaterialBudgetCastorHistos::book(), DigiBXCorrHistogramMaker< T >::book(), BSvsPVHistogramMaker::book(), MaterialBudgetHcalHistos::book(), AlignmentMonitorMuonResiduals::book(), MaterialBudgetForward::book(), ConfigurableHisto::book(), SplittingConfigurableHisto::book(), AlignmentMonitorBase::book1D(), AlignmentMonitorBase::book2D(), IsolatedParticlesGeneratedJets::BookHistograms(), L1GtDataEmulAnalyzer::bookHistograms(), IsolatedGenParticles::BookHistograms(), IsolatedTracksNxN::BookHistograms(), MuonAlignmentFromReference::bookNtuple(), AlignmentMonitorBase::bookProfile(), SVTagInfoValidationAnalyzer::bookRecoToSim(), SVTagInfoValidationAnalyzer::bookSimToReco(), IsolatedTracksCone::BuildTree(), calcTopMass::calcTopMass(), CalibratableTest::CalibratableTest(), CMSDAS11DijetAnalyzer::CMSDAS11DijetAnalyzer(), CMSDAS11DijetTestAnalyzer::CMSDAS11DijetTestAnalyzer(), CSCPairResidualsConstraint::configure(), CSCOverlapsAlignmentAlgorithm::CSCOverlapsAlignmentAlgorithm(), CSCOverlapsBeamSplashCut::CSCOverlapsBeamSplashCut(), DreamSD::DreamSD(), EcalDisplaysByEvent::EcalDisplaysByEvent(), EcalMipGraphs::EcalMipGraphs(), ElectronStudy::ElectronStudy(), JetCorrectorDemo::endJob(), IsoTrig::endJob(), FactorizedJetCorrectorDemo::endJob(), TrackerOfflineValidation::endJob(), TkLasBeamFitter::endRunProduce(), EopTreeWriter::EopTreeWriter(), EWKSystUnc::EWKSystUnc(), G4StepStatistics::G4StepStatistics(), gamma_radiative_analyzer::gamma_radiative_analyzer(), GctErrorAnalyzer::GctErrorAnalyzer(), GlbMuQualityCutsAnalysis::GlbMuQualityCutsAnalysis(), HCalSD::HCalSD(), HcalTB02Histo::HcalTB02Histo(), HcalTB04Histo::HcalTB04Histo(), HcalTB06Histo::HcalTB06Histo(), HcalTestHistoManager::HcalTestHistoManager(), HFGflash::HFGflash(), HFShowerParam::HFShowerParam(), HiEvtPlaneFlatCalib::HiEvtPlaneFlatCalib(), HLTBitAnalyzer::HLTBitAnalyzer(), HLTCSCOverlapFilter::HLTCSCOverlapFilter(), HOCalibAnalyzer::HOCalibAnalyzer(), HSCPValidator::HSCPValidator(), HcalForwardAnalysis::init(), WMuNuValidator::init_histograms(), EcalMipGraphs::initHists(), EcalDisplaysByEvent::initHists(), HltComparator::initialise(), ExpressionHisto< T >::initialize(), L1RCTRelValAnalyzer::L1RCTRelValAnalyzer(), L1RCTTestAnalyzer::L1RCTTestAnalyzer(), L25TauAnalyzer::L25TauAnalyzer(), LHEAnalyzer::LHEAnalyzer(), main(), SiStripSpyDisplayModule::MakeDigiHist_(), SiStripHitEffFromCalibTree::makeHotColdMaps(), SiStripSpyDisplayModule::MakeProcessedRawDigiHist_(), SiStripSpyDisplayModule::MakeRawDigiHist_(), SiStripHitEffFromCalibTree::makeSummary(), MCVerticesAnalyzer::MCVerticesAnalyzer(), MCvsRecoVerticesAnalyzer::MCvsRecoVerticesAnalyzer(), MultiplicityCorrelatorHistogramMaker::MultiplicityCorrelatorHistogramMaker(), MultiplicityTimeCorrelations::MultiplicityTimeCorrelations(), MuTriggerAnalyzer::MuTriggerAnalyzer(), PatMuonAnalyzer::PatMuonAnalyzer(), PFSuperClusterTreeMaker::PFSuperClusterTreeMaker(), MuonResiduals1DOFFitter::plot(), MuonResidualsAngleFitter::plot(), MuonResidualsBfieldAngleFitter::plot(), MuonResidualsPositionFitter::plot(), CSCAlignmentCorrections::plot(), MuonResiduals5DOFFitter::plot(), MuonResiduals6DOFFitter::plot(), MuonResiduals6DOFrphiFitter::plot(), GctErrorAnalyzer::plotEGErrors(), GctErrorAnalyzer::plotHFErrors(), GctErrorAnalyzer::plotJetErrors(), GctErrorAnalyzer::plotMissingEErrors(), MuonResidualsFitter::plotsimple(), GctErrorAnalyzer::plotTotalEErrors(), MuonResidualsFitter::plotweighted(), EcalMipGraphs::selectDigi(), EcalDisplaysByEvent::selectDigi(), SiPixelQualityHistory::SiPixelQualityHistory(), SiStripBaselineAnalyzer::SiStripBaselineAnalyzer(), SiStripQualityHistory::SiStripQualityHistory(), SiStripGainFromCalibTree::storeOnTree(), SVTagInfoValidationAnalyzer::SVTagInfoValidationAnalyzer(), testAnalyzer::testAnalyzer(), TopElecAnalyzer::TopElecAnalyzer(), TopGenEventAnalyzer::TopGenEventAnalyzer(), TopJetAnalyzer::TopJetAnalyzer(), TopMuonAnalyzer::TopMuonAnalyzer(), TopTauAnalyzer::TopTauAnalyzer(), TrackerDpgAnalysis::TrackerDpgAnalysis(), TrackerGeometryCompare::TrackerGeometryCompare(), MuonMillepedeAlgorithm::updateInfo(), ZHistogrammer::ZHistogrammer(), ZLONLOHistogrammer::ZLONLOHistogrammer(), ZMassHistogrammer::ZMassHistogrammer(), ZMCHistogrammer::ZMCHistogrammer(), ZMuMu_efficiencyAnalyzer::ZMuMu_efficiencyAnalyzer(), ZMuMu_MCanalyzer::ZMuMu_MCanalyzer(), ZMuMu_Radiative_analyzer::ZMuMu_Radiative_analyzer(), ZMuMu_vtxAnalyzer::ZMuMu_vtxAnalyzer(), ZMuMuAnalyzer::ZMuMuAnalyzer(), ZMuMuAnalyzer_cynematics::ZMuMuAnalyzer_cynematics(), ZMuMuEfficiency::ZMuMuEfficiency(), ZMuMuIsolationAnalyzer::ZMuMuIsolationAnalyzer(), ZMuMuPerformances::ZMuMuPerformances(), ZMuMuSaMassHistogram::ZMuMuSaMassHistogram(), ZMuPtScaleAnalyzer::ZMuPtScaleAnalyzer(), and zPdfUnc::zPdfUnc().

55  {
56  TDirectory *d = _cd();
57  T* t = new T();
58  ROOT::DirAutoAdd_t func = T::Class()->GetDirectoryAutoAdd();
59  if (func) { TH1AddDirectorySentry sentry; func(t,d); }
60  else { d->Append(t); }
61  return t;
62  }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
long double T
template<typename T , typename Arg1 >
T* TFileDirectory::make ( const Arg1 &  a1) const
inline

make new ROOT object

Definition at line 65 of file TFileDirectory.h.

References _cd(), and lumiQTWidget::t.

65  {
66  TDirectory *d = _cd();
67  T * t = new T( a1 );
68  ROOT::DirAutoAdd_t func = T::Class()->GetDirectoryAutoAdd();
69  if (func) { TH1AddDirectorySentry sentry; func(t,d); }
70  else { d->Append(t); }
71  return t;
72  }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
long double T
template<typename T , typename Arg1 , typename Arg2 >
T* TFileDirectory::make ( const Arg1 &  a1,
const Arg2 &  a2 
) const
inline

make new ROOT object

Definition at line 75 of file TFileDirectory.h.

References _cd(), and lumiQTWidget::t.

75  {
76  TDirectory *d = _cd();
77  T * t = new T( a1, a2 );
78  ROOT::DirAutoAdd_t func = T::Class()->GetDirectoryAutoAdd();
79  if (func) { TH1AddDirectorySentry sentry; func(t,d); }
80  else { d->Append(t); }
81  return t;
82  }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
long double T
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 >
T* TFileDirectory::make ( const Arg1 &  a1,
const Arg2 &  a2,
const Arg3 &  a3 
) const
inline

make new ROOT object

Definition at line 85 of file TFileDirectory.h.

References _cd(), and lumiQTWidget::t.

85  {
86  TDirectory *d = _cd();
87  T * t = new T( a1, a2, a3 );
88  ROOT::DirAutoAdd_t func = T::Class()->GetDirectoryAutoAdd();
89  if (func) { TH1AddDirectorySentry sentry; func(t,d); }
90  else { d->Append(t); }
91  return t;
92  }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
long double T
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 >
T* TFileDirectory::make ( const Arg1 &  a1,
const Arg2 &  a2,
const Arg3 &  a3,
const Arg4 &  a4 
) const
inline

make new ROOT object

Definition at line 95 of file TFileDirectory.h.

References _cd(), and lumiQTWidget::t.

95  {
96  TDirectory *d = _cd();
97  T * t = new T( a1, a2, a3, a4 );
98  ROOT::DirAutoAdd_t func = T::Class()->GetDirectoryAutoAdd();
99  if (func) { TH1AddDirectorySentry sentry; func(t,d); }
100  else { d->Append(t); }
101  return t;
102  }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
long double T
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 >
T* TFileDirectory::make ( const Arg1 &  a1,
const Arg2 &  a2,
const Arg3 &  a3,
const Arg4 &  a4,
const Arg5 &  a5 
) const
inline

make new ROOT object

Definition at line 106 of file TFileDirectory.h.

References _cd(), and lumiQTWidget::t.

107  {
108  TDirectory *d = _cd();
109  T * t = new T( a1, a2, a3, a4, a5 );
110  ROOT::DirAutoAdd_t func = T::Class()->GetDirectoryAutoAdd();
111  if (func) { TH1AddDirectorySentry sentry; func(t,d); }
112  else { d->Append(t); }
113  return t;
114  }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
long double T
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 >
T* TFileDirectory::make ( const Arg1 &  a1,
const Arg2 &  a2,
const Arg3 &  a3,
const Arg4 &  a4,
const Arg5 &  a5,
const Arg6 &  a6 
) const
inline

make new ROOT object

Definition at line 118 of file TFileDirectory.h.

References _cd(), and lumiQTWidget::t.

119  {
120  TDirectory *d = _cd();
121  T * t = new T( a1, a2, a3, a4, a5, a6 );
122  ROOT::DirAutoAdd_t func = T::Class()->GetDirectoryAutoAdd();
123  if (func) { TH1AddDirectorySentry sentry; func(t,d); }
124  else { d->Append(t); }
125  return t;
126  }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
long double T
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 >
T* TFileDirectory::make ( const Arg1 &  a1,
const Arg2 &  a2,
const Arg3 &  a3,
const Arg4 &  a4,
const Arg5 &  a5,
const Arg6 &  a6,
const Arg7 &  a7 
) const
inline

make new ROOT object

Definition at line 130 of file TFileDirectory.h.

References _cd(), and lumiQTWidget::t.

131  {
132  TDirectory *d = _cd();
133  T * t = new T( a1, a2, a3, a4, a5, a6, a7 );
134  ROOT::DirAutoAdd_t func = T::Class()->GetDirectoryAutoAdd();
135  if (func) { TH1AddDirectorySentry sentry; func(t,d); }
136  else { d->Append(t); }
137  return t;
138  }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
long double T
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 >
T* TFileDirectory::make ( const Arg1 &  a1,
const Arg2 &  a2,
const Arg3 &  a3,
const Arg4 &  a4,
const Arg5 &  a5,
const Arg6 &  a6,
const Arg7 &  a7,
const Arg8 &  a8 
) const
inline

make new ROOT object

Definition at line 142 of file TFileDirectory.h.

References _cd(), and lumiQTWidget::t.

143  {
144  TDirectory *d = _cd();
145  T * t = new T( a1, a2, a3, a4, a5, a6, a7, a8 );
146  ROOT::DirAutoAdd_t func = T::Class()->GetDirectoryAutoAdd();
147  if (func) { TH1AddDirectorySentry sentry; func(t,d); }
148  else { d->Append(t); }
149  return t;
150  }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
long double T
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 >
T* TFileDirectory::make ( const Arg1 &  a1,
const Arg2 &  a2,
const Arg3 &  a3,
const Arg4 &  a4,
const Arg5 &  a5,
const Arg6 &  a6,
const Arg7 &  a7,
const Arg8 &  a8,
const Arg9 &  a9 
) const
inline

make new ROOT object

Definition at line 155 of file TFileDirectory.h.

References _cd(), and lumiQTWidget::t.

157  {
158  TDirectory *d = _cd();
159  T * t = new T( a1, a2, a3, a4, a5, a6, a7, a8, a9 );
160  ROOT::DirAutoAdd_t func = T::Class()->GetDirectoryAutoAdd();
161  if (func) { TH1AddDirectorySentry sentry; func(t,d); }
162  else { d->Append(t); }
163  return t;
164  }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
long double T
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 , typename Arg10 >
T* TFileDirectory::make ( const Arg1 &  a1,
const Arg2 &  a2,
const Arg3 &  a3,
const Arg4 &  a4,
const Arg5 &  a5,
const Arg6 &  a6,
const Arg7 &  a7,
const Arg8 &  a8,
const Arg9 &  a9,
const Arg10 &  a10 
) const
inline

make new ROOT object

Definition at line 169 of file TFileDirectory.h.

References _cd(), and lumiQTWidget::t.

171  {
172  TDirectory *d = _cd();
173  T * t = new T( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 );
174  ROOT::DirAutoAdd_t func = T::Class()->GetDirectoryAutoAdd();
175  if (func) { TH1AddDirectorySentry sentry; func(t,d); }
176  else { d->Append(t); }
177  return t;
178  }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
long double T
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 , typename Arg10 , typename Arg11 >
T* TFileDirectory::make ( const Arg1 &  a1,
const Arg2 &  a2,
const Arg3 &  a3,
const Arg4 &  a4,
const Arg5 &  a5,
const Arg6 &  a6,
const Arg7 &  a7,
const Arg8 &  a8,
const Arg9 &  a9,
const Arg10 &  a10,
const Arg11 &  a11 
) const
inline

make new ROOT object

Definition at line 183 of file TFileDirectory.h.

References _cd(), and lumiQTWidget::t.

185  {
186  TDirectory *d = _cd();
187  T * t = new T( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 );
188  ROOT::DirAutoAdd_t func = T::Class()->GetDirectoryAutoAdd();
189  if (func) { TH1AddDirectorySentry sentry; func(t,d); }
190  else { d->Append(t); }
191  return t;
192  }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
long double T
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 , typename Arg10 , typename Arg11 , typename Arg12 >
T* TFileDirectory::make ( const Arg1 &  a1,
const Arg2 &  a2,
const Arg3 &  a3,
const Arg4 &  a4,
const Arg5 &  a5,
const Arg6 &  a6,
const Arg7 &  a7,
const Arg8 &  a8,
const Arg9 &  a9,
const Arg10 &  a10,
const Arg11 &  a11,
const Arg12 &  a12 
) const
inline

make new ROOT object

Definition at line 197 of file TFileDirectory.h.

References _cd(), and lumiQTWidget::t.

199  {
200  TDirectory *d = _cd();
201  T * t = new T( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 );
202  ROOT::DirAutoAdd_t func = T::Class()->GetDirectoryAutoAdd();
203  if (func) { TH1AddDirectorySentry sentry; func(t,d); }
204  else { d->Append(t); }
205  return t;
206  }
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
long double T
TFileDirectory TFileDirectory::mkdir ( const std::string &  dir,
const std::string &  descr = "" 
)

create a new subdirectory

Definition at line 162 of file TFileDirectory.cc.

Referenced by AlignmentMonitorBase::AlignmentMonitorBase(), APVCyclePhaseMonitor::analyze(), BigEventsDebugger< T >::analyze(), CentralityTableProducer::analyze(), SiStripBaselineAnalyzer::analyze(), SiStripSpyDisplayModule::analyze(), fwlite::AnalyzerWrapper< T >::AnalyzerWrapper(), L1GctValidation::beginJob(), L1TauAnalyzer::beginJob(), PrimaryVertexValidation::beginJob(), HLTOfflineReproducibility::beginRun(), RunHistogramManager::beginRun(), BigEventsDebugger< T >::BigEventsDebugger(), BjetAnalysis::BjetAnalysis(), DigiInvestigatorHistogramMaker::book(), DigiPileupCorrHistogramMaker::book(), DigiVertexCorrHistogramMaker::book(), BeamSpotHistogramMaker::book(), VertexHistogramMaker::book(), DigiLumiCorrHistogramMaker::book(), DigiBXCorrHistogramMaker< T >::book(), BSvsPVHistogramMaker::book(), L1GtDataEmulAnalyzer::bookHistograms(), IsolatedGenParticles::BookHistograms(), IsolatedTracksNxN::BookHistograms(), CosmicGenFilterHelix::createHistsEnd(), CosmicGenFilterHelix::createHistsStart(), AlignmentMonitorBase::directory(), TrackerOfflineValidation::DirectoryWrapper::DirectoryWrapper(), EWKSystUnc::EWKSystUnc(), VariablePlotter::fill(), MuonAlignmentFromReference::fitAndAlign(), GctErrorAnalyzer::GctErrorAnalyzer(), GlbMuQualityCutsAnalysis::GlbMuQualityCutsAnalysis(), HCalSD::HCalSD(), HFGflash::HFGflash(), HFShowerParam::HFShowerParam(), HiEvtPlaneFlatCalib::HiEvtPlaneFlatCalib(), WMuNuValidator::init_histograms(), main(), MultiplicityTimeCorrelations::MultiplicityTimeCorrelations(), TrackerDpgAnalysis::TrackerDpgAnalysis(), TrackerGeometryCompare::TrackerGeometryCompare(), ZHistogrammer::ZHistogrammer(), ZLONLOHistogrammer::ZLONLOHistogrammer(), ZMCHistogrammer::ZMCHistogrammer(), ZMuMu_efficiencyAnalyzer::ZMuMu_efficiencyAnalyzer(), ZMuMuAnalyzer_cynematics::ZMuMuAnalyzer_cynematics(), ZMuMuEfficiency::ZMuMuEfficiency(), ZMuPtScaleAnalyzer::ZMuPtScaleAnalyzer(), and zPdfUnc::zPdfUnc().

163 {
164  TH1AddDirectorySentry sentry;
165  _cd();
166  return TFileDirectory( dir, descr, file_, fullPath() );
167 }
TFileDirectory(const std::string &dir, const std::string &descr, TFile *file, const std::string &path)
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
std::string fullPath() const
return the full path of the stored histograms
dbl *** dir
Definition: mlp_gen.cc:35

Friends And Related Function Documentation

friend class fwlite::TFileService
friend

Definition at line 232 of file TFileDirectory.h.

friend class TFileService
friend

Definition at line 231 of file TFileDirectory.h.

Member Data Documentation

std::string TFileDirectory::descr_
private

Definition at line 234 of file TFileDirectory.h.

Referenced by TFileService::setDirectoryName().

std::string TFileDirectory::dir_
private

Definition at line 234 of file TFileDirectory.h.

Referenced by TFileService::setDirectoryName().

TFile* TFileDirectory::file_
private

Definition at line 233 of file TFileDirectory.h.

std::string TFileDirectory::path_
private