Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
art::TFileDirectory Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/art/v2_13_00/source/art/Framework/Services/Optional/TFileDirectory.h"

Inheritance diagram for art::TFileDirectory:
art::TFileService

Public Member Functions

virtual ~TFileDirectory ()=default
 
template<typename T , typename... ARGS>
Tmake (ARGS...args) const
 
template<typename T , typename... ARGS>
TmakeAndRegister (char const *name, char const *title, ARGS...args) const
 
template<typename T , typename... ARGS>
TmakeAndRegister (std::string const &name, std::string const &title, ARGS...args) const
 
TFileDirectory mkdir (std::string const &dir, std::string const &descr="")
 

Protected Types

using Callback_t = std::function< void()>
 

Protected Member Functions

 TFileDirectory (std::string const &dir, std::string const &descr, TFile *file, std::string const &path)
 Create a new TFileDirectory object. More...
 
void invokeCallbacks ()
 
void registerCallback (Callback_t)
 
std::string fullPath () const
 

Protected Attributes

TFile * file_
 
std::string dir_
 
std::string descr_
 
bool requireCallback_ {false}
 

Private Member Functions

void cd () const
 

Private Attributes

std::string path_
 
std::map< std::string, std::vector< Callback_t > > callbacks_ {}
 

Detailed Description

Definition at line 24 of file TFileDirectory.h.

Member Typedef Documentation

using art::TFileDirectory::Callback_t = std::function<void()>
protected

Definition at line 52 of file TFileDirectory.h.

Constructor & Destructor Documentation

virtual art::TFileDirectory::~TFileDirectory ( )
virtualdefault
art::TFileDirectory::TFileDirectory ( std::string const &  dir,
std::string const &  descr,
TFile *  file,
std::string const &  path 
)
protected

Create a new TFileDirectory object.

Member Function Documentation

void art::TFileDirectory::cd ( ) const
private

Make the current directory be the one implied by the state of this TFileDirectory.

Referenced by make(), and makeAndRegister().

std::string art::TFileDirectory::fullPath ( ) const
protected

Return the full pathname of the current directory, formed from appending 'dir' to the end of 'path'.

void art::TFileDirectory::invokeCallbacks ( )
protected
template<typename T , typename... ARGS>
T * art::TFileDirectory::make ( ARGS...  args) const

make new ROOT object of type T, using constructor parameters args. It will be made in the 'current directory', as established with a call to 'cd'.

Definition at line 82 of file TFileDirectory.h.

References make_syst_table_plots::args, cd(), and T.

