CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
dqmservices::JsonWritingTimeoutPoolOutputModule Class Reference

#include <JsonWritingTimeoutPoolOutputModule.h>

Inheritance diagram for dqmservices::JsonWritingTimeoutPoolOutputModule:
edm::TimeoutPoolOutputModule edm::PoolOutputModule edm::one::OutputModule< WatchInputFiles > edm::one::OutputModuleBase edm::EDConsumerBase

Public Member Functions

 JsonWritingTimeoutPoolOutputModule (edm::ParameterSet const &ps)
 
 ~JsonWritingTimeoutPoolOutputModule () override
 
- Public Member Functions inherited from edm::TimeoutPoolOutputModule
TimeoutPoolOutputModuleoperator= (TimeoutPoolOutputModule const &)=delete
 
 TimeoutPoolOutputModule (ParameterSet const &ps)
 
 TimeoutPoolOutputModule (TimeoutPoolOutputModule const &)=delete
 
 ~TimeoutPoolOutputModule () override
 
- Public Member Functions inherited from edm::PoolOutputModule
AuxItemArray const & auxItems () const
 
std::string const & basketOrder () const
 
int const & basketSize () const
 
BranchChildren const & branchChildren () const
 
std::string const & catalog () const
 
std::string const & compressionAlgorithm () const
 
int const & compressionLevel () const
 
std::string const & currentFileName () const
 
DropMetaData const & dropMetaData () const
 
int eventAutoFlushSize () const
 
std::string const & fileName () const
 
int const & inputFileCount () const
 
std::string const & logicalFileName () const
 
unsigned int const & maxFileSize () const
 
std::string const & moduleLabel () const
 
PoolOutputModuleoperator= (PoolOutputModule const &)=delete
 
bool const & overrideInputFileSplitLevels () const
 
 PoolOutputModule (ParameterSet const &ps)
 
 PoolOutputModule (PoolOutputModule const &)=delete
 
OutputItemListArrayselectedOutputItemList ()
 
OutputItemListArray const & selectedOutputItemList () const
 
int const & splitLevel () const
 
int const & treeMaxVirtualSize () const
 
int const & whyNotFastClonable () const
 
 ~PoolOutputModule () override
 
- Public Member Functions inherited from edm::one::OutputModule< WatchInputFiles >
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
 OutputModule (edm::ParameterSet const &iPSet)
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::OutputModuleBase
BranchIDLists const * branchIDLists ()
 
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch () const
 
SelectedProductsForBranchType const & keptProducts () const
 
int maxEvents () const
 
const ModuleDescriptionmoduleDescription () const
 
OutputModuleBaseoperator= (OutputModuleBase const &)=delete
 
 OutputModuleBase (OutputModuleBase const &)=delete
 
 OutputModuleBase (ParameterSet const &pset)
 
std::string const & processName () const
 
int remainingEvents () const
 
bool selected (BranchDescription const &desc) const
 
void selectProducts (ProductRegistry const &preg, ThinnedAssociationsHelper const &)
 
SharedResourcesAcquirersharedResourcesAcquirer ()
 
SubProcessParentageHelper const * subProcessParentageHelper () const
 
ThinnedAssociationsHelper const * thinnedAssociationsHelper () const
 
bool wantAllEvents () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~OutputModuleBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 
- Static Public Member Functions inherited from edm::TimeoutPoolOutputModule
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::PoolOutputModule
static void fillDescription (ParameterSetDescription &desc)
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::OutputModuleBase
static const std::string & baseType ()
 
static void fillDescription (ParameterSetDescription &desc, std::vector< std::string > const &iDefaultOutputCommands=ProductSelectorRules::defaultSelectionStrings())
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Protected Member Functions

void doExtrasAfterCloseFile () override
 
std::pair< std::string, std::string > physicalAndLogicalNameForNewFile () override
 
- Protected Member Functions inherited from edm::TimeoutPoolOutputModule
bool shouldWeCloseFile () const override
 allow inheriting classes to override but still be able to call this method in the overridden version More...
 
void write (EventForOutput const &e) override
 
- Protected Member Functions inherited from edm::one::OutputModuleBase
void configure (OutputModuleDescription const &desc)
 
ModuleDescription const & description () const
 
void doBeginJob ()
 
bool doBeginLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetupImpl const &c, ModuleCallingContext const *)
 
bool doBeginRun (RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *)
 
void doEndJob ()
 
bool doEndLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetupImpl const &c, ModuleCallingContext const *)
 
bool doEndRun (RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *)
 
bool doEvent (EventPrincipal const &ep, EventSetupImpl const &c, ActivityRegistry *, ModuleCallingContext const *)
 
void doPreallocate (PreallocationConfiguration const &)
 
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID ()
 
virtual void preallocLumis (unsigned int)
 
ParameterSetID selectorConfig () const
 
void setEventSelectionInfo (std::map< std::string, std::vector< std::pair< std::string, int >>> const &outputModulePathPositions, bool anyProductProduced)
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Protected Attributes

std::string currentFileName_
 
std::string currentJsonName_
 
std::string outputPath_
 
uint32_t runNumber_
 
uint32_t sequence_
 
std::string streamLabel_
 

Additional Inherited Members

- Public Types inherited from edm::PoolOutputModule
typedef std::array< AuxItem, NumBranchTypesAuxItemArray
 
enum  DropMetaData { DropNone, DropDroppedPrior, DropPrior, DropAll }
 
typedef std::vector< OutputItemOutputItemList
 
typedef std::array< OutputItemList, NumBranchTypesOutputItemListArray
 
- Public Types inherited from edm::one::OutputModuleBase
typedef OutputModuleBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Detailed Description

Definition at line 11 of file JsonWritingTimeoutPoolOutputModule.h.

Constructor & Destructor Documentation

◆ JsonWritingTimeoutPoolOutputModule()

dqmservices::JsonWritingTimeoutPoolOutputModule::JsonWritingTimeoutPoolOutputModule ( edm::ParameterSet const &  ps)
explicit

Definition at line 13 of file JsonWritingTimeoutPoolOutputModule.cc.

15  runNumber_ = ps.getUntrackedParameter<uint32_t>("runNumber");
16  outputPath_ = ps.getUntrackedParameter<std::string>("outputPath");
17  streamLabel_ = ps.getUntrackedParameter<std::string>("streamLabel");
18 
19  sequence_ = 0;
20  }

References edm::ParameterSet::getUntrackedParameter(), outputPath_, runNumber_, sequence_, streamLabel_, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~JsonWritingTimeoutPoolOutputModule()

dqmservices::JsonWritingTimeoutPoolOutputModule::~JsonWritingTimeoutPoolOutputModule ( )
inlineoverride

Definition at line 14 of file JsonWritingTimeoutPoolOutputModule.h.

14 {};

Member Function Documentation

◆ doExtrasAfterCloseFile()

void dqmservices::JsonWritingTimeoutPoolOutputModule::doExtrasAfterCloseFile ( )
overrideprotectedvirtual

Reimplemented from edm::PoolOutputModule.

Definition at line 35 of file JsonWritingTimeoutPoolOutputModule.cc.

35  {
36  std::string json_tmp_ = currentJsonName_ + ".open";
37  std::string transferDest = "";
38  std::string mergeType = "ROOT";
39  auto pt = dqmfilesaver::fillJson(runNumber_, sequence_, currentFileName_, transferDest, mergeType, nullptr);
40  write_json(json_tmp_, pt);
41  rename(json_tmp_.c_str(), currentJsonName_.c_str());
42  }

References currentFileName_, currentJsonName_, dqmfilesaver::fillJson(), DiDispStaMuonMonitor_cfi::pt, runNumber_, sequence_, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ fillDescriptions()

void dqmservices::JsonWritingTimeoutPoolOutputModule::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 44 of file JsonWritingTimeoutPoolOutputModule.cc.

44  {
46  TimeoutPoolOutputModule::fillDescription(desc);
47 
48  desc.setComment(
49  "Almost same as TimeoutPoolOutputModule, but the output files names "
50  "follow the FFF naming convention. Additionally a json 'description' "
51  "file is emitted for every .root file written.");
52 
53  desc.addUntracked<uint32_t>("runNumber", 0)
54  ->setComment(
55  "The run number, only used for file prefix: "
56  "'run000001_lumi0000_...'.");
57 
58  desc.addUntracked<std::string>("outputPath", "./")
59  ->setComment(
60  "Output path for the root and json files, usually the run "
61  "directory.");
62 
63  desc.addUntracked<std::string>("streamLabel", "streamEvDOutput")->setComment("Stream label, used for file suffix.");
64 
65  descriptions.add("jsonWriting", desc);
66  }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), edm::ParameterSetDescription::setComment(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ physicalAndLogicalNameForNewFile()

std::pair< std::string, std::string > dqmservices::JsonWritingTimeoutPoolOutputModule::physicalAndLogicalNameForNewFile ( )
overrideprotectedvirtual

Member Data Documentation

◆ currentFileName_

std::string dqmservices::JsonWritingTimeoutPoolOutputModule::currentFileName_
protected

◆ currentJsonName_

std::string dqmservices::JsonWritingTimeoutPoolOutputModule::currentJsonName_
protected

◆ outputPath_

std::string dqmservices::JsonWritingTimeoutPoolOutputModule::outputPath_
protected

◆ runNumber_

uint32_t dqmservices::JsonWritingTimeoutPoolOutputModule::runNumber_
protected

◆ sequence_

uint32_t dqmservices::JsonWritingTimeoutPoolOutputModule::sequence_
protected

◆ streamLabel_

std::string dqmservices::JsonWritingTimeoutPoolOutputModule::streamLabel_
protected
dqmservices::JsonWritingTimeoutPoolOutputModule::outputPath_
std::string outputPath_
Definition: JsonWritingTimeoutPoolOutputModule.h:26
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
rename
Definition: rename.py:1
edm::one::OutputModuleBase::OutputModuleBase
OutputModuleBase(ParameterSet const &pset)
Definition: OutputModuleBase.cc:45
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
dqm-mbProfile.format
format
Definition: dqm-mbProfile.py:16
dqmservices::JsonWritingTimeoutPoolOutputModule::currentJsonName_
std::string currentJsonName_
Definition: JsonWritingTimeoutPoolOutputModule.h:29
str
#define str(s)
Definition: TestProcessor.cc:48
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
dqmfilesaver::fillJson
boost::property_tree::ptree fillJson(int run, int lumi, const std::string &dataFilePathName, const std::string &transferDestinationStr, const std::string &mergeTypeStr, evf::FastMonitoringService *fms)
Definition: fillJson.cc:29
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
edm::ParameterSetDescription::setComment
void setComment(std::string const &value)
Definition: ParameterSetDescription.cc:33
dqmservices::JsonWritingTimeoutPoolOutputModule::currentFileName_
std::string currentFileName_
Definition: JsonWritingTimeoutPoolOutputModule.h:28
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
edm::TimeoutPoolOutputModule
Definition: TimeoutPoolOutputModule.h:23
newFWLiteAna.base
base
Definition: newFWLiteAna.py:92
dqmservices::JsonWritingTimeoutPoolOutputModule::streamLabel_
std::string streamLabel_
Definition: JsonWritingTimeoutPoolOutputModule.h:25
dqmservices::JsonWritingTimeoutPoolOutputModule::runNumber_
uint32_t runNumber_
Definition: JsonWritingTimeoutPoolOutputModule.h:24
dqmservices::JsonWritingTimeoutPoolOutputModule::sequence_
uint32_t sequence_
Definition: JsonWritingTimeoutPoolOutputModule.h:23