CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
JetResolutionDBWriter Class Reference
Inheritance diagram for JetResolutionDBWriter:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
virtual void beginJob () override
 
virtual void endJob () override
 
 JetResolutionDBWriter (const edm::ParameterSet &)
 
 ~JetResolutionDBWriter ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

std::string m_path
 
std::string m_record
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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 17 of file JetResolutionDBWriter.cc.

Constructor & Destructor Documentation

JetResolutionDBWriter::JetResolutionDBWriter ( const edm::ParameterSet pSet)
JetResolutionDBWriter::~JetResolutionDBWriter ( )
inline

Definition at line 24 of file JetResolutionDBWriter.cc.

24 {}

Member Function Documentation

virtual void JetResolutionDBWriter::analyze ( const edm::Event ,
const edm::EventSetup  
)
inlineoverridevirtual

Definition at line 22 of file JetResolutionDBWriter.cc.

22 {}
void JetResolutionDBWriter::beginJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 39 of file JetResolutionDBWriter.cc.

References cond::service::PoolDBOutputService::beginOfTime(), gather_cfg::cout, cond::service::PoolDBOutputService::currentTime(), DEFINE_FWK_MODULE, edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), m_path, m_record, alignCSCRings::s, and cond::service::PoolDBOutputService::writeOne().

40 {
41 
42  std::cout << "Loading data from '" << m_path << "'" << std::endl;
43 
45 
46  std::cout << "Opening PoolDBOutputService" << std::endl;
47 
48  // now write it into the DB
50  if (s.isAvailable())
51  {
52 
53  std::cout << "Setting up payload record " << m_record << std::endl;
54  cond::Time_t sinceTime = s->isNewTagRequest(m_record) ? s->beginOfTime() : s->currentTime();
55  s->writeOne<JME::JetResolutionObject>(jerObject, sinceTime, m_record);
56 
57  std::cout << "Object saved into the database with the record: " << m_record << std::endl;
58  }
59 }
unsigned long long Time_t
Definition: Time.h:16
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:46
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
virtual void JetResolutionDBWriter::endJob ( void  )
inlineoverridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 23 of file JetResolutionDBWriter.cc.

23 {}

Member Data Documentation

std::string JetResolutionDBWriter::m_path
private

Definition at line 28 of file JetResolutionDBWriter.cc.

Referenced by beginJob(), and JetResolutionDBWriter().

std::string JetResolutionDBWriter::m_record
private

Definition at line 27 of file JetResolutionDBWriter.cc.

Referenced by beginJob(), and JetResolutionDBWriter().