Referenced by calib::ADCShapeFitAna::analyze(), slicer::S4DParamCalc::analyze(), fnex::AnalyzeWeighters::analyze(), beamlinereco::EventWaveformDump::analyze(), tbana::DSToFAna::AnalyzeDSToF2Signals(), comi::ChanOcc::beginJob(), highe::HighEnergyAna::beginJob(), qeef::QeFinderVal::beginJob(), tut::TutAnalyzer::beginJob(), rsim::RecordNoiseSpectrumFile::beginJob(), cheat::TestTrackIds::beginJob(), util::RemoveTBSpills::beginJob(), util::RemoveBeamSpills::beginJob(), ve::VertexEva::beginJob(), novaddt::SingletonRejectionAna::beginJob(), calhit::CalHitAna::beginJob(), calib::FindOutliers::beginJob(), calib::AbsCalib::beginJob(), remid::ReMIdValidate::beginJob(), util::RemoveBeamSpillsPrecise::beginJob(), calib::ParticleCorrections::beginJob(), novaddt::TriCellTriggerAna::beginJob(), rsim::MakeNoiseSpectrumFile::beginJob(), air::AirShower::beginJob(), ddt::SMMADC::beginJob(), validation::ValidateDAQ2RawDigit::beginJob(), jmshower::RecoJMShowerAna::beginJob(), fnex::CalibSystHistMaker::beginJob(), lem::AlignLibToVtx::beginJob(), cheat::RecoCheckAna::beginJob(), air::AirTree::beginJob(), calib::ResizeDetector::beginJob(), febstat::FEBShutoff::beginJob(), novaddt::ClusterAna::beginJob(), calib::TestParticleCorrections::beginJob(), calib::BetheBlochFit::beginJob(), comi::CosmicMetrics::beginJob(), DataCheck::HardwareStatusCheck::beginJob(), mmc::Validation::beginJob(), dq::DAQHeaderSummaryAna::beginJob(), demo::DemoModule::beginJob(), jmshower::JMTrackMerge::beginJob(), remid::ReMIdTrain::beginJob(), beamlinereco::ToFSingleCounterAnalysis::beginJob(), BeamlineAna::beginJob(), calib::AssessCalib::beginJob(), novaddt::ActivityTriggerAna::beginJob(), febstat::EventFEBStatus::beginJob(), zcl::SMMTriggerAna::beginJob(), fnex::SortEventLists::beginJob(), supernova::SimAna::beginJob(), supernova::SnovaAna::beginJob(), tut::yn2020::FancyScience::beginJob(), calib::FiberCalibration::beginJob(), beamlinereco::ToFRecoAnalysis::beginJob(), comi::Cana::beginJob(), mcchk::MonopoleAna::beginJob(), mcchk::ShowerAnaCheck::beginJob(), earms::ElasticArmsHS::beginJob(), air::CosmicTrackRate::beginJob(), comi::DataCheck::beginJob(), mcchk::RockAna::beginJob(), tut::RecoValidationTutorial::beginJob(), tut::yn2017::AnalysisModule::beginJob(), pa::ClusterEva::beginJob(), pa::HitEva::beginJob(), slicer::S4DParamCalc::beginJob(), mcchk::NeutrinoAna::beginJob(), murem::MuonRemoveAna::beginJob(), airshower::AirSlicer::beginJob(), tut::yn2017::DebugThis::beginJob(), novatb::TOFTimingResolution::beginJob(), zcl::MMCheater::beginJob(), fnex::CovarianceMatrixMaker::beginJob(), align::SplitTracks::beginJob(), numue::NumuEAna::beginJob(), beamlinereco::WCTrackReco::beginJob(), vf::TrackEva::beginJob(), cmf::CovarianceMatrixMaker::beginJob(), sn::SNSlicerAna::beginJob(), testbeam::TestBeamCommissioning::beginJob(), bpfit::BPFdEdxHistoMaker::beginJob(), vdt::VertexDT::beginJob(), zcl::SMMCluster::beginJob(), mono::DataCheckMonopole::beginJob(), calib::TimingCalibration::beginJob(), bpfit::BPFEnergyAna::beginJob(), lem::MakeLibrary::beginJob(), calib::HitEfficiency::beginJob(), jmshower::JMClusterMerge::beginJob(), sn::SupernovaMCCluster::beginJob(), validation::NoiseClusterAnalysis::beginJob(), comi::Leana::beginJob(), dt::DiscreteTracker::beginJob(), zcl::FmmTriggerAna::beginJob(), nnbar::SigVsBkgSimCompare::beginJob(), bsf::BremShowerFilter::beginJob(), calib::EnergyStandardCandles::beginJob(), remid::ReMIdDedx::beginJob(), novaddt::HorizontalMuonAna::beginJob(), beamlinereco::EventWaveformDump::beginJob(), calib::MuondEdx::beginJob(), chaninfo::FindSwappedChannels::beginJob(), comi::NumiFilteringAna::beginJob(), trk::KalmanTrackAna::beginJob(), ddt::DataSliceEva::beginJob(), ddt::SlicerEva::beginJob(), tbem::TBRecoAna::beginJob(), zcl::FmmTrackerAna::beginJob(), zcl::FmmTrackerValidation::beginJob(), cmf::RandomUniverses::beginJob(), calib::DetRespDrift::beginJob(), novaddt::Calibration::beginJob(), hough::HoughValidate::beginJob(), calib::PEResponse::beginJob(), trigmon::LongReadoutAnalyzer::beginJob(), cvn::CVNEventDump::beginJob(), cvn::CVNCosmicEventDump::beginJob(), showere::ShowerEnergyAna::beginJob(), jmshower::NueSel::beginJob(), bpfit::BreakPointAna::beginJob(), earms::ElasticArmsValidate::beginJob(), showere::ShowerEnergyFilterMC::beginJob(), mcchk::DetSimAna::beginJob(), rockmuon::NDRockMuon::beginJob(), mono::SlowMonopoleAna::beginJob(), cvn::CVNEventProngDump::beginJob(), novaddt::UpMuAna::beginJob(), cmf::FitFeldmanCousinsPoint::beginJob(), mono::Monopole::beginJob(), calib::MuonTrackHits::beginJob(), slicer::SlicerAna::beginJob(), comi::NearlineAna::beginJob(), ncid::NCNNKeras::beginJob(), ncid::NCNNKerasVal::beginJob(), zcl::FastMMStudy::beginJob(), cheat::MCCheater::beginJob(), remid::ReMIdDedxRock::beginJob(), tbana::DetectorRateShutOff::beginJob(), ncpi0::TwoProngBDTAna::beginJob(), fuzz::FuzzyKValidate::beginJob(), remid::ReMIdDedxStudies::beginJob(), remid::ReMIdDedxFD::beginJob(), beamlinereco::ToFAnalysisMini::beginJob(), bpfit::BPFTmvaTrainer::beginJob(), nnbar::ShowerMuonCoincidence::beginJob(), bpfit::DimuonFitter::beginJob(), bpf::BPFCVNAna::beginJob(), bpfit::BreakPointProtonAna::beginJob(), air::AirKalmanAna::beginJob(), skim::SkimmerAna::beginJob(), ncs::Xbeam::beginJob(), ncs::GenieTruth::beginJob(), skim::CellHitSkimmer::beginJob(), ncs::Xeff::beginJob(), ncs::ROCKMRE::beginJob(), skim::CosmicBeamComparison::beginJob(), moonshadowana::MoonShadowAna::beginJob(), calib::CalibAna::beginJob(), ddt::SuperDDTEva::beginJob(), slid::LIDTraining::beginJob(), ncs::NCAna::beginJob(), moonshadowana::MoonShadowAnaHough::beginJob(), upmuana::UpMuRecoAna::beginJob(), upmuana::UpMuAnalysis::beginJob(), calib::MuondEdxAna::beginJob(), nnbar::RecoAnalysis::beginJob(), beamlinereco::ToFPositionRecoAnalysis::beginJob(), sn::SNMichelAnalyzer::beginJob(), htk::HoughTrack::beginJob(), comi::FEBFlash::beginJob(), trk::CosmicTrackAna::beginJob(), red::EWCosmics::beginJob(), calib::ThresholdAna::beginRun(), chaninfo::CosmicEff::beginRun(), mcchk::CloseInTime::beginRun(), dprf::ChannelPlots::beginRun(), calib::CosmicCalib::beginRun(), mcchk::DetAna::beginRun(), dprf::TrackPlots::beginRun(), mcchk::CosmicAna::beginRun(), mcchk::NeutrinoAna::beginRun(), evgen::IsoGen::beginRun(), calib::MakeAttenuationProfiles::beginRun(), mcchk::LeptonAna::beginRun(), calib::PEResponse::beginRun(), calib::StopperThreshold::beginRun(), photrans::ImprovedTransport::beginRun(), rsim::ReadoutSim::beginRun(), calib::CosmicTrends::beginRun(), comi::DataCheck::beginSubRun(), chaninfo::BadChanValidate::beginSubRun(), ifdb::MIN::beginSubRun(), fnex::ShifterAndWeighter::CalcNearTrueEnergyRatioWeights(), cmf::CMFDecorrelator::CMFDecorrelator(), g4n::FLSHitListAction::ComputeCerenkovPhotons(), LightLevels::CreateHistos(), CerenkovResponse::CreateHistos(), bpfit::BreakPoint::DebugFitList(), bpfit::BreakPoint::DebugHitList(), bpfit::BreakPoint::DebugScatSurf(), rsim::ReadoutSim::DrawASICOutput(), fnex::CorrectedSpectrum::DrawCounts(), fnex::CorrectedSpectrum::DrawDataVsMC(), fnex::MultiExperiment::DrawFitterProgressGraphs(), fnex::MultiExperiment::DrawPlots(), fnex::CorrectedSpectrum::DrawStacks(), red::MatterProbe::ECalc(), calib::SystematicUncertaintyScaleAna::endJob(), mcchk::POTAna::endJob(), novaddt::RateMonitor::endJob(), chaninfo::CosmicEff::endJob(), dprf::TrackPlots::endJob(), calib::CosmicCalib::endJob(), calib::MakeAttenuationProfiles::endJob(), lem::MakeLibrary::endJob(), rockmuon::NDRockMuon::endJob(), calib::DCMTimingOffset::endJob(), ncs::Xeff::endJob(), calib::CalibAna::endJob(), ncs::ROCKMRE::endJob(), ncs::NCAna::endJob(), beamlinereco::ToFPositionRecoAnalysis::endJob(), calib::DriftResponseCalc::endRun(), calib::MuondEdx::endRun(), calib::MuonTrackHits::endRun(), calib::MuondEdxAna::endRun(), skim::EvaluatorNumuCCpi::EvaluatorNumuCCpi(), rsim::IFPGAAlgorithm::FetchThresholds(), bpfit::BreakPoint::FillExceptNt(), fnex::EventListManipulator::FillHistogram(), bpfit::BreakPoint::FillTrackNt(), G4MismatchAna::G4MismatchAna(), align::Alignment::GetChannelHists(), moonshadowana::MoonShadowAna::GetHisto(), moonshadowana::MoonShadowAnaHough::GetHisto(), novaddt::HitsAna::HitsAna(), fnex::CovarianceFitHelper::Initialize(), testbeam::BeamlineRecoValidation::initializeHists(), novaddt::HorizontalMuonAna::IsHorzMuonTrack(), bpfit::BreakPoint::LogResiduals(), cmf::PlotUtilities::Make1DPlot(), fnex::ContourMaker::Make1DPlot(), trk::CosmicTrackAna::Make1DRecoHistograms(), fnex::CovarianceFitHelper::Make1DSpectra(), cmf::CovarianceFitHelper::Make1DSpectra(), trk::CosmicTrackAna::Make1DTruthHistograms(), fnex::CAFContourMaker::Make2DContours(), cmf::PlotUtilities::Make2DContours(), fnex::ContourMaker::Make2DContours(), fnex::ContourMaker::Make2DHist(), trk::CosmicTrackAna::Make2DRecoHistograms(), fnex::ContourMaker::Make2DSystematicHists(), trk::CosmicTrackAna::Make2DTruthHistograms(), highe::HighEnergyAna::make_histo(), novaddt::SNAna::make_histo(), mono::SlowMonopoleAna::make_histo(), cmf::FitFeldmanCousinsPoint::MakeCanvases(), cmf::PlotUtilities::MakeCLHeatMaps(), cmf::CovarianceFitHelper::MakeCovarianceMatrixHistogram(), cmf::CovarianceFitHelper::MakeDataMCCanv(), cmf::PlotUtilities::MakeEnergySpectraFromBins(), cmf::PlotUtilities::MakeGeneric2DHist(), cmf::SpectrumPredictionMaker::MakeHiddenParameterHistograms(), MakeHist(), fnex::CovarianceFitHelper::MakeIterationGraphs(), cmf::CovarianceFitHelper::MakeIterationGraphs(), novaddt::Calibration::MakeNoiseHisto(), cmf::PlotUtilities::MakeSpectrumHistogram(), fnex::StarPlot::MakeStarPlot(), airshower::AirSlicer::MakeTrackSlices(), cmf::RandomUniverseUtility::MakeUniverseHistograms(), mix::MixSimEvents::MixSimEvents(), fnex::ReadFitResults::plotResults(), calib::EnergyStandardCandles::PrepareMichelENtuple(), rwgt::MakeGENIEReweightTable::produce(), dprf::RawFebPlots::RawFebPlots(), fnex::CompareFNEXCAFEventListFiles::ReadCAFDataTextFile(), fnex::CompareFNEXCAFEventListFiles::ReadCAFMCTextFile(), fnex::CompareFNEXCAFEventListFiles::reconfigure(), calib::DriftCorrection::respondToCloseOutputFiles(), rwgt::RwgtTest::RwgtTest(), fnex::ReadCAFMakeEventList::Serialize(), supernova::sliceAna::sliceAna(), sn::SupernovaAna::SupernovaAna(), geo::GeometryTest::testCellPos(), beamlinerecoana::WCTrackRecoAnalysis::WCTrackRecoAnalysis(), hough::HoughT::WriteHoughHistos(), hough::MultiHoughT::WriteHoughHistos(), cvn::CVNEventDump::WriteMapTH2(), cvn::CVNCosmicEventDump::WriteMapTH2(), and cvn::CVNEventProngDump::WriteMapTH2().

