CMS 3D CMS Logo

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

#include <TFileService.h>

Public Member Functions

void afterBeginJob ()
 Hook for writing info into JR. More...
 
bool cd () const
 
TFile & file () const
 return opened TFile More...
 
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 , typename... Args>
Tmake (const Args &...args) const
 make new ROOT object More...
 
TFileDirectory mkdir (const std::string &dir, const std::string &descr="")
 create a new subdirectory More...
 
TFileDirectorytFileDirectory ()
 
 TFileService (const edm::ParameterSet &, edm::ActivityRegistry &)
 constructor More...
 
 ~TFileService ()
 destructor More...
 

Static Public Attributes

static const std::string kSharedResource = "TFileService"
 

Private Member Functions

void postModuleEvent (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleGlobal (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void preModuleEvent (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleGlobal (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void setDirectoryName (const edm::ModuleDescription &desc)
 

Private Attributes

bool closeFileFast_
 
TFile * file_
 pointer to opened TFile More...
 
std::string fileName_
 
bool fileNameRecorded_
 

Static Private Attributes

static thread_local TFileDirectory tFileDirectory_
 

Detailed Description

Definition at line 30 of file TFileService.h.

Constructor & Destructor Documentation

TFileService::TFileService ( const edm::ParameterSet cfg,
edm::ActivityRegistry r 
)

constructor

Definition at line 17 of file TFileService.cc.

References afterBeginJob(), file_, TFileDirectory::file_, fileName_, postModuleEvent(), postModuleGlobal(), preModuleEvent(), preModuleGlobal(), setDirectoryName(), tFileDirectory_, edm::ActivityRegistry::watchPostBeginJob(), edm::ActivityRegistry::watchPostModuleEvent(), edm::ActivityRegistry::watchPostModuleGlobalBeginLumi(), edm::ActivityRegistry::watchPostModuleGlobalBeginRun(), edm::ActivityRegistry::watchPostModuleGlobalEndLumi(), edm::ActivityRegistry::watchPostModuleGlobalEndRun(), edm::ActivityRegistry::watchPreModuleBeginJob(), edm::ActivityRegistry::watchPreModuleConstruction(), edm::ActivityRegistry::watchPreModuleEndJob(), edm::ActivityRegistry::watchPreModuleEvent(), edm::ActivityRegistry::watchPreModuleGlobalBeginLumi(), edm::ActivityRegistry::watchPreModuleGlobalBeginRun(), edm::ActivityRegistry::watchPreModuleGlobalEndLumi(), and edm::ActivityRegistry::watchPreModuleGlobalEndRun().

18  : file_(nullptr),
19  fileName_(cfg.getParameter<std::string>("fileName")),
20  fileNameRecorded_(false),
21  closeFileFast_(cfg.getUntrackedParameter<bool>("closeFileFast", false)) {
22  tFileDirectory_ = TFileDirectory("", "", TFile::Open(fileName_.c_str(), "RECREATE"), "");
24 
25  // activities to monitor in order to set the proper directory
31 
36 
41 
42  // delay writing into JobReport after BeginJob
44 }
void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const &iSlot)
void postModuleGlobal(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: TFileService.cc:75
void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const &iSlot)
T getUntrackedParameter(std::string const &, T const &) const
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
void watchPreModuleConstruction(PreModuleConstruction::slot_type const &iSlot)
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const &iSlot)
TFile * file_
pointer to opened TFile
Definition: TFileService.h:81
void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const &iSlot)
static thread_local TFileDirectory tFileDirectory_
Definition: TFileService.h:79
std::string fileName_
Definition: TFileService.h:82
void setDirectoryName(const edm::ModuleDescription &desc)
Definition: TFileService.cc:54
void watchPreModuleEndJob(PreModuleEndJob::slot_type const &iSlot)
void watchPreModuleBeginJob(PreModuleBeginJob::slot_type const &iSlot)
void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const &iSlot)
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: TFileService.cc:64
void watchPostModuleGlobalEndRun(PostModuleGlobalEndRun::slot_type const &iSlot)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: TFileService.cc:60
bool fileNameRecorded_
Definition: TFileService.h:83
bool closeFileFast_
Definition: TFileService.h:84
void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const &iSlot)
void afterBeginJob()
Hook for writing info into JR.
Definition: TFileService.cc:82
void preModuleGlobal(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: TFileService.cc:71
void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const &iSlot)
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
TFileService::~TFileService ( )

