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 | 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
 
 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 ()
 

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

Implements edm::EDAnalyzer.

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(), 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)
tuple cout
Definition: gather_cfg.py:145
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().