83  {
84  detail::RootDirectorySentry sentry;
85  cd();
86  return new T(args...);
87  }
double T
Definition: Xdiff_gwt.C:5
void cd() const
template<typename T , typename... ARGS>
T * art::TFileDirectory::makeAndRegister ( char const *  name,
char const *  title,
ARGS...  args 
) const

make and register a new ROOT object of type T, giving it the specified name and title, using constructor parameters 'args'. The type must be registerable, and must support naming and titling.

Definition at line 91 of file TFileDirectory.h.

References make_syst_table_plots::args, cd(), and T.

Referenced by tbana::DetectorRateShutOff::beginJob(), tbana::DSToFAna::DSToFAna(), cmf::PlotUtilities::Make1DPlot(), fnex::ContourMaker::Make1DPlot(), cmf::PlotUtilities::Make2DContours(), makeAndRegister(), cmf::ContourFromLibrary::MakeAndStorePlots(), fnex::CAFContourMaker::StoreContourGraphs(), and fnex::ContourMaker::StoreContourGraphs().

94  {
95  detail::RootDirectorySentry sentry;
96  cd();
97  T* p = new T(args...);
98  p->SetName(name);
99  p->SetTitle(title);
100  gDirectory->Append(p);
101  return p;
102  }
const XML_Char * name
Definition: expat.h:151
const char * p
Definition: xmltok.h:285
double T
Definition: Xdiff_gwt.C:5
void cd() const
template<typename T , typename... ARGS>
T * art::TFileDirectory::makeAndRegister ( std::string const &  name,
std::string const &  title,
ARGS...  args 
) const

Definition at line 106 of file TFileDirectory.h.

References make_syst_table_plots::args, and makeAndRegister().

109  {
110  return makeAndRegister(name.c_str(), title.c_str(), args...);
111  }
const XML_Char * name
Definition: expat.h:151
T * makeAndRegister(char const *name, char const *title, ARGS...args) const
TFileDirectory art::TFileDirectory::mkdir ( std::string const &  dir,
std::string const &  descr = "" 
)

Create a new TFileDirectory, sharing the same TFile as this one, but with an additional 'dir', and with 'path' being the fullPath() of this one.

Referenced by beamlinereco::EventWaveformDump::analyze(), fnex::CalibSystHistMaker::beginJob(), beamlinereco::ToFSingleCounterAnalysis::beginJob(), beamlinereco::EventWaveformDump::beginJob(), beamlinereco::ToFAnalysisMini::beginJob(), beamlinereco::ToFPositionRecoAnalysis::beginJob(), fnex::ShifterAndWeighter::CalcNearTrueEnergyRatioWeights(), fnex::CorrectedSpectrum::DrawCounts(), fnex::CorrectedSpectrum::DrawDataVsMC(), fnex::MultiExperiment::DrawFitterProgressGraphs(), fnex::MultiExperiment::DrawParallelPlots(), fnex::NOvA_Experiment::DrawPlots(), fnex::MultiExperiment::DrawPlots(), fnex::CorrectedSpectrum::DrawStacks(), cmf::CMFSpectraMaker::endJob(), calib::CosmicCalib::endJob(), calib::MakeAttenuationProfiles::endJob(), beamlinereco::ToFPositionRecoAnalysis::endJob(), fnex::EventListManipulator::FillFakeDataLists(), fnex::EventListManipulator::FillHistograms(), fnex::ContourMaker::Make2DSystematicHists(), cmf::ContourFromLibrary::MakeAndStorePlots(), cmf::FitFeldmanCousinsPoint::MakeCanvases(), fnex::CovarianceFitHelper::MakeDataMCFitCanvs(), cmf::SpectrumPredictionMaker::MakeHiddenParameterHistograms(), cmf::CovarianceFitHelper::MakeResultPlots(), cmf::RandomUniverseUtility::MakeUniverseHistograms(), fnex::SensitivityPointsMaker::MultiExperimentChiSqrForInputPoint(), cmf::SerializeEventListColl(), fnex::SerializeEventListMap(), fnex::PlotPoint::writeResults(), and fnex::FitPoint::writeResults().

void art::TFileDirectory::registerCallback ( Callback_t  )
protected

Member Data Documentation

std::map<std::string, std::vector<Callback_t> > art::TFileDirectory::callbacks_ {}
private

Definition at line 77 of file TFileDirectory.h.

std::string art::TFileDirectory::descr_
protected

Definition at line 69 of file TFileDirectory.h.

Referenced by art::TFileService::setDirectoryName_().

std::string art::TFileDirectory::dir_
protected

Definition at line 68 of file TFileDirectory.h.

Referenced by art::TFileService::setDirectoryName_().

TFile* art::TFileDirectory::file_
protected
std::string art::TFileDirectory::path_
private

Definition at line 73 of file TFileDirectory.h.

bool art::TFileDirectory::requireCallback_ {false}
protected

Definition at line 70 of file TFileDirectory.h.

Referenced by art::TFileService::TFileService().


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