test
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 | Private Member Functions
edm::LogErrorHarvester Class Reference
Inheritance diagram for edm::LogErrorHarvester:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 LogErrorHarvester (ParameterSet const &)
 
 ~LogErrorHarvester ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &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 (ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

virtual void beginJob () override
 
virtual void endJob () override
 
virtual void produce (Event &, EventSetup const &) override
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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)
 

Detailed Description

Definition at line 35 of file LogErrorHarvester.cc.

Constructor & Destructor Documentation

LogErrorHarvester::LogErrorHarvester ( ParameterSet const &  )
explicit

Definition at line 47 of file LogErrorHarvester.cc.

47  {
48  produces<std::vector<ErrorSummaryEntry> >();
49  }
LogErrorHarvester::~LogErrorHarvester ( )

Definition at line 51 of file LogErrorHarvester.cc.

51  {
52  }

Member Function Documentation

void LogErrorHarvester::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 68 of file LogErrorHarvester.cc.

References edm::EnableLoggedErrorsSummary().

68  {
70  }
bool EnableLoggedErrorsSummary()
void LogErrorHarvester::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 74 of file LogErrorHarvester.cc.

References edm::DisableLoggedErrorsSummary().

74  {
76  }
bool DisableLoggedErrorsSummary()
void LogErrorHarvester::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 81 of file LogErrorHarvester.cc.

References edm::ConfigurationDescriptions::add().

81  {
83  descriptions.add("logErrorHarvester", desc);
84  }
void LogErrorHarvester::produce ( Event iEvent,
EventSetup const &   
)
overrideprivatevirtual

Implements edm::EDProducer.

Definition at line 55 of file LogErrorHarvester.cc.

References benchmark_cfg::errors, edm::FreshErrorsExist(), cmsHarvester::index, edm::LoggedErrorsSummary(), eostools::move(), edm::Event::put(), edm::Event::streamID(), and edm::StreamID::value().

55  {
56  const auto index = iEvent.streamID().value();
57  if(!FreshErrorsExist(index)) {
58  std::unique_ptr<std::vector<ErrorSummaryEntry> > errors(new std::vector<ErrorSummaryEntry>());
59  iEvent.put(std::move(errors));
60  } else {
61  std::unique_ptr<std::vector<ErrorSummaryEntry> > errors(new std::vector<ErrorSummaryEntry>(LoggedErrorsSummary(index)));
62  iEvent.put(std::move(errors));
63  }
64  }
bool FreshErrorsExist(unsigned int iStreamID)
def move
Definition: eostools.py:510
std::vector< ErrorSummaryEntry > LoggedErrorsSummary(unsigned int iStreamID)