destructor

Definition at line 46 of file TFileService.cc.

References closeFileFast_, and file_.

46  {
47  file_->Write();
48  if (closeFileFast_)
49  gROOT->GetListOfFiles()->Remove(file_);
50  file_->Close();
51  delete file_;
52 }
TFile * file_
pointer to opened TFile
Definition: TFileService.h:81
bool closeFileFast_
Definition: TFileService.h:84

Member Function Documentation

void TFileService::afterBeginJob ( )

Hook for writing info into JR.

Definition at line 82 of file TFileService.cc.

References Exception, fileName_, fileNameRecorded_, newFWLiteAna::fullName, edm::JobReport::reportAnalysisFile(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by TFileService().

82  {
83  if (!fileName_.empty()) {
84  if (!fileNameRecorded_) {
85  std::string fullName(1024, '\0');
86 
87  while (getcwd(&fullName[0], fullName.size()) == nullptr) {
88  if (errno != ERANGE) {
89  throw cms::Exception("TFileService")
90  << "Failed to get current directory (errno=" << errno << "): " << strerror(errno);
91  }
92  fullName.resize(fullName.size() * 2, '\0');
93  }
94  fullName.resize(fullName.find('\0'));
95 
96  fullName += "/" + fileName_;
97 
98  std::map<std::string, std::string> fileData;
99  fileData.insert(std::make_pair("Source", "TFileService"));
100 
102  reportSvc->reportAnalysisFile(fullName, fileData);
103  fileNameRecorded_ = true;
104  }
105  }
106 }
std::string fileName_
Definition: TFileService.h:82
string fullName
bool fileNameRecorded_
Definition: TFileService.h:83
void reportAnalysisFile(std::string const &fileName, std::map< std::string, std::string > const &fileData)
Definition: JobReport.cc:473
bool TFileService::cd ( ) const
inline
TFile& TFileService::file ( ) const
inline
std::string TFileService::fullPath ( ) const
inline

return the full path of the stored histograms

Definition at line 74 of file TFileService.h.

References TFileDirectory::fullPath(), and tFileDirectory_.

Referenced by SiPixelPhase1Analyzer::BookHistograms().

74 { return tFileDirectory_.fullPath(); }
static thread_local TFileDirectory tFileDirectory_
Definition: TFileService.h:79
std::string fullPath() const
return the full path of the stored histograms
TDirectory* TFileService::getBareDirectory ( const std::string &  subdir = "") const
inline
template<typename T >
T* TFileService::getObject ( const std::string &  objname,
const std::string &  subdir = "" 
)
inline

Definition at line 58 of file TFileService.h.

References TFileDirectory::getObject(), and tFileDirectory_.

58  {
59  return tFileDirectory_.getObject<T>(objname, subdir);
60  }
static thread_local TFileDirectory tFileDirectory_
Definition: TFileService.h:79
T * getObject(const std::string &objname, const std::string &subdir="")
long double T
template<typename T , typename... Args>
T* TFileService::make ( const Args &...  args) const
inline

make new ROOT object

Definition at line 64 of file TFileService.h.

References TFileDirectory::make(), and tFileDirectory_.

Referenced by _rhm(), AlCaHOCalibProducer::AlCaHOCalibProducer(), SiStripHitEffFromCalibTree::algoAnalyze(), SiStripGainFromCalibTree::algoEndJob(), AlignmentMonitorMuonSystemMap1D::AlignmentMonitorMuonSystemMap1D(), AlignmentMuonHIPTrajectorySelector::AlignmentMuonHIPTrajectorySelector(), PixelDCSObjectReader< Record >::analyze(), JetResolutionDemo::analyze(), SiPixelVCalReader::analyze(), SiPixelLorentzAngleReader::analyze(), MuonAlignmentAnalyzer::analyze(), SiPixelBadModuleReader::analyze(), cms::SiPixelCondObjOfflineReader::analyze(), cms::SiPixelCondObjReader::analyze(), cms::SiPixelCondObjForHLTReader::analyze(), cms::SiPixelCondObjAllPayloadsReader::analyze(), EcalMipGraphs::analyze(), EcalDisplaysByEvent::analyze(), CastorPedestalsAnalysis::analyze(), tnp::BaseTreeFiller::BaseTreeFiller(), PatZjetsElectronAnalyzer::beginJob(), PatZjetsJetAnalyzer::beginJob(), PatTauAnalyzer::beginJob(), PatMCMatching::beginJob(), PatMCMatchingExtended::beginJob(), PatTriggerAnalyzer::beginJob(), PatTriggerTagAndProbe::beginJob(), myRawAna::beginJob(), PatBJetTagAnalyzer::beginJob(), PatBTagAnalyzer::beginJob(), PatTopSelectionAnalyzer::beginJob(), PatBasicAnalyzer::beginJob(), HcalHBHENewMuonAnalyzer::beginJob(), PatTrackAnalyzer::beginJob(), ExampleMuonAnalyzer::beginJob(), PatVertexAnalyzer::beginJob(), MaterialBudgetHcalAnalysis::beginJob(), JetCorrectorDemo::beginJob(), FactorizedJetCorrectorDemo::beginJob(), PatBJetTrackAnalyzer::beginJob(), cms::MinBias::beginJob(), l1t::L1TStage2CaloAnalyzer::beginJob(), HitParentTest::beginJob(), MCPhotonAnalyzer::beginJob(), PatBJetVertexAnalyzer::beginJob(), HcalIsoTrackAnalyzer::beginJob(), ResolutionCreator::beginJob(), SimAnalyzerMinbias::beginJob(), PhotonsWithConversionsAnalyzer::beginJob(), HcalSimHitAnalysis::beginJob(), HOSimHitStudy::beginJob(), RecAnalyzerHF::beginJob(), EcalSimHitStudy::beginJob(), HGCalTimingAnalyzer::beginJob(), HcalGeomCheck::beginJob(), SiPixelDQMRocLevelAnalyzer::beginJob(), MuonAlignmentAnalyzer::beginJob(), ContainmentCorrectionAnalyzer::beginJob(), BeamSpotRcdReader::beginJob(), FFTJetImageRecorder::beginJob(), BeamSpotOnlineRecordsReader::beginJob(), HGCalSimHitStudy::beginJob(), HitEff::beginJob(), HcalRaddamMuon::beginJob(), HGCalTBAnalyzer::beginJob(), StudyTriggerHLT::beginJob(), FFTJetPileupAnalyzer::beginJob(), CosmicSplitterValidation::beginJob(), cms::Analyzer_minbias::beginJob(), AnalyzerMinbias::beginJob(), PixelBaryCentreAnalyzer::beginJob(), ValidIsoTrkCalib::beginJob(), DiMuonVertexValidation::beginJob(), DiElectronVertexValidation::beginJob(), RecAnalyzerMinbias::beginJob(), IsoTrackCalibration::beginJob(), HcalHBHEMuonAnalyzer::beginJob(), PrimaryVertexValidation::beginJob(), HcalHBHEMuonHighEtaAnalyzer::beginJob(), SplitVertexResolution::beginJob(), IsoTrackCalib::beginJob(), HcalIsoTrkSimAnalyzer::beginJob(), StudyCaloResponse::beginJob(), HcalIsoTrkAnalyzer::beginJob(), IsoTrig::beginJob(), L1TrackObjectNtupleMaker::beginJob(), IsolatedTracksHcalScale::beginJob(), CMTRawAnalyzer::beginJob(), GeneralPurposeTrackAnalyzer::beginJob(), HcalSimHitCheck::beginRun(), HGCalBHValidation::beginRun(), HGCalTBAnalyzer::beginRun(), StudyTriggerHLT::beginRun(), RecAnalyzerMinbias::beginRun(), StudyCaloResponse::beginRun(), MaterialBudgetCastorHistos::book(), MaterialBudgetHcalHistos::book(), MaterialBudgetForward::book(), MaterialBudget::book(), TrackerRemapper::bookBins(), MaterialBudgetVolumeAnalysis::bookHisto(), IsolatedParticlesGeneratedJets::bookHistograms(), StudyCaloGen::bookHistograms(), SiPixelPhase1Analyzer::BookHistograms(), IsolatedGenParticles::bookHistograms(), IsolatedTracksNxN::bookHistograms(), MuonAlignmentFromReference::bookNtuple(), SVTagInfoValidationAnalyzer::bookRecoToSim(), SVTagInfoValidationAnalyzer::bookSimToReco(), IsolatedTracksCone::buildTree(), calcTopMass::calcTopMass(), CaloSimHitAnalysis::CaloSimHitAnalysis(), CaloSimHitStudy::CaloSimHitStudy(), CherenkovAnalysis::CherenkovAnalysis(), CMSDAS11DijetAnalyzer::CMSDAS11DijetAnalyzer(), CMSDAS11DijetTestAnalyzer::CMSDAS11DijetTestAnalyzer(), CommonModeAnalyzer::CommonModeAnalyzer(), SiStripHitEffFromCalibTree::ComputeEff(), CSCPairResidualsConstraint::configure(), CosmicRateAnalyzer::CosmicRateAnalyzer(), CSCOverlapsAlignmentAlgorithm::CSCOverlapsAlignmentAlgorithm(), CSCOverlapsBeamSplashCut::CSCOverlapsBeamSplashCut(), DuplicateRecHits::DuplicateRecHits(), EcalDisplaysByEvent::EcalDisplaysByEvent(), EcalMipGraphs::EcalMipGraphs(), ElectronStudy::ElectronStudy(), JetCorrectorDemo::endJob(), FactorizedJetCorrectorDemo::endJob(), SplitVertexResolution::endJob(), IsoTrig::endJob(), TrackerOfflineValidation::endJob(), GeneralPurposeTrackAnalyzer::endJob(), TkLasBeamFitter::endRunProduce(), EopTreeWriter::EopTreeWriter(), SiPixelGainCalibrationReadDQMFile::fillDatabase(), G4StepStatistics::G4StepStatistics(), GEMPackingTester::GEMPackingTester(), HcalTB02Histo::HcalTB02Histo(), HcalTB04Histo::HcalTB04Histo(), HcalTB06Histo::HcalTB06Histo(), HcalTestAnalyzer::HcalTestAnalyzer(), HcalTestHistoManager::HcalTestHistoManager(), HGCalTBMB::HGCalTBMB(), HGCalTBMBAnalyzer::HGCalTBMBAnalyzer(), HGCalTriggerNtupleManager::HGCalTriggerNtupleManager(), HIPTwoBodyDecayAnalyzer::HIPTwoBodyDecayAnalyzer(), HLTBitAnalyzer::HLTBitAnalyzer(), HLTCSCOverlapFilter::HLTCSCOverlapFilter(), HOCalibAnalyzer::HOCalibAnalyzer(), HcalForwardAnalysis::init(), EcalMipGraphs::initHists(), EcalDisplaysByEvent::initHists(), HltComparator::initialise(), HGCSD::initRun(), L1CaloTowerTreeProducer::L1CaloTowerTreeProducer(), L1ElectronRecoTreeProducer::L1ElectronRecoTreeProducer(), L1EventTreeProducer::L1EventTreeProducer(), L1ExtraTreeProducer::L1ExtraTreeProducer(), L1GenTreeProducer::L1GenTreeProducer(), L1HOTreeProducer::L1HOTreeProducer(), L1JetRecoTreeProducer::L1JetRecoTreeProducer(), L1MenuTreeProducer::L1MenuTreeProducer(), L1MetFilterRecoTreeProducer::L1MetFilterRecoTreeProducer(), L1MuonRecoTreeProducer::L1MuonRecoTreeProducer(), L1RCTRelValAnalyzer::L1RCTRelValAnalyzer(), L1RCTTestAnalyzer::L1RCTTestAnalyzer(), L1RecoTreeProducer::L1RecoTreeProducer(), L1TauRecoTreeProducer::L1TauRecoTreeProducer(), L1uGTTreeProducer::L1uGTTreeProducer(), L1UpgradeTfMuonTreeProducer::L1UpgradeTfMuonTreeProducer(), L1UpgradeTreeProducer::L1UpgradeTreeProducer(), SiStripHitEffFromCalibTree::makeHotColdMaps(), SiStripHitEffFromCalibTree::makeSummary(), SiStripHitEffFromCalibTree::makeSummaryVsBx(), SiStripHitEffFromCalibTree::makeTKMap(), MCVerticesAnalyzer::MCVerticesAnalyzer(), MCvsRecoVerticesAnalyzer::MCvsRecoVerticesAnalyzer(), MultiplicityCorrelatorHistogramMaker::MultiplicityCorrelatorHistogramMaker(), OverlapProblemTPAnalyzer::OverlapProblemTPAnalyzer(), OverlapProblemTSOSAnalyzer::OverlapProblemTSOSAnalyzer(), PatJetAnalyzer::PatJetAnalyzer(), PatZToMuMuAnalyzer::PatZToMuMuAnalyzer(), PDFWeightsTest::PDFWeightsTest(), PFAnalysis::PFAnalysis(), CSCAlignmentCorrections::plot(), PUDumper::PUDumper(), VariableNTupler::registerleaves(), StringBasedNTupler::registerleaves(), SeedMultiplicityAnalyzer::SeedMultiplicityAnalyzer(), EcalMipGraphs::selectDigi(), EcalDisplaysByEvent::selectDigi(), PatBTagCommonHistos::Set(), ZMuMuMassConstraintParameterFinder::DiMuonInfo::setupTree(), ShallowTree::ShallowTree(), SiPixelQualityHistory::SiPixelQualityHistory(), SiStripApvGainReader::SiStripApvGainReader(), SiStripQualityHistory::SiStripQualityHistory(), SiStripGainFromCalibTree::storeOnTree(), SVTagInfoValidationAnalyzer::SVTagInfoValidationAnalyzer(), TrackCategoriesAnalyzer::TrackCategoriesAnalyzer(), TrackCount::TrackCount(), TrackingParticleCategoriesAnalyzer::TrackingParticleCategoriesAnalyzer(), TreeWriterForEcalCorrection::TreeWriterForEcalCorrection(), and l1tVertexFinder::VertexNTupler::VertexNTupler().

64  {
65  return tFileDirectory_.make<T>(args...);
66  }
static thread_local TFileDirectory tFileDirectory_
Definition: TFileService.h:79
T * make(const Args &...args) const
make new ROOT object
long double T
TFileDirectory TFileService::mkdir ( const std::string &  dir,
const std::string &  descr = "" 
)
inline

create a new subdirectory

Definition at line 69 of file TFileService.h.

References TFileDirectory::mkdir(), and tFileDirectory_.

Referenced by AlignmentMonitorBase::AlignmentMonitorBase(), CentralityTableProducer::analyze(), cms::SiPixelCondObjOfflineReader::analyze(), cms::SiPixelCondObjReader::analyze(), cms::SiPixelCondObjForHLTReader::analyze(), cms::SiPixelCondObjAllPayloadsReader::analyze(), CastorPedestalsAnalysis::analyze(), l1t::L1TStage2CaloAnalyzer::beginJob(), HFPMTHitAnalyzer::beginJob(), L1GctValidation::beginJob(), l1t::L1TGlobalAnalyzer::beginJob(), NearbyPixelClustersAnalyzer::beginJob(), DiMuonVertexValidation::beginJob(), DiElectronVertexValidation::beginJob(), PrimaryVertexValidation::beginJob(), SplitVertexResolution::beginJob(), NearbyPixelClustersAnalyzer::beginRun(), BigEventsDebugger< T >::BigEventsDebugger(), DigiVtxPosCorrHistogramMaker::book(), DigiInvestigatorHistogramMaker::book(), DigiPileupCorrHistogramMaker::book(), DigiVertexCorrHistogramMaker::book(), BeamSpotHistogramMaker::book(), DigiBXCorrHistogramMaker< T >::book(), DigiLumiCorrHistogramMaker::book(), VertexHistogramMaker::book(), BSvsPVHistogramMaker::book(), tmtt::Histos::bookEtaPhiSectors(), StudyCaloGen::bookHistograms(), L1GtDataEmulAnalyzer::bookHistograms(), IsolatedGenParticles::bookHistograms(), IsolatedTracksNxN::bookHistograms(), tmtt::Histos::bookInputData(), tmtt::Histos::bookRphiHT(), tmtt::Histos::bookRZfilters(), ApeEstimator::bookSectorHistsForAnalyzerMode(), ApeEstimator::bookSectorHistsForApeCalculation(), tmtt::Histos::bookTrackCands(), tmtt::Histos::bookTrackFitting(), ApeEstimator::bookTrackHists(), CosmicGenFilterHelix::createHistsEnd(), CosmicGenFilterHelix::createHistsStart(), TrackerOfflineValidation::DirectoryWrapper::DirectoryWrapper(), ECalSD::ECalSD(), PatBTagAnalyzer::endJob(), TrackerTreeGenerator::endJob(), PrimaryVertexValidation::endJob(), SplitVertexResolution::endJob(), MuonAlignmentFromReference::fitAndAlign(), GctErrorAnalyzer::GctErrorAnalyzer(), HCalSD::HCalSD(), HFGflash::HFGflash(), HFShowerParam::HFShowerParam(), MultiplicityTimeCorrelations::MultiplicityTimeCorrelations(), tmtt::Histos::plotTrackEffAfterFit(), tmtt::Histos::plotTrackEfficiency(), batchmanager.BatchManager::PrepareJob(), TrackCategoriesAnalyzer::TrackCategoriesAnalyzer(), TrackerDpgAnalysis::TrackerDpgAnalysis(), tmtt::Histos::trackerGeometryAnalysis(), TrackerGeometryCompare::TrackerGeometryCompare(), TrackingParticleCategoriesAnalyzer::TrackingParticleCategoriesAnalyzer(), and TSOSHistogramMaker::TSOSHistogramMaker().

69  {
70  return tFileDirectory_.mkdir(dir, descr);
71  }
static thread_local TFileDirectory tFileDirectory_
Definition: TFileService.h:79
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
void TFileService::postModuleEvent ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 64 of file TFileService.cc.

References edm::ModuleCallingContext::moduleDescription(), edm::ModuleCallingContext::previousModuleOnThread(), and setDirectoryName().

Referenced by TFileService().

64  {
65  edm::ModuleCallingContext const* previous_mcc = mcc.previousModuleOnThread();
66  if (previous_mcc) {
67  setDirectoryName(*previous_mcc->moduleDescription());
68  }
69 }
void setDirectoryName(const edm::ModuleDescription &desc)
Definition: TFileService.cc:54
ModuleDescription const * moduleDescription() const
ModuleCallingContext const * previousModuleOnThread() const
void TFileService::postModuleGlobal ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 75 of file TFileService.cc.

References edm::ModuleCallingContext::moduleDescription(), edm::ModuleCallingContext::previousModuleOnThread(), and setDirectoryName().

Referenced by TFileService().

75  {
76  edm::ModuleCallingContext const* previous_mcc = mcc.previousModuleOnThread();
77  if (previous_mcc) {
78  setDirectoryName(*previous_mcc->moduleDescription());
79  }
80 }
void setDirectoryName(const edm::ModuleDescription &desc)
Definition: TFileService.cc:54
ModuleDescription const * moduleDescription() const
ModuleCallingContext const * previousModuleOnThread() const
void TFileService::preModuleEvent ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 60 of file TFileService.cc.

References edm::ModuleCallingContext::moduleDescription(), and setDirectoryName().

Referenced by TFileService().

60  {
61  setDirectoryName(*mcc.moduleDescription());
62 }
void setDirectoryName(const edm::ModuleDescription &desc)
Definition: TFileService.cc:54
void TFileService::preModuleGlobal ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 71 of file TFileService.cc.

References edm::ModuleCallingContext::moduleDescription(), and setDirectoryName().

Referenced by TFileService().

71  {
72  setDirectoryName(*mcc.moduleDescription());
73 }
void setDirectoryName(const edm::ModuleDescription &desc)
Definition: TFileService.cc:54
void TFileService::setDirectoryName ( const edm::ModuleDescription desc)
private

Definition at line 54 of file TFileService.cc.

References TFileDirectory::descr_, TFileDirectory::dir_, file_, TFileDirectory::file_, edm::ModuleDescription::moduleLabel(), edm::ModuleDescription::moduleName(), and tFileDirectory_.

Referenced by postModuleEvent(), postModuleGlobal(), preModuleEvent(), preModuleGlobal(), and TFileService().

54  {
57  tFileDirectory_.descr_ = tFileDirectory_.dir_ + " (" + desc.moduleName() + ") folder";
58 }
std::string const & moduleName() const
TFile * file_
pointer to opened TFile
Definition: TFileService.h:81
std::string const & moduleLabel() const
static thread_local TFileDirectory tFileDirectory_
Definition: TFileService.h:79
std::string dir_
std::string descr_
TFileDirectory& TFileService::tFileDirectory ( )
inline

Member Data Documentation

bool TFileService::closeFileFast_
private

Definition at line 84 of file TFileService.h.

Referenced by ~TFileService().

TFile* TFileService::file_
private

pointer to opened TFile

Definition at line 81 of file TFileService.h.

Referenced by file(), setDirectoryName(), TFileService(), and ~TFileService().

std::string TFileService::fileName_
private

Definition at line 82 of file TFileService.h.

Referenced by afterBeginJob(), and TFileService().

bool TFileService::fileNameRecorded_
private

Definition at line 83 of file TFileService.h.

Referenced by afterBeginJob().

const std::string TFileService::kSharedResource = "TFileService"
static

Definition at line 76 of file TFileService.h.

Referenced by AlCaHOCalibProducer::AlCaHOCalibProducer(), AlignmentProducerAsAnalyzer::AlignmentProducerAsAnalyzer(), cms::Analyzer_minbias::Analyzer_minbias(), AnalyzerMinbias::AnalyzerMinbias(), AnotherBeamSpotAnalyzer::AnotherBeamSpotAnalyzer(), AnotherPrimaryVertexAnalyzer::AnotherPrimaryVertexAnalyzer(), BSvsPVAnalyzer::BSvsPVAnalyzer(), CaloSimHitAnalysis::CaloSimHitAnalysis(), CaloSimHitStudy::CaloSimHitStudy(), CastorPedestalsAnalysis::CastorPedestalsAnalysis(), CherenkovAnalysis::CherenkovAnalysis(), CMTRawAnalyzer::CMTRawAnalyzer(), CosmicGenFilterHelix::CosmicGenFilterHelix(), CosmicRateAnalyzer::CosmicRateAnalyzer(), CosmicSplitterValidation::CosmicSplitterValidation(), CSCOverlapsBeamSplashCut::CSCOverlapsBeamSplashCut(), DiElectronVertexValidation::DiElectronVertexValidation(), DiMuonVertexValidation::DiMuonVertexValidation(), DMRChecker::DMRChecker(), EcalSimHitStudy::EcalSimHitStudy(), EopTreeWriter::EopTreeWriter(), GeneralPurposeTrackAnalyzer::GeneralPurposeTrackAnalyzer(), HcalGeomCheck::HcalGeomCheck(), HcalHBHEMuonAnalyzer::HcalHBHEMuonAnalyzer(), HcalHBHEMuonHighEtaAnalyzer::HcalHBHEMuonHighEtaAnalyzer(), HcalHBHENewMuonAnalyzer::HcalHBHENewMuonAnalyzer(), HcalIsoTrackAnalyzer::HcalIsoTrackAnalyzer(), HcalIsoTrkAnalyzer::HcalIsoTrkAnalyzer(), HcalIsoTrkSimAnalyzer::HcalIsoTrkSimAnalyzer(), HcalRaddamMuon::HcalRaddamMuon(), HcalSimHitAnalysis::HcalSimHitAnalysis(), HcalTestAnalyzer::HcalTestAnalyzer(), HFPMTHitAnalyzer::HFPMTHitAnalyzer(), HGCalBHValidation::HGCalBHValidation(), HGCalSimHitStudy::HGCalSimHitStudy(), HIPTwoBodyDecayAnalyzer::HIPTwoBodyDecayAnalyzer(), HitParentTest::HitParentTest(), HOCalibAnalyzer::HOCalibAnalyzer(), HOSimHitStudy::HOSimHitStudy(), IsolatedGenParticles::IsolatedGenParticles(), IsolatedParticlesGeneratedJets::IsolatedParticlesGeneratedJets(), IsolatedTracksHcalScale::IsolatedTracksHcalScale(), IsolatedTracksNxN::IsolatedTracksNxN(), IsoTrackCalib::IsoTrackCalib(), IsoTrig::IsoTrig(), JetCorrectorDemo::JetCorrectorDemo(), JetCorrectorOnTheFly< Jet >::JetCorrectorOnTheFly(), JetResolutionDemo::JetResolutionDemo(), L1Muon2RecoTreeProducer::L1Muon2RecoTreeProducer(), MaterialBudgetHcalAnalysis::MaterialBudgetHcalAnalysis(), MaterialBudgetVolumeAnalysis::MaterialBudgetVolumeAnalysis(), MuonAlignmentAnalyzer::MuonAlignmentAnalyzer(), NearbyPixelClustersAnalyzer::NearbyPixelClustersAnalyzer(), PFAnalysis::PFAnalysis(), PixelDCSObjectReader< Record >::PixelDCSObjectReader(), PrimaryVertexValidation::PrimaryVertexValidation(), ShallowTree::ShallowTree(), SimAnalyzerMinbias::SimAnalyzerMinbias(), SiPixelBadModuleReader::SiPixelBadModuleReader(), cms::SiPixelCondObjAllPayloadsReader::SiPixelCondObjAllPayloadsReader(), cms::SiPixelCondObjOfflineReader::SiPixelCondObjOfflineReader(), cms::SiPixelCondObjReader::SiPixelCondObjReader(), SiPixelDQMRocLevelAnalyzer::SiPixelDQMRocLevelAnalyzer(), SiPixelGainCalibrationReadDQMFile::SiPixelGainCalibrationReadDQMFile(), SiPixelLorentzAngleReader::SiPixelLorentzAngleReader(), SiPixelVCalReader::SiPixelVCalReader(), SiStripApvGainReader::SiStripApvGainReader(), SplitVertexResolution::SplitVertexResolution(), StudyCaloGen::StudyCaloGen(), StudyCaloResponse::StudyCaloResponse(), StudyTriggerHLT::StudyTriggerHLT(), TrackerOfflineValidation::TrackerOfflineValidation(), TrackerTreeGenerator::TrackerTreeGenerator(), ValidIsoTrkCalib::ValidIsoTrkCalib(), and XtalDedxAnalysis::XtalDedxAnalysis().

thread_local TFileDirectory TFileService::tFileDirectory_
staticprivate