CMS 3D CMS Logo

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

#include <L1TriggerScalerHandler.h>

Inheritance diagram for L1TriggerScalerHandler:
popcon::PopConSourceHandler< L1TriggerScaler >

Public Member Functions

void getNewObjects () override
 
std::string id () const override
 
 L1TriggerScalerHandler (const edm::ParameterSet &pset)
 
 ~L1TriggerScalerHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< L1TriggerScaler >
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

std::string m_authpath
 
std::string m_connectionString
 
std::string m_host
 
std::string m_name
 
std::string m_pass
 
int m_port
 
std::string m_sid
 
unsigned long long m_since
 
std::string m_user
 

Additional Inherited Members

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

Detailed Description

Definition at line 9 of file L1TriggerScalerHandler.h.

Constructor & Destructor Documentation

◆ ~L1TriggerScalerHandler()

L1TriggerScalerHandler::~L1TriggerScalerHandler ( )
override

Definition at line 22 of file L1TriggerScalerHandler.cc.

22 {}

◆ L1TriggerScalerHandler()

L1TriggerScalerHandler::L1TriggerScalerHandler ( const edm::ParameterSet pset)

Definition at line 8 of file L1TriggerScalerHandler.cc.

References m_connectionString.

9  : m_name(pset.getUntrackedParameter<std::string>("name", "L1TriggerScalerHandler")),
10  // m_connect(pset.getUntrackedParameter<std::string>("OnlineConn","")),
11  //m_authpath(pset.getUntrackedParameter<std::string>("OnlineAuthPath",".")),
12  //m_host(pset.getUntrackedParameter<std::string>("OnlineDBHost","cmsor1-v.cern.ch")),
13  // m_sid(pset.getUntrackedParameter<std::string>("OnlineDBSID","omds")),
14 
15  m_user(pset.getUntrackedParameter<std::string>("OnlineDBUser", "CMS_RUNINFO")),
16  m_pass(pset.getUntrackedParameter<std::string>("OnlineDBPass", "XXXXXXX"))
17 // m_port(pset.getUntrackedParameter<int>("OnlineDBPort",10121))
18 {
19  m_connectionString = "oracle://cms_omds_lb/CMS_RUNINFO";
20 }

Member Function Documentation

◆ getNewObjects()

void L1TriggerScalerHandler::getNewObjects ( )
overridevirtual

... understand how to know in advise the lumisection_number

Implements popcon::PopConSourceHandler< L1TriggerScaler >.

Definition at line 24 of file L1TriggerScalerHandler.cc.

References DMR_cfg::cerr, gather_cfg::cout, cond::TagInfo_t::lastInterval, popcon::PopConSourceHandler< L1TriggerScaler >::lastPayload(), m_connectionString, m_name, m_pass, popcon::PopConSourceHandler< L1TriggerScaler >::m_to_transfer, m_user, popcon::PopConSourceHandler< L1TriggerScaler >::m_userTextLog, cond::TagInfo_t::name, jetsAK4_Puppi_cff::payload, cond::Iov_t::payloadId, alignCSCRings::r, L1TriggerScalerRead::readData(), cond::Iov_t::since, cond::TagInfo_t::size, findQualityFiles::size, contentValuesCheck::ss, and popcon::PopConSourceHandler< L1TriggerScaler >::tagInfo().

24  {
25  edm::LogInfo("L1TriggerScalerHandler") << "------- " << m_name << " - > getNewObjects\n"
26  <<
27  //check whats already inside of database
28  "got offlineInfo" << tagInfo().name << ", size " << tagInfo().size << ", last object valid since "
29  << tagInfo().lastInterval.since << " token "
30  << tagInfo().lastInterval.payloadId << std::endl;
31 
32  if (tagInfo().size > 0) {
34  edm::LogInfo("L1TriggerScalerHandler") << "size of last payload " << payload->m_run.size() << std::endl;
35  }
36 
37  int snc;
38 
39  std::cerr << "Source implementation test ::getNewObjects : enter runnumber as a first since ! \n";
40  std::cin >> snc;
41 
42  std::cout << "runnumber/first since = " << snc << std::endl;
43 
45 
47 
48  // reading from omds
50  std::vector<L1TriggerScaler::Lumi> l1lumiscaler_array;
51 
52  l1lumiscaler_array = rn.readData((int)snc);
53 
54  L1TriggerScaler::Lumi rnfill;
55  std::vector<L1TriggerScaler::Lumi>::iterator Iit;
56  for (Iit = l1lumiscaler_array.begin(); Iit != l1lumiscaler_array.end(); Iit++) {
57  rnfill = *(Iit);
58  r->m_run.push_back(rnfill);
59  }
60 
61  m_to_transfer.push_back(std::make_pair((L1TriggerScaler*)r, snc));
62  std::ostringstream ss;
63  ss << "since =" << snc;
64 
65  m_userTextLog = ss.str() + ";";
66 
67  edm::LogInfo("L1TriggerScalerHandler") << "------- " << m_name << " - > getNewObjects" << std::endl;
68 }
size
Write out results.
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
std::vector< std::pair< L1TriggerScaler *, Time_t > > m_to_transfer
Hash payloadId
Definition: Types.h:55
Log< level::Info, false > LogInfo
std::unique_ptr< L1TriggerScaler > Ref

◆ id()

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

Implements popcon::PopConSourceHandler< L1TriggerScaler >.

Definition at line 12 of file L1TriggerScalerHandler.h.

References m_name.

12 { return m_name; }

Member Data Documentation

◆ m_authpath

std::string L1TriggerScalerHandler::m_authpath
private

Definition at line 24 of file L1TriggerScalerHandler.h.

◆ m_connectionString

std::string L1TriggerScalerHandler::m_connectionString
private

Definition at line 22 of file L1TriggerScalerHandler.h.

Referenced by getNewObjects(), and L1TriggerScalerHandler().

◆ m_host

std::string L1TriggerScalerHandler::m_host
private

Definition at line 25 of file L1TriggerScalerHandler.h.

◆ m_name

std::string L1TriggerScalerHandler::m_name
private

Definition at line 17 of file L1TriggerScalerHandler.h.

Referenced by getNewObjects(), and id().

◆ m_pass

std::string L1TriggerScalerHandler::m_pass
private

Definition at line 28 of file L1TriggerScalerHandler.h.

Referenced by getNewObjects().

◆ m_port

int L1TriggerScalerHandler::m_port
private

Definition at line 29 of file L1TriggerScalerHandler.h.

◆ m_sid

std::string L1TriggerScalerHandler::m_sid
private

Definition at line 26 of file L1TriggerScalerHandler.h.

◆ m_since

unsigned long long L1TriggerScalerHandler::m_since
private

Definition at line 18 of file L1TriggerScalerHandler.h.

◆ m_user

std::string L1TriggerScalerHandler::m_user
private

Definition at line 27 of file L1TriggerScalerHandler.h.

Referenced by getNewObjects().