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
L1TriggerScalerHandler Class Reference

#include <L1TriggerScalerHandler.h>

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

Public Member Functions

void getNewObjects ()
 
std::string id () const
 
 L1TriggerScalerHandler (const edm::ParameterSet &pset)
 
 ~L1TriggerScalerHandler ()
 
- Public Member Functions inherited from popcon::PopConSourceHandler< L1TriggerScaler >
void convertFromOld ()
 
SummarydummySummary (typename OldContainer::value_type const &) const
 
void initialize (cond::DbSession dbSession, cond::TagInfo const &tagInfo, cond::LogDBEntry const &logDBEntry)
 
Ref lastPayload () const
 
cond::LogDBEntry const & logDBEntry () const
 
std::pair< Container const
*, std::string const > 
operator() (cond::DbSession session, cond::TagInfo const &tagInfo, cond::LogDBEntry const &logDBEntry) const
 
 PopConSourceHandler ()
 
Container const & returnData ()
 
void sort ()
 
cond::TagInfo 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::vector< TripletContainer
 
typedef std::vector< std::pair
< L1TriggerScaler
*, cond::Time_t > > 
OldContainer
 
typedef PopConSourceHandler
< L1TriggerScaler
self
 
typedef cond::Summary Summary
 
typedef cond::Time_t Time_t
 
typedef L1TriggerScaler value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< L1TriggerScaler >
int add (value_type *payload, Summary *summary, Time_t time)
 
- Protected Attributes inherited from popcon::PopConSourceHandler< L1TriggerScaler >
OldContainer m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 9 of file L1TriggerScalerHandler.h.

Constructor & Destructor Documentation

L1TriggerScalerHandler::~L1TriggerScalerHandler ( )

Definition at line 23 of file L1TriggerScalerHandler.cc.

24 {
25 
26 }
L1TriggerScalerHandler::L1TriggerScalerHandler ( const edm::ParameterSet pset)

Definition at line 8 of file L1TriggerScalerHandler.cc.

References m_connectionString.

8  :
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 
21 }
T getUntrackedParameter(std::string const &, T const &) const

Member Function Documentation

void L1TriggerScalerHandler::getNewObjects ( )
virtual

... understand how to know in advise the lumisection_number

Implements popcon::PopConSourceHandler< L1TriggerScaler >.

Definition at line 28 of file L1TriggerScalerHandler.cc.

References dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, cond::TagInfo::lastInterval, popcon::PopConSourceHandler< L1TriggerScaler >::lastPayload(), cond::TagInfo::lastPayloadToken, m_connectionString, m_name, m_pass, L1TriggerScaler::m_run, popcon::PopConSourceHandler< L1TriggerScaler >::m_to_transfer, m_user, popcon::PopConSourceHandler< L1TriggerScaler >::m_userTextLog, cond::TagInfo::name, alignCSCRings::r, L1TriggerScalerRead::readData(), cond::TagInfo::size, findQualityFiles::size, and popcon::PopConSourceHandler< L1TriggerScaler >::tagInfo().

28  {
29  edm::LogInfo ("L1TriggerScalerHandler") << "------- " << m_name
30  << " - > getNewObjects\n" <<
31  //check whats already inside of database
32  "got offlineInfo"<<
33  tagInfo().name << ", size " << tagInfo().size
34  << ", last object valid since "
35  << tagInfo().lastInterval.first << " token "
36  << tagInfo().lastPayloadToken << std::endl;
37 
38 
39  if (tagInfo().size>0) {
40  Ref payload = lastPayload();
41  edm::LogInfo ("L1TriggerScalerHandler")<<"size of last payload "<<
42  payload->m_run.size()<<std::endl;
43  }
44 
45  int snc;
46 
47  std::cerr << "Source implementation test ::getNewObjects : enter runnumber as a first since ! \n";
48  std::cin >> snc;
49 
50 
51 
52 
53  std::cout<<"runnumber/first since = "<< snc <<std::endl;
54 
55 
57 
59 
60 
61 
62  // reading from omds
64  std::vector<L1TriggerScaler::Lumi> l1lumiscaler_array;
65 
66 
67 
68  l1lumiscaler_array = rn.readData((int)snc );
69 
70  L1TriggerScaler::Lumi rnfill;
71  std::vector<L1TriggerScaler::Lumi>::iterator Iit;
72  for(Iit = l1lumiscaler_array.begin() ; Iit != l1lumiscaler_array.end(); Iit++)
73  {
74  rnfill = *(Iit);
75  r->m_run.push_back(rnfill);
76  }
77 
78  m_to_transfer.push_back(std::make_pair((L1TriggerScaler*)r,snc));
79  std::ostringstream ss;
80  ss << "since =" << snc;
81 
82 
83 
84  m_userTextLog = ss.str()+";";
85 
86 
87  edm::LogInfo ("L1TriggerScalerHandler") << "------- " << m_name << " - > getNewObjects" << std::endl;
88 
89 
90 }
std::string lastPayloadToken
Definition: TagInfo.h:12
std::string name
Definition: TagInfo.h:9
std::vector< Lumi > m_run
size_t size
Definition: TagInfo.h:13
cond::ValidityInterval lastInterval
Definition: TagInfo.h:11
tuple cout
Definition: gather_cfg.py:121
tuple size
Write out results.
std::string L1TriggerScalerHandler::id ( void  ) const
inlinevirtual

Implements popcon::PopConSourceHandler< L1TriggerScaler >.

Definition at line 12 of file L1TriggerScalerHandler.h.

References m_name.

12 { return m_name;}

Member Data Documentation

std::string L1TriggerScalerHandler::m_authpath
private

Definition at line 23 of file L1TriggerScalerHandler.h.

std::string L1TriggerScalerHandler::m_connectionString
private

Definition at line 21 of file L1TriggerScalerHandler.h.

Referenced by getNewObjects(), and L1TriggerScalerHandler().

std::string L1TriggerScalerHandler::m_host
private

Definition at line 24 of file L1TriggerScalerHandler.h.

std::string L1TriggerScalerHandler::m_name
private

Definition at line 16 of file L1TriggerScalerHandler.h.

Referenced by getNewObjects(), and id().

std::string L1TriggerScalerHandler::m_pass
private

Definition at line 27 of file L1TriggerScalerHandler.h.

Referenced by getNewObjects().

int L1TriggerScalerHandler::m_port
private

Definition at line 28 of file L1TriggerScalerHandler.h.

std::string L1TriggerScalerHandler::m_sid
private

Definition at line 25 of file L1TriggerScalerHandler.h.

unsigned long long L1TriggerScalerHandler::m_since
private

Definition at line 17 of file L1TriggerScalerHandler.h.

std::string L1TriggerScalerHandler::m_user
private

Definition at line 26 of file L1TriggerScalerHandler.h.

Referenced by getNewObjects().