CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
virtual ~JsonWritingTimeoutPoolOutputModule ()
 
- Public Member Functions inherited from edm::TimeoutPoolOutputModule
TimeoutPoolOutputModuleoperator= (TimeoutPoolOutputModule const &)=delete
 
 TimeoutPoolOutputModule (ParameterSet const &ps)
 
 TimeoutPoolOutputModule (TimeoutPoolOutputModule const &)=delete
 
virtual ~TimeoutPoolOutputModule ()
 
- Public Member Functions inherited from edm::PoolOutputModule
AuxItemArray const & auxItems () const
 
std::string const & basketOrder () const
 
int const & basketSize () 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
 
OutputItemListArray const & selectedOutputItemList () const
 
int const & splitLevel () const
 
int const & treeMaxVirtualSize () const
 
int const & whyNotFastClonable () const
 
virtual ~PoolOutputModule ()
 
- Public Member Functions inherited from edm::one::OutputModule< WatchInputFiles >
 OutputModule (edm::ParameterSet const &iPSet)
 
- Public Member Functions inherited from edm::one::OutputModuleBase
BranchChildren const & branchChildren () const
 
BranchIDLists const * branchIDLists () const
 
std::array< bool,
NumBranchTypes > const & 
hasNewlyDroppedBranch () const
 
SelectedProductsForBranchType
const & 
keptProducts () const
 
int maxEvents () const
 
const ModuleDescriptionmoduleDescription () const
 
OutputModuleBaseoperator= (OutputModuleBase const &)=delete
 
 OutputModuleBase (ParameterSet const &pset)
 
 OutputModuleBase (OutputModuleBase const &)=delete
 
std::string const & processName () const
 
int remainingEvents () const
 
bool selected (BranchDescription const &desc) const
 
void selectProducts (ProductRegistry const &preg, ThinnedAssociationsHelper const &)
 
ThinnedAssociationsHelper const * thinnedAssociationsHelper () const
 
bool wantAllEvents () const
 
virtual ~OutputModuleBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 
- 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)
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Protected Member Functions

virtual void doExtrasAfterCloseFile () override
 
virtual std::pair< std::string,
std::string > 
physicalAndLogicalNameForNewFile () override
 
- Protected Member Functions inherited from edm::TimeoutPoolOutputModule
virtual bool shouldWeCloseFile () const
 allow inheriting classes to override but still be able to call this method in the overridden version More...
 
virtual void write (EventPrincipal const &e, ModuleCallingContext const *) 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, EventSetup const &c, ModuleCallingContext const *)
 
bool doBeginRun (RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
 
void doEndJob ()
 
bool doEndLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
 
bool doEndRun (RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
 
bool doEvent (EventPrincipal const &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
 
void doPreallocate (PreallocationConfiguration const &)
 
std::map< BranchID::value_type,
BranchID::value_type > const & 
droppedBranchIDToKeptBranchID ()
 
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
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, 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 ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, 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,
NumBranchTypes
AuxItemArray
 
enum  DropMetaData { DropNone, DropDroppedPrior, DropPrior, DropAll }
 
typedef std::vector< OutputItemOutputItemList
 
typedef std::array
< OutputItemList,
NumBranchTypes
OutputItemListArray
 
- 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

dqmservices::JsonWritingTimeoutPoolOutputModule::JsonWritingTimeoutPoolOutputModule ( edm::ParameterSet const &  ps)
explicit
virtual dqmservices::JsonWritingTimeoutPoolOutputModule::~JsonWritingTimeoutPoolOutputModule ( )
inlinevirtual

Definition at line 14 of file JsonWritingTimeoutPoolOutputModule.h.

14 {};

Member Function Documentation

void dqmservices::JsonWritingTimeoutPoolOutputModule::doExtrasAfterCloseFile ( )
overrideprotectedvirtual

Reimplemented from edm::PoolOutputModule.

Definition at line 39 of file JsonWritingTimeoutPoolOutputModule.cc.

References currentFileName_, currentJsonName_, DQMFileSaver::fillJson(), EnergyCorrector::pt, runNumber_, sequence_, and AlCaHLTBitMon_QueryRunRegistry::string.

39  {
40  std::string json_tmp_ = currentJsonName_ + ".open";
41  std::string transferDest = "";
43  transferDest, nullptr);
44  write_json(json_tmp_, pt);
45  rename(json_tmp_.c_str(), currentJsonName_.c_str());
46 }
static boost::property_tree::ptree fillJson(int run, int lumi, const std::string &dataFilePathName, const std::string transferDestinationStr, evf::FastMonitoringService *fms)
void dqmservices::JsonWritingTimeoutPoolOutputModule::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 48 of file JsonWritingTimeoutPoolOutputModule.cc.

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

49  {
51  TimeoutPoolOutputModule::fillDescription(desc);
52 
53  desc.setComment(
54  "Almost same as TimeoutPoolOutputModule, but the output files names "
55  "follow the FFF naming convention. Additionally a json 'description' "
56  "file is emitted for every .root file written.");
57 
58  desc.addUntracked<uint32_t>("runNumber", 0)
59  ->setComment(
60  "The run number, only used for file prefix: "
61  "'run000001_lumi0000_...'.");
62 
63  desc.addUntracked<std::string>("outputPath", "./")
64  ->setComment(
65  "Output path for the root and json files, usually the run "
66  "directory.");
67 
68  desc.addUntracked<std::string>("streamLabel", "streamEvDOutput")
69  ->setComment("Stream label, used for file suffix.");
70 
71  descriptions.add("jsonWriting", desc);
72 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void setComment(std::string const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::pair< std::string, std::string > dqmservices::JsonWritingTimeoutPoolOutputModule::physicalAndLogicalNameForNewFile ( )
overrideprotectedvirtual

Reimplemented from edm::PoolOutputModule.

Definition at line 25 of file JsonWritingTimeoutPoolOutputModule.cc.

References newFWLiteAna::base, currentFileName_, currentJsonName_, cmsPerfStripChart::format, outputPath_, AlCaHLTBitMon_ParallelJobs::p, cmsHarvester::path, runNumber_, sequence_, streamLabel_, and AlCaHLTBitMon_QueryRunRegistry::string.

25  {
26  sequence_++;
27 
28  std::string base = str(boost::format("run%06d_ls%04d_%s") % runNumber_ %
30 
32 
33  currentFileName_ = (p / base).string() + ".root";
34  currentJsonName_ = (p / base).string() + ".jsn";
35 
36  return std::make_pair(currentFileName_, currentFileName_);
37 }
tuple base
Main Program
Definition: newFWLiteAna.py:92
string format
Some error handling for the usage.
tuple path
else: Piece not in the list, fine.

Member Data Documentation

std::string dqmservices::JsonWritingTimeoutPoolOutputModule::currentFileName_
protected
std::string dqmservices::JsonWritingTimeoutPoolOutputModule::currentJsonName_
protected
std::string dqmservices::JsonWritingTimeoutPoolOutputModule::outputPath_
protected
uint32_t dqmservices::JsonWritingTimeoutPoolOutputModule::runNumber_
protected
uint32_t dqmservices::JsonWritingTimeoutPoolOutputModule::sequence_
protected
std::string dqmservices::JsonWritingTimeoutPoolOutputModule::streamLabel_
protected