CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
HcalMCParamsHandler Class Reference

#include <HcalMCParamsHandler.h>

Inheritance diagram for HcalMCParamsHandler:
popcon::PopConSourceHandler< HcalMCParams >

Public Member Functions

void getNewObjects () override
 
 HcalMCParamsHandler (edm::ParameterSet const &)
 
std::string id () const override
 
void initObject (HcalMCParams *)
 
 ~HcalMCParamsHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< HcalMCParams >
void initialize (const cond::persistency::Session &dbSession, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry)
 
Ref lastPayload () const
 
cond::LogDBEntry_t const & logDBEntry () const
 
std::pair< Container const
*, std::string const > 
operator() (const cond::persistency::Session &session, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry) const
 
 PopConSourceHandler ()
 
Container const & returnData ()
 
cond::TagInfo_t const & tagInfo () const
 
std::string const & userTextLog () const
 
virtual ~PopConSourceHandler ()
 

Private Attributes

edm::FileInPath fFile
 
std::string m_name
 
HcalMCParamsmyDBObject
 
unsigned int sinceTime
 

Additional Inherited Members

- Public Types inherited from popcon::PopConSourceHandler< HcalMCParams >
typedef std::map< Time_t,
std::shared_ptr< HcalMCParams > > 
Container
 
typedef std::unique_ptr
< HcalMCParams
Ref
 
typedef PopConSourceHandler
< HcalMCParams
self
 
typedef cond::Time_t Time_t
 
typedef HcalMCParams value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< HcalMCParams >
cond::persistency::SessiondbSession () const
 
- Protected Attributes inherited from popcon::PopConSourceHandler< HcalMCParams >
Container m_iovs
 
std::vector< std::pair
< HcalMCParams *, Time_t > > 
m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 22 of file HcalMCParamsHandler.h.

Constructor & Destructor Documentation

HcalMCParamsHandler::~HcalMCParamsHandler ( )
override

Definition at line 11 of file HcalMCParamsHandler.cc.

11 {}
HcalMCParamsHandler::HcalMCParamsHandler ( edm::ParameterSet const &  ps)

Definition at line 6 of file HcalMCParamsHandler.cc.

References edm::ParameterSet::getUntrackedParameter(), m_name, sinceTime, and AlCaHLTBitMon_QueryRunRegistry::string.

6  {
7  m_name = ps.getUntrackedParameter<std::string>("name", "HcalMCParamsHandler");
8  sinceTime = ps.getUntrackedParameter<unsigned>("IOVRun", 0);
9 }

Member Function Documentation

void HcalMCParamsHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< HcalMCParams >.

Definition at line 13 of file HcalMCParamsHandler.cc.

References gather_cfg::cout, Exception, cond::TagInfo_t::lastInterval, m_name, popcon::PopConSourceHandler< HcalMCParams >::m_to_transfer, myDBObject, cond::TagInfo_t::name, cond::Iov_t::since, sinceTime, cond::TagInfo_t::size, and popcon::PopConSourceHandler< HcalMCParams >::tagInfo().

13  {
14  // edm::LogInfo ("HcalMCParamsHandler")
15  std::cout << "------- " << m_name << " - > getNewObjects\n"
16  <<
17  //check whats already inside of database
18  "got offlineInfo" << tagInfo().name << ", size " << tagInfo().size << ", last object valid since "
19  << tagInfo().lastInterval.since << std::endl;
20 
21  if (!myDBObject)
22  throw cms::Exception("Empty DB object")
23  << m_name << " has received empty object - nothing to write to DB" << std::endl;
24 
25  // IOV information
26  cond::Time_t myTime = sinceTime;
27 
28  std::cout << "Using IOV run " << sinceTime << std::endl;
29 
30  // prepare for transfer:
31  m_to_transfer.push_back(std::make_pair(myDBObject, myTime));
32 
33  edm::LogInfo("HcalMCParamsHandler") << "------- " << m_name << " - > getNewObjects" << std::endl;
34 }
Iov_t lastInterval
Definition: Types.h:73
Time_t since
Definition: Types.h:53
size_t size
Definition: Types.h:74
std::string name
Definition: Types.h:72
unsigned long long Time_t
Definition: Time.h:14
std::vector< std::pair< HcalMCParams *, Time_t > > m_to_transfer
HcalMCParams * myDBObject
Log< level::Info, false > LogInfo
tuple cout
Definition: gather_cfg.py:144
cond::TagInfo_t const & tagInfo() const
std::string HcalMCParamsHandler::id ( ) const
inlineoverridevirtual

Implements popcon::PopConSourceHandler< HcalMCParams >.

Definition at line 25 of file HcalMCParamsHandler.h.

References m_name.

25 { return m_name; }
void HcalMCParamsHandler::initObject ( HcalMCParams fObject)

Definition at line 36 of file HcalMCParamsHandler.cc.

References myDBObject.

Referenced by HcalMCParamsPopConAnalyzer::endJob().

36 { myDBObject = fObject; }
HcalMCParams * myDBObject

Member Data Documentation

edm::FileInPath HcalMCParamsHandler::fFile
private

Definition at line 33 of file HcalMCParamsHandler.h.

std::string HcalMCParamsHandler::m_name
private

Definition at line 35 of file HcalMCParamsHandler.h.

Referenced by getNewObjects(), HcalMCParamsHandler(), and id().

HcalMCParams* HcalMCParamsHandler::myDBObject
private

Definition at line 34 of file HcalMCParamsHandler.h.

Referenced by getNewObjects(), and initObject().

unsigned int HcalMCParamsHandler::sinceTime
private

Definition at line 32 of file HcalMCParamsHandler.h.

Referenced by getNewObjects(), and HcalMCParamsHandler().