CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HcalPFCutsHandler Class Reference

#include <HcalPFCutsHandler.h>

Inheritance diagram for HcalPFCutsHandler:
popcon::PopConSourceHandler< HcalPFCuts >

Public Member Functions

void getNewObjects () override
 
 HcalPFCutsHandler (edm::ParameterSet const &)
 
std::string id () const override
 
void initObject (HcalPFCuts *)
 
 ~HcalPFCutsHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< HcalPFCuts >
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
 
HcalPFCutsmyDBObject
 
unsigned int sinceTime
 

Additional Inherited Members

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

Detailed Description

Definition at line 12 of file HcalPFCutsHandler.h.

Constructor & Destructor Documentation

◆ ~HcalPFCutsHandler()

HcalPFCutsHandler::~HcalPFCutsHandler ( )
override

Definition at line 9 of file HcalPFCutsHandler.cc.

9 {}

◆ HcalPFCutsHandler()

HcalPFCutsHandler::HcalPFCutsHandler ( edm::ParameterSet const &  ps)

Definition at line 4 of file HcalPFCutsHandler.cc.

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

4  {
5  m_name = ps.getUntrackedParameter<std::string>("name", "HcalPFCutsHandler");
6  sinceTime = ps.getUntrackedParameter<unsigned>("IOVRun", 0);
7 }
unsigned int sinceTime

Member Function Documentation

◆ getNewObjects()

void HcalPFCutsHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< HcalPFCuts >.

Definition at line 11 of file HcalPFCutsHandler.cc.

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

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

◆ id()

std::string HcalPFCutsHandler::id ( ) const
inlineoverridevirtual

Implements popcon::PopConSourceHandler< HcalPFCuts >.

Definition at line 15 of file HcalPFCutsHandler.h.

References m_name.

15 { return m_name; }

◆ initObject()

void HcalPFCutsHandler::initObject ( HcalPFCuts fObject)

Definition at line 32 of file HcalPFCutsHandler.cc.

References myDBObject.

Referenced by HcalPFCutsPopConAnalyzer::endJob().

32 { myDBObject = fObject; }
HcalPFCuts * myDBObject

Member Data Documentation

◆ fFile

edm::FileInPath HcalPFCutsHandler::fFile
private

Definition at line 23 of file HcalPFCutsHandler.h.

◆ m_name

std::string HcalPFCutsHandler::m_name
private

Definition at line 25 of file HcalPFCutsHandler.h.

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

◆ myDBObject

HcalPFCuts* HcalPFCutsHandler::myDBObject
private

Definition at line 24 of file HcalPFCutsHandler.h.

Referenced by getNewObjects(), and initObject().

◆ sinceTime

unsigned int HcalPFCutsHandler::sinceTime
private

Definition at line 22 of file HcalPFCutsHandler.h.

Referenced by getNewObjects(), and HcalPFCutsHandler().