CMS 3D CMS Logo

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

#include <LHCInfoPopConSourceHandler.h>

Inheritance diagram for LHCInfoPopConSourceHandler:
popcon::PopConSourceHandler< LHCInfo >

Public Member Functions

void getNewObjects () override
 
std::string id () const override
 
 LHCInfoPopConSourceHandler (const edm::ParameterSet &pset)
 
 ~LHCInfoPopConSourceHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< LHCInfo >
void convertFromOld ()
 
SummarydummySummary (typename OldContainer::value_type const &) const
 
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 ()
 
void sort ()
 
cond::TagInfo_t const & tagInfo () const
 
std::string const & userTextLog () const
 
virtual ~PopConSourceHandler ()
 

Private Member Functions

void addEmptyPayload (cond::Time_t iov)
 
bool getCTTPSData (cond::persistency::Session &session, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
 
bool getDipData (cond::persistency::Session &session, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
 
bool getEcalData (cond::persistency::Session &session, const boost::posix_time::ptime &lowerTime, const boost::posix_time::ptime &upperTime, bool update)
 
bool getFillData (cond::persistency::Session &session, unsigned short fillId)
 
size_t getLumiData (cond::persistency::Session &session, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
 
bool getNextFillData (cond::persistency::Session &session, const boost::posix_time::ptime &targetTime, bool ended)
 

Private Attributes

std::string m_authpath
 
std::string m_connectionString
 
bool m_debug
 
std::string m_dipSchema
 
std::string m_ecalConnectionString
 
bool m_endFill = true
 
boost::posix_time::ptime m_endTime
 
std::unique_ptr< LHCInfom_fillPayload
 
bool m_lastPayloadEmpty = false
 
std::string m_name
 
std::vector< std::shared_ptr< LHCInfo > > m_payloadBuffer
 
std::shared_ptr< LHCInfom_prevPayload
 
unsigned int m_samplingInterval
 
boost::posix_time::ptime m_startTime
 
std::vector< std::pair< cond::Time_t, std::shared_ptr< LHCInfo > > > m_tmpBuffer
 

Additional Inherited Members

- Public Types inherited from popcon::PopConSourceHandler< LHCInfo >
typedef std::vector< Triplet > Container
 
typedef std::vector< std::pair< LHCInfo *, cond::Time_t > > OldContainer
 
typedef PopConSourceHandler< LHCInfoself
 
typedef cond::Summary Summary
 
typedef cond::Time_t Time_t
 
typedef LHCInfo value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< LHCInfo >
int add (value_type *payload, Summary *summary, Time_t time)
 
cond::persistency::SessiondbSession () const
 
- Protected Attributes inherited from popcon::PopConSourceHandler< LHCInfo >
OldContainer m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 10 of file LHCInfoPopConSourceHandler.h.

Constructor & Destructor Documentation

◆ LHCInfoPopConSourceHandler()

LHCInfoPopConSourceHandler::LHCInfoPopConSourceHandler ( const edm::ParameterSet pset)

Definition at line 21 of file LHCInfoPopConSourceHandler.cc.

22  : m_debug(pset.getUntrackedParameter<bool>("debug", false)),
23  m_startTime(),
24  m_endTime(),
25  m_samplingInterval((unsigned int)pset.getUntrackedParameter<unsigned int>("samplingInterval", 300)),
26  m_endFill(pset.getUntrackedParameter<bool>("endFill", true)),
27  m_name(pset.getUntrackedParameter<std::string>("name", "LHCInfoPopConSourceHandler")),
28  m_connectionString(pset.getUntrackedParameter<std::string>("connectionString", "")),
29  m_ecalConnectionString(pset.getUntrackedParameter<std::string>("ecalConnectionString", "")),
30  m_dipSchema(pset.getUntrackedParameter<std::string>("DIPSchema", "")),
31  m_authpath(pset.getUntrackedParameter<std::string>("authenticationPath", "")),
32  m_fillPayload(),
33  m_prevPayload(),
34  m_tmpBuffer(),
35  m_payloadBuffer() {
36  if (pset.exists("startTime")) {
37  m_startTime = boost::posix_time::time_from_string(pset.getUntrackedParameter<std::string>("startTime"));
38  }
39  boost::posix_time::ptime now = boost::posix_time::second_clock::local_time();
40  m_endTime = now;
41  if (pset.exists("endTime")) {
42  m_endTime = boost::posix_time::time_from_string(pset.getUntrackedParameter<std::string>("endTime"));
43  if (m_endTime > now)
44  m_endTime = now;
45  }
46 }

References m_endTime, m_startTime, submitPVValidationJobs::now, muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~LHCInfoPopConSourceHandler()

LHCInfoPopConSourceHandler::~LHCInfoPopConSourceHandler ( )
override

Definition at line 49 of file LHCInfoPopConSourceHandler.cc.

49 {}

Member Function Documentation

◆ addEmptyPayload()

void LHCInfoPopConSourceHandler::addEmptyPayload ( cond::Time_t  iov)
private

Definition at line 774 of file LHCInfoPopConSourceHandler.cc.

774  {
775  bool add = false;
776  if (m_to_transfer.empty()) {
777  if (!m_lastPayloadEmpty)
778  add = true;
779  } else {
780  LHCInfo* lastAdded = m_to_transfer.back().first;
781  if (lastAdded->fillNumber() != 0) {
782  add = true;
783  }
784  }
785  if (add) {
786  auto newPayload = std::make_shared<LHCInfo>();
787  m_to_transfer.push_back(std::make_pair(newPayload.get(), iov));
788  m_payloadBuffer.push_back(newPayload);
789  m_prevPayload = newPayload;
790  }
791 }

References popcon::PopConSourceHandler< LHCInfo >::add(), LHCInfo::fillNumber(), m_lastPayloadEmpty, m_payloadBuffer, m_prevPayload, and popcon::PopConSourceHandler< LHCInfo >::m_to_transfer.

Referenced by getNewObjects().

◆ getCTTPSData()

bool LHCInfoPopConSourceHandler::getCTTPSData ( cond::persistency::Session session,
const boost::posix_time::ptime &  beginFillTime,
const boost::posix_time::ptime &  endFillTime 
)
private

Definition at line 533 of file LHCInfoPopConSourceHandler.cc.

535  {
536  //run the fifth query against the CTPPS schema
537  //Initializing the CMS_CTP_CTPPS_COND schema.
538  coral::ISchema& CTPPS = session.coralSession().schema("CMS_CTP_CTPPS_COND");
539  //execute query for CTPPS Data
540  std::unique_ptr<coral::IQuery> CTPPSDataQuery(CTPPS.newQuery());
541  //FROM clause
542  CTPPSDataQuery->addToTableList(std::string("CTPPS_LHC_MACHINE_PARAMS"));
543  //SELECT clause
544  CTPPSDataQuery->addToOutputList(std::string("DIP_UPDATE_TIME"));
545  CTPPSDataQuery->addToOutputList(std::string("LHC_STATE"));
546  CTPPSDataQuery->addToOutputList(std::string("LHC_COMMENT"));
547  CTPPSDataQuery->addToOutputList(std::string("CTPPS_STATUS"));
548  CTPPSDataQuery->addToOutputList(std::string("LUMI_SECTION"));
549  CTPPSDataQuery->addToOutputList(std::string("XING_ANGLE_URAD"));
550  CTPPSDataQuery->addToOutputList(std::string("BETA_STAR_CMS"));
551  //WHERE CLAUSE
552  coral::AttributeList CTPPSDataBindVariables;
553  CTPPSDataBindVariables.extend<coral::TimeStamp>(std::string("beginFillTime"));
554  CTPPSDataBindVariables.extend<coral::TimeStamp>(std::string("endFillTime"));
555  CTPPSDataBindVariables[std::string("beginFillTime")].data<coral::TimeStamp>() = coral::TimeStamp(beginFillTime);
556  CTPPSDataBindVariables[std::string("endFillTime")].data<coral::TimeStamp>() = coral::TimeStamp(endFillTime);
557  std::string conditionStr = std::string("DIP_UPDATE_TIME>= :beginFillTime and DIP_UPDATE_TIME< :endFillTime");
558  CTPPSDataQuery->setCondition(conditionStr, CTPPSDataBindVariables);
559  //ORDER BY clause
560  CTPPSDataQuery->addToOrderList(std::string("DIP_UPDATE_TIME"));
561  //define query output
562  coral::AttributeList CTPPSDataOutput;
563  CTPPSDataOutput.extend<coral::TimeStamp>(std::string("DIP_UPDATE_TIME"));
564  CTPPSDataOutput.extend<std::string>(std::string("LHC_STATE"));
565  CTPPSDataOutput.extend<std::string>(std::string("LHC_COMMENT"));
566  CTPPSDataOutput.extend<std::string>(std::string("CTPPS_STATUS"));
567  CTPPSDataOutput.extend<int>(std::string("LUMI_SECTION"));
568  CTPPSDataOutput.extend<float>(std::string("XING_ANGLE_URAD"));
569  CTPPSDataOutput.extend<float>(std::string("BETA_STAR_CMS"));
570  CTPPSDataQuery->defineOutput(CTPPSDataOutput);
571  //execute the query
572  coral::ICursor& CTPPSDataCursor = CTPPSDataQuery->execute();
573  cond::Time_t dipTime = 0;
574  std::string lhcState = "", lhcComment = "", ctppsStatus = "";
575  unsigned int lumiSection = 0;
576  float crossingAngle = 0., betastar = 0.;
577 
578  bool ret = false;
580  while (CTPPSDataCursor.next()) {
581  if (m_debug) {
582  std::ostringstream CTPPS;
583  CTPPSDataCursor.currentRow().toOutputStream(CTPPS);
584  }
585  coral::Attribute const& dipTimeAttribute = CTPPSDataCursor.currentRow()[std::string("DIP_UPDATE_TIME")];
586  if (!dipTimeAttribute.isNull()) {
587  dipTime = cond::time::from_boost(dipTimeAttribute.data<coral::TimeStamp>().time());
588  if (filter.process(dipTime)) {
589  ret = true;
590  coral::Attribute const& lhcStateAttribute = CTPPSDataCursor.currentRow()[std::string("LHC_STATE")];
591  if (!lhcStateAttribute.isNull()) {
592  lhcState = lhcStateAttribute.data<std::string>();
593  }
594  coral::Attribute const& lhcCommentAttribute = CTPPSDataCursor.currentRow()[std::string("LHC_COMMENT")];
595  if (!lhcCommentAttribute.isNull()) {
596  lhcComment = lhcCommentAttribute.data<std::string>();
597  }
598  coral::Attribute const& ctppsStatusAttribute = CTPPSDataCursor.currentRow()[std::string("CTPPS_STATUS")];
599  if (!ctppsStatusAttribute.isNull()) {
600  ctppsStatus = ctppsStatusAttribute.data<std::string>();
601  }
602  coral::Attribute const& lumiSectionAttribute = CTPPSDataCursor.currentRow()[std::string("LUMI_SECTION")];
603  if (!lumiSectionAttribute.isNull()) {
604  lumiSection = lumiSectionAttribute.data<int>();
605  }
606  coral::Attribute const& crossingAngleAttribute = CTPPSDataCursor.currentRow()[std::string("XING_ANGLE_URAD")];
607  if (!crossingAngleAttribute.isNull()) {
608  crossingAngle = crossingAngleAttribute.data<float>();
609  }
610  coral::Attribute const& betaStarAttribute = CTPPSDataCursor.currentRow()[std::string("BETA_STAR_CMS")];
611  if (!betaStarAttribute.isNull()) {
612  betastar = betaStarAttribute.data<float>();
613  }
614  for (auto it = filter.current(); it != m_tmpBuffer.end(); it++) {
615  // set the current values to all of the payloads of the lumi section samples after the current since
616  LHCInfo& payload = *(it->second);
617  payload.setCrossingAngle(crossingAngle);
618  payload.setBetaStar(betastar);
619  payload.setLhcState(lhcState);
620  payload.setLhcComment(lhcComment);
621  payload.setCtppsStatus(ctppsStatus);
622  payload.setLumiSection(lumiSection);
623  }
624  }
625  }
626  }
627  return ret;
628 }

References cond::persistency::Session::coralSession(), ALCARECOTkAlBeamHalo_cff::filter, cond::time::from_boost(), m_debug, m_tmpBuffer, jets_cff::payload, runTheMatrix::ret, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getNewObjects().

◆ getDipData()

bool LHCInfoPopConSourceHandler::getDipData ( cond::persistency::Session session,
const boost::posix_time::ptime &  beginFillTime,
const boost::posix_time::ptime &  endFillTime 
)
private

Definition at line 390 of file LHCInfoPopConSourceHandler.cc.

392  {
393  //run the third and fourth query against the schema hosting detailed DIP information
394  coral::ISchema& beamCondSchema = session.coralSession().schema(m_dipSchema);
395  //start the transaction against the DIP "deep" database backend schema
396  //prepare the WHERE clause for both queries
397  coral::AttributeList bunchConfBindVariables;
398  bunchConfBindVariables.extend<coral::TimeStamp>(std::string("beginFillTime"));
399  bunchConfBindVariables.extend<coral::TimeStamp>(std::string("endFillTime"));
400  bunchConfBindVariables[std::string("beginFillTime")].data<coral::TimeStamp>() = coral::TimeStamp(beginFillTime);
401  bunchConfBindVariables[std::string("endFillTime")].data<coral::TimeStamp>() = coral::TimeStamp(endFillTime);
402  std::string conditionStr = std::string("DIPTIME >= :beginFillTime and DIPTIME< :endFillTime");
403  //define the output types for both queries
404  coral::AttributeList bunchConfOutput;
405  bunchConfOutput.extend<coral::TimeStamp>(std::string("DIPTIME"));
406  bunchConfOutput.extend<unsigned short>(std::string("BUCKET"));
407  //execute query for Beam 1
408  std::unique_ptr<coral::IQuery> bunchConf1Query(beamCondSchema.newQuery());
409  bunchConf1Query->addToTableList(std::string("LHC_CIRCBUNCHCONFIG_BEAM1"),
410  std::string("BEAMCONF\", TABLE( BEAMCONF.VALUE ) \"BUCKETS"));
411  bunchConf1Query->addToOutputList(std::string("BEAMCONF.DIPTIME"), std::string("DIPTIME"));
412  bunchConf1Query->addToOutputList(std::string("BUCKETS.COLUMN_VALUE"), std::string("BUCKET"));
413  bunchConf1Query->setCondition(conditionStr, bunchConfBindVariables);
414  bunchConf1Query->addToOrderList(std::string("DIPTIME"));
415  bunchConf1Query->limitReturnedRows(LHCInfo::availableBunchSlots); //maximum number of filled bunches
416  bunchConf1Query->defineOutput(bunchConfOutput);
417 
418  coral::ICursor& bunchConf1Cursor = bunchConf1Query->execute();
419  std::bitset<LHCInfo::bunchSlots + 1> bunchConfiguration1(0ULL);
420  bool ret = false;
421  cond::Time_t lumiSectionTime = 0;
422  while (bunchConf1Cursor.next()) {
423  if (m_debug) {
424  std::ostringstream b1s;
425  bunchConf1Cursor.currentRow().toOutputStream(b1s);
426  }
427  coral::Attribute const& dipTimeAttribute = bunchConf1Cursor.currentRow()[std::string("DIPTIME")];
428  coral::Attribute const& bunchConf1Attribute = bunchConf1Cursor.currentRow()[std::string("BUCKET")];
429  if (!dipTimeAttribute.isNull() and !bunchConf1Attribute.isNull()) {
430  cond::Time_t dipTime = cond::time::from_boost(dipTimeAttribute.data<coral::TimeStamp>().time());
431  // assuming only one sample has been selected...
432  unsigned short slot = (bunchConf1Attribute.data<unsigned short>() - 1) / 10 + 1;
433  if (lumiSectionTime == 0 or lumiSectionTime == dipTime) {
434  bunchConfiguration1[slot] = true;
435  } else
436  break;
437  lumiSectionTime = dipTime;
438  }
439  }
440  if (ret) {
441  m_fillPayload->setBunchBitsetForBeam1(bunchConfiguration1);
442  }
443 
444  //execute query for Beam 2
445  std::unique_ptr<coral::IQuery> bunchConf2Query(beamCondSchema.newQuery());
446  bunchConf2Query->addToTableList(std::string("LHC_CIRCBUNCHCONFIG_BEAM2"),
447  std::string("BEAMCONF\", TABLE( BEAMCONF.VALUE ) \"BUCKETS"));
448  bunchConf2Query->addToOutputList(std::string("BEAMCONF.DIPTIME"), std::string("DIPTIME"));
449  bunchConf2Query->addToOutputList(std::string("BUCKETS.COLUMN_VALUE"), std::string("BUCKET"));
450  bunchConf2Query->setCondition(conditionStr, bunchConfBindVariables);
451  bunchConf2Query->addToOrderList(std::string("DIPTIME"));
452  bunchConf2Query->limitReturnedRows(LHCInfo::availableBunchSlots); //maximum number of filled bunches
453  bunchConf2Query->defineOutput(bunchConfOutput);
454  coral::ICursor& bunchConf2Cursor = bunchConf2Query->execute();
455 
456  std::bitset<LHCInfo::bunchSlots + 1> bunchConfiguration2(0ULL);
457  ret = false;
458  lumiSectionTime = 0;
459  while (bunchConf2Cursor.next()) {
460  if (m_debug) {
461  std::ostringstream b2s;
462  bunchConf2Cursor.currentRow().toOutputStream(b2s);
463  }
464  coral::Attribute const& dipTimeAttribute = bunchConf2Cursor.currentRow()[std::string("DIPTIME")];
465  coral::Attribute const& bunchConf2Attribute = bunchConf2Cursor.currentRow()[std::string("BUCKET")];
466  if (!dipTimeAttribute.isNull() and !bunchConf2Attribute.isNull()) {
467  ret = true;
468  cond::Time_t dipTime = cond::time::from_boost(dipTimeAttribute.data<coral::TimeStamp>().time());
469  // assuming only one sample has been selected...
470  unsigned short slot = (bunchConf2Attribute.data<unsigned short>() - 1) / 10 + 1;
471  if (lumiSectionTime == 0 or lumiSectionTime == dipTime) {
472  bunchConfiguration2[slot] = true;
473  } else
474  break;
475  lumiSectionTime = dipTime;
476  }
477  }
478  if (ret) {
479  m_fillPayload->setBunchBitsetForBeam2(bunchConfiguration2);
480  }
481  //execute query for lumiPerBX
482  std::unique_ptr<coral::IQuery> lumiDataQuery(beamCondSchema.newQuery());
483  lumiDataQuery->addToTableList(std::string("CMS_LHC_LUMIPERBUNCH"),
484  std::string("LUMIPERBUNCH\", TABLE( LUMIPERBUNCH.LUMI_BUNCHINST ) \"VALUE"));
485  lumiDataQuery->addToOutputList(std::string("LUMIPERBUNCH.DIPTIME"), std::string("DIPTIME"));
486  lumiDataQuery->addToOutputList(std::string("VALUE.COLUMN_VALUE"), std::string("LUMI_BUNCH"));
487  coral::AttributeList lumiDataBindVariables;
488  lumiDataBindVariables.extend<coral::TimeStamp>(std::string("beginFillTime"));
489  lumiDataBindVariables.extend<coral::TimeStamp>(std::string("endFillTime"));
490  lumiDataBindVariables[std::string("beginFillTime")].data<coral::TimeStamp>() = coral::TimeStamp(beginFillTime);
491  lumiDataBindVariables[std::string("endFillTime")].data<coral::TimeStamp>() = coral::TimeStamp(endFillTime);
492  conditionStr = std::string("DIPTIME BETWEEN :beginFillTime AND :endFillTime");
493  lumiDataQuery->setCondition(conditionStr, lumiDataBindVariables);
494  lumiDataQuery->addToOrderList(std::string("DIPTIME"));
495  lumiDataQuery->limitReturnedRows(3564); //Maximum number of bunches.
496  //define query output
497  coral::AttributeList lumiDataOutput;
498  lumiDataOutput.extend<coral::TimeStamp>(std::string("DIPTIME"));
499  lumiDataOutput.extend<float>(std::string("LUMI_BUNCH"));
500  lumiDataQuery->defineOutput(lumiDataOutput);
501  //execute the query
502  coral::ICursor& lumiDataCursor = lumiDataQuery->execute();
503 
504  std::vector<float> lumiPerBX;
505  ret = false;
506  lumiSectionTime = 0;
507  while (lumiDataCursor.next()) {
508  if (m_debug) {
509  std::ostringstream lpBX;
510  lumiDataCursor.currentRow().toOutputStream(lpBX);
511  }
512  coral::Attribute const& dipTimeAttribute = lumiDataCursor.currentRow()[std::string("DIPTIME")];
513  coral::Attribute const& lumiBunchAttribute = lumiDataCursor.currentRow()[std::string("LUMI_BUNCH")];
514  if (!dipTimeAttribute.isNull() and !lumiBunchAttribute.isNull()) {
515  ret = true;
516  cond::Time_t dipTime = cond::time::from_boost(dipTimeAttribute.data<coral::TimeStamp>().time());
517  // assuming only one sample has been selected...
518  float lumi_b = lumiBunchAttribute.data<float>();
519  if (lumiSectionTime == 0 or lumiSectionTime == dipTime) {
520  if (lumi_b != 0.00)
521  lumiPerBX.push_back(lumi_b);
522  } else
523  break;
524  lumiSectionTime = dipTime;
525  }
526  }
527  if (ret) {
528  m_fillPayload->setLumiPerBX(lumiPerBX);
529  }
530  return ret;
531 }

References LHCInfo::availableBunchSlots, cond::persistency::Session::coralSession(), cond::time::from_boost(), m_debug, m_dipSchema, m_fillPayload, or, runTheMatrix::ret, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getNewObjects().

◆ getEcalData()

bool LHCInfoPopConSourceHandler::getEcalData ( cond::persistency::Session session,
const boost::posix_time::ptime &  lowerTime,
const boost::posix_time::ptime &  upperTime,
bool  update 
)
private

Definition at line 668 of file LHCInfoPopConSourceHandler.cc.

671  {
672  //run the sixth query against the CMS_DCS_ENV_PVSS_COND schema
673  //Initializing the CMS_DCS_ENV_PVSS_COND schema.
674  coral::ISchema& ECAL = session.nominalSchema();
675  //start the transaction against the fill logging schema
676  //execute query for ECAL Data
677  std::unique_ptr<coral::IQuery> ECALDataQuery(ECAL.newQuery());
678  //FROM clause
679  ECALDataQuery->addToTableList(std::string("BEAM_PHASE"));
680  //SELECT clause
681  ECALDataQuery->addToOutputList(std::string("CHANGE_DATE"));
682  ECALDataQuery->addToOutputList(std::string("DIP_value"));
683  ECALDataQuery->addToOutputList(std::string("element_nr"));
684  ECALDataQuery->addToOutputList(std::string("VALUE_NUMBER"));
685  //WHERE CLAUSE
686  coral::AttributeList ECALDataBindVariables;
687  ECALDataBindVariables.extend<coral::TimeStamp>(std::string("lowerTime"));
688  ECALDataBindVariables.extend<coral::TimeStamp>(std::string("upperTime"));
689  ECALDataBindVariables[std::string("lowerTime")].data<coral::TimeStamp>() = coral::TimeStamp(lowerTime);
690  ECALDataBindVariables[std::string("upperTime")].data<coral::TimeStamp>() = coral::TimeStamp(upperTime);
691  std::string conditionStr = std::string(
692  "(DIP_value LIKE '%beamPhaseMean%' OR DIP_value LIKE '%cavPhaseMean%') AND CHANGE_DATE >= :lowerTime AND "
693  "CHANGE_DATE < :upperTime");
694 
695  ECALDataQuery->setCondition(conditionStr, ECALDataBindVariables);
696  //ORDER BY clause
697  ECALDataQuery->addToOrderList(std::string("CHANGE_DATE"));
698  ECALDataQuery->addToOrderList(std::string("DIP_value"));
699  ECALDataQuery->addToOrderList(std::string("element_nr"));
700  //define query output
701  coral::AttributeList ECALDataOutput;
702  ECALDataOutput.extend<coral::TimeStamp>(std::string("CHANGE_DATE"));
703  ECALDataOutput.extend<std::string>(std::string("DIP_value"));
704  ECALDataOutput.extend<unsigned int>(std::string("element_nr"));
705  ECALDataOutput.extend<float>(std::string("VALUE_NUMBER"));
706  //ECALDataQuery->limitReturnedRows( 14256 ); //3564 entries per vector.
707  ECALDataQuery->defineOutput(ECALDataOutput);
708  //execute the query
709  coral::ICursor& ECALDataCursor = ECALDataQuery->execute();
710  cond::Time_t changeTime = 0;
711  cond::Time_t firstTime = 0;
712  std::string dipVal = "";
713  unsigned int elementNr = 0;
714  float value = 0.;
715  std::set<cond::Time_t> initializedVectors;
717  bool ret = false;
718  if (m_prevPayload.get()) {
719  for (auto& lumiSlot : m_tmpBuffer) {
720  lumiSlot.second->setBeam1VC(m_prevPayload->beam1VC());
721  lumiSlot.second->setBeam2VC(m_prevPayload->beam2VC());
722  lumiSlot.second->setBeam1RF(m_prevPayload->beam1RF());
723  lumiSlot.second->setBeam2RF(m_prevPayload->beam2RF());
724  }
725  }
726  std::map<cond::Time_t, cond::Time_t> iovMap;
727  cond::Time_t lowerLumi = m_tmpBuffer.front().first;
728  while (ECALDataCursor.next()) {
729  if (m_debug) {
730  std::ostringstream ECAL;
731  ECALDataCursor.currentRow().toOutputStream(ECAL);
732  }
733  coral::Attribute const& changeDateAttribute = ECALDataCursor.currentRow()[std::string("CHANGE_DATE")];
734  if (!changeDateAttribute.isNull()) {
735  ret = true;
736  boost::posix_time::ptime chTime = changeDateAttribute.data<coral::TimeStamp>().time();
737  // move the first IOV found to the start of the fill interval selected
738  if (changeTime == 0) {
739  firstTime = cond::time::from_boost(chTime);
740  }
741  changeTime = cond::time::from_boost(chTime);
742  cond::Time_t iovTime = changeTime;
743  if (!update and changeTime == firstTime)
744  iovTime = lowerLumi;
745  coral::Attribute const& dipValAttribute = ECALDataCursor.currentRow()[std::string("DIP_value")];
746  coral::Attribute const& valueNumberAttribute = ECALDataCursor.currentRow()[std::string("VALUE_NUMBER")];
747  coral::Attribute const& elementNrAttribute = ECALDataCursor.currentRow()[std::string("element_nr")];
748  if (!dipValAttribute.isNull() and !valueNumberAttribute.isNull()) {
749  dipVal = dipValAttribute.data<std::string>();
750  elementNr = elementNrAttribute.data<unsigned int>();
751  value = valueNumberAttribute.data<float>();
752  if (isnan(value))
753  value = 0.;
754  if (filter.process(iovTime)) {
755  iovMap.insert(std::make_pair(changeTime, filter.current()->first));
756  for (auto it = filter.current(); it != m_tmpBuffer.end(); it++) {
757  LHCInfo& payload = *(it->second);
758  LHCInfoImpl::setElementData(it->first, dipVal, elementNr, value, payload, initializedVectors);
759  }
760  }
761  //}
762  }
763  }
764  }
765  if (m_debug) {
766  for (auto& im : iovMap) {
767  edm::LogInfo(m_name) << "Found iov=" << im.first << " (" << cond::time::to_boost(im.first) << " ) moved to "
768  << im.second << " ( " << cond::time::to_boost(im.second) << " )";
769  }
770  }
771  return ret;
772 }

References ECAL, ALCARECOTkAlBeamHalo_cff::filter, cond::time::from_boost(), CommonMethods::isnan(), m_debug, m_name, m_prevPayload, m_tmpBuffer, cond::persistency::Session::nominalSchema(), jets_cff::payload, runTheMatrix::ret, LHCInfoImpl::setElementData(), AlCaHLTBitMon_QueryRunRegistry::string, ntuplemaker::time, cond::time::to_boost(), and update.

Referenced by getNewObjects().

◆ getFillData()

bool LHCInfoPopConSourceHandler::getFillData ( cond::persistency::Session session,
unsigned short  fillId 
)
private

Definition at line 251 of file LHCInfoPopConSourceHandler.cc.

251  {
252  // Prepare the WHERE clause
253  coral::AttributeList fillDataBindVariables;
254  fillDataBindVariables.extend<unsigned short>(std::string("fillId"));
255  fillDataBindVariables[std::string("fillId")].data<unsigned short>() = fillId;
256  std::string conditionStr = "LHCFILL=:fillId";
257  return LHCInfoImpl::makeFillDataQuery(session, conditionStr, fillDataBindVariables, m_fillPayload, m_debug);
258 }

References m_debug, m_fillPayload, LHCInfoImpl::makeFillDataQuery(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getNewObjects().

◆ getLumiData()

size_t LHCInfoPopConSourceHandler::getLumiData ( cond::persistency::Session session,
const boost::posix_time::ptime &  beginFillTime,
const boost::posix_time::ptime &  endFillTime 
)
private

Definition at line 260 of file LHCInfoPopConSourceHandler.cc.

262  {
263  coral::ISchema& runTimeLoggerSchema = session.nominalSchema();
264  //prepare the query for table 2:
265  std::unique_ptr<coral::IQuery> fillDataQuery2(runTimeLoggerSchema.newQuery());
266  //FROM clause
267  fillDataQuery2->addToTableList(std::string("LUMI_SECTIONS"));
268  //SELECT clause
269  fillDataQuery2->addToOutputList(std::string("DELIVLUMI"));
270  fillDataQuery2->addToOutputList(std::string("LIVELUMI"));
271  fillDataQuery2->addToOutputList(std::string("INSTLUMI"));
272  fillDataQuery2->addToOutputList(std::string("INSTLUMIERROR"));
273  fillDataQuery2->addToOutputList(std::string("STARTTIME"));
274  fillDataQuery2->addToOutputList(std::string("LHCFILL"));
275  //WHERE clause
276  coral::AttributeList fillDataBindVariables;
277  fillDataBindVariables.extend<coral::TimeStamp>(std::string("start"));
278  fillDataBindVariables.extend<coral::TimeStamp>(std::string("stop"));
279  fillDataBindVariables[std::string("start")].data<coral::TimeStamp>() = coral::TimeStamp(beginFillTime);
280  fillDataBindVariables[std::string("stop")].data<coral::TimeStamp>() = coral::TimeStamp(endFillTime);
281  std::string conditionStr = "DELIVLUMI IS NOT NULL AND STARTTIME >= :start AND STARTTIME< :stop";
282  fillDataQuery2->setCondition(conditionStr, fillDataBindVariables);
283  //ORDER BY clause
284  fillDataQuery2->addToOrderList(std::string("STARTTIME"));
285  //define query output*/
286  coral::AttributeList fillDataOutput2;
287  fillDataOutput2.extend<float>(std::string("DELIVEREDLUMI"));
288  fillDataOutput2.extend<float>(std::string("RECORDEDLUMI"));
289  fillDataOutput2.extend<float>(std::string("INSTLUMI"));
290  fillDataOutput2.extend<float>(std::string("INSTLUMIERROR"));
291  fillDataOutput2.extend<coral::TimeStamp>(std::string("STARTTIME"));
292  fillDataOutput2.extend<int>(std::string("LHCFILL"));
293  fillDataQuery2->defineOutput(fillDataOutput2);
294  //execute the query
295  coral::ICursor& fillDataCursor2 = fillDataQuery2->execute();
296 
297  size_t nlumi = 0;
298  while (fillDataCursor2.next()) {
299  nlumi++;
300  float delivLumi = 0., recLumi = 0., instLumi = 0, instLumiErr = 0.;
301  cond::Time_t since = 0;
302  coral::Attribute const& delivLumiAttribute = fillDataCursor2.currentRow()[std::string("DELIVEREDLUMI")];
303  if (!delivLumiAttribute.isNull()) {
304  delivLumi = delivLumiAttribute.data<float>() / 1000.;
305  }
306  coral::Attribute const& recLumiAttribute = fillDataCursor2.currentRow()[std::string("RECORDEDLUMI")];
307  if (!recLumiAttribute.isNull()) {
308  recLumi = recLumiAttribute.data<float>() / 1000.;
309  }
310  coral::Attribute const& instLumiAttribute = fillDataCursor2.currentRow()[std::string("INSTLUMI")];
311  if (!instLumiAttribute.isNull()) {
312  instLumi = instLumiAttribute.data<float>() / 1000.;
313  }
314  coral::Attribute const& instLumiErrAttribute = fillDataCursor2.currentRow()[std::string("INSTLUMIERROR")];
315  if (!instLumiErrAttribute.isNull()) {
316  instLumiErr = instLumiErrAttribute.data<float>() / 1000.;
317  }
318  coral::Attribute const& startLumiSectionAttribute = fillDataCursor2.currentRow()[std::string("STARTTIME")];
319  if (!startLumiSectionAttribute.isNull()) {
320  since = cond::time::from_boost(startLumiSectionAttribute.data<coral::TimeStamp>().time());
321  }
322  LHCInfo* thisLumiSectionInfo = m_fillPayload->cloneFill();
323  m_tmpBuffer.emplace_back(std::make_pair(since, thisLumiSectionInfo));
324  LHCInfo& payload = *thisLumiSectionInfo;
325  payload.setDelivLumi(delivLumi);
326  payload.setRecLumi(recLumi);
327  payload.setInstLumi(instLumi);
328  payload.setInstLumiError(instLumiErr);
329  }
330  return nlumi;
331 }

References cond::time::from_boost(), muonGEMDigis_cfi::instLumi, m_fillPayload, m_tmpBuffer, cond::persistency::Session::nominalSchema(), jets_cff::payload, writeEcalDQMStatus::since, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getNewObjects().

◆ getNewObjects()

void LHCInfoPopConSourceHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< LHCInfo >.

Definition at line 847 of file LHCInfoPopConSourceHandler.cc.

847  {
848  //reference to the last payload in the tag
849  Ref previousFill;
850 
851  //if a new tag is created, transfer fake fill from 1 to the first fill for the first time
852  if (tagInfo().name.empty()) {
853  edm::LogInfo(m_name) << "New tag " << tagInfo().name << "; from " << m_name << "::getNewObjects";
854  } else {
855  //check what is already inside the database
856  edm::LogInfo(m_name) << "got info for tag " << tagInfo().name << ": size " << tagInfo().size
857  << ", last object valid since " << tagInfo().lastInterval.since << " ( "
858  << boost::posix_time::to_iso_extended_string(
859  cond::time::to_boost(tagInfo().lastInterval.since))
860  << " ); from " << m_name << "::getNewObjects";
861  }
862 
863  cond::Time_t lastSince = tagInfo().lastInterval.since;
864  if (lastSince == 0) {
865  // for a new or empty tag, an empty payload should be added on top with since=1
866  addEmptyPayload(1);
867  } else {
868  edm::LogInfo(m_name) << "The last Iov in tag " << tagInfo().name << " valid since " << lastSince << "from "
869  << m_name << "::getNewObjects";
870  }
871 
872  boost::posix_time::ptime executionTime = boost::posix_time::second_clock::local_time();
873  cond::Time_t targetSince = 0;
874  cond::Time_t endIov = cond::time::from_boost(executionTime);
875  if (!m_startTime.is_not_a_date_time()) {
876  targetSince = cond::time::from_boost(m_startTime);
877  }
878  if (lastSince > targetSince)
879  targetSince = lastSince;
880 
881  edm::LogInfo(m_name) << "Starting sampling at "
882  << boost::posix_time::to_simple_string(cond::time::to_boost(targetSince));
883 
884  //retrieve the data from the relational database source
886  //configure the connection
887  if (m_debug) {
888  connection.setMessageVerbosity(coral::Debug);
889  } else {
890  connection.setMessageVerbosity(coral::Error);
891  }
892  connection.setAuthenticationPath(m_authpath);
893  connection.configure();
894  //create the sessions
895  cond::persistency::Session session = connection.createSession(m_connectionString, false);
897  // fetch last payload when available
898  if (!tagInfo().lastInterval.payloadId.empty()) {
900  session3.transaction().start(true);
902  session3.transaction().commit();
903  }
904 
905  bool iovAdded = false;
906  while (true) {
907  if (targetSince >= endIov) {
908  edm::LogInfo(m_name) << "Sampling ended at the time "
909  << boost::posix_time::to_simple_string(cond::time::to_boost(endIov));
910  break;
911  }
912  bool updateEcal = false;
913  boost::posix_time::ptime targetTime = cond::time::to_boost(targetSince);
914  boost::posix_time::ptime startSampleTime;
915  boost::posix_time::ptime endSampleTime;
916  if (!m_endFill and m_prevPayload->fillNumber() and m_prevPayload->endTime() == 0ULL) {
917  // execute the query for the current fill
918  session.transaction().start(true);
919  edm::LogInfo(m_name) << "Searching started fill #" << m_prevPayload->fillNumber();
920  bool foundFill = getFillData(session, m_prevPayload->fillNumber());
921  session.transaction().commit();
922  if (!foundFill) {
923  edm::LogError(m_name) << "Could not find fill #" << m_prevPayload->fillNumber();
924  break;
925  }
926  updateEcal = true;
927  startSampleTime = cond::time::to_boost(lastSince);
928  } else {
929  session.transaction().start(true);
930  edm::LogInfo(m_name) << "Searching new fill after " << boost::posix_time::to_simple_string(targetTime);
931  bool foundFill = getNextFillData(session, targetTime, m_endFill);
932  session.transaction().commit();
933  if (!foundFill) {
934  edm::LogInfo(m_name) << "No fill found - END of job.";
935  if (iovAdded)
936  addEmptyPayload(targetSince);
937  break;
938  }
939  startSampleTime = cond::time::to_boost(m_fillPayload->createTime());
940  }
941  cond::Time_t startFillTime = m_fillPayload->createTime();
942  cond::Time_t endFillTime = m_fillPayload->endTime();
943  unsigned short lhcFill = m_fillPayload->fillNumber();
944  if (endFillTime == 0ULL) {
945  edm::LogInfo(m_name) << "Found ongoing fill " << lhcFill << " created at " << cond::time::to_boost(startFillTime);
946  endSampleTime = executionTime;
947  targetSince = endIov;
948  } else {
949  edm::LogInfo(m_name) << "Found fill " << lhcFill << " created at " << cond::time::to_boost(startFillTime)
950  << " ending at " << cond::time::to_boost(endFillTime);
951  endSampleTime = cond::time::to_boost(endFillTime);
952  targetSince = endFillTime;
953  }
954 
955  session.transaction().start(true);
956  getDipData(session, startSampleTime, endSampleTime);
957  size_t nlumi = getLumiData(session, startSampleTime, endSampleTime);
958  edm::LogInfo(m_name) << "Found " << nlumi << " lumisections during the fill " << lhcFill;
959  boost::posix_time::ptime flumiStart = cond::time::to_boost(m_tmpBuffer.front().first);
960  boost::posix_time::ptime flumiStop = cond::time::to_boost(m_tmpBuffer.back().first);
961  edm::LogInfo(m_name) << "First lumi starts at " << flumiStart << " last lumi starts at " << flumiStop;
962  getCTTPSData(session, startSampleTime, endSampleTime);
963  session.transaction().commit();
964  session2.transaction().start(true);
965  getEcalData(session2, startSampleTime, endSampleTime, updateEcal);
966  session2.transaction().commit();
967  //
969  edm::LogInfo(m_name) << "Added " << niovs << " iovs within the Fill time";
970  m_tmpBuffer.clear();
971  iovAdded = true;
972  //if(m_prevPayload->fillNumber() and m_prevPayload->endTime()!=0ULL) addEmptyPayload( m_fillPayload->endTime() );
973  if (m_prevPayload->fillNumber() and m_fillPayload->endTime() != 0ULL)
974  addEmptyPayload(m_fillPayload->endTime());
975  }
976 }

References addEmptyPayload(), cond::persistency::Transaction::commit(), cond::persistency::ConnectionPool::configure(), cond::persistency::ConnectionPool::createSession(), popcon::PopConSourceHandler< LHCInfo >::dbSession(), Debug, cond::persistency::Session::fetchPayload(), cond::time::from_boost(), getCTTPSData(), getDipData(), getEcalData(), getFillData(), getLumiData(), getNextFillData(), cond::TagInfo_t::lastInterval, m_authpath, m_connectionString, m_debug, m_ecalConnectionString, m_endFill, m_fillPayload, m_name, m_payloadBuffer, m_prevPayload, m_startTime, m_tmpBuffer, popcon::PopConSourceHandler< LHCInfo >::m_to_transfer, Skims_PA_cff::name, cond::TagInfo_t::name, cond::Iov_t::payloadId, cond::persistency::ConnectionPool::setAuthenticationPath(), cond::persistency::ConnectionPool::setMessageVerbosity(), cond::Iov_t::since, cond::TagInfo_t::size, cond::persistency::Transaction::start(), popcon::PopConSourceHandler< LHCInfo >::tagInfo(), cond::time::to_boost(), cond::persistency::Session::transaction(), and LHCInfoImpl::transferPayloads().

◆ getNextFillData()

bool LHCInfoPopConSourceHandler::getNextFillData ( cond::persistency::Session session,
const boost::posix_time::ptime &  targetTime,
bool  ended 
)
private

Definition at line 235 of file LHCInfoPopConSourceHandler.cc.

237  {
238  // Prepare the WHERE clause
239  coral::AttributeList fillDataBindVariables;
240  fillDataBindVariables.extend<coral::TimeStamp>(std::string("targetTime"));
241  fillDataBindVariables[std::string("targetTime")].data<coral::TimeStamp>() =
242  coral::TimeStamp(targetTime + boost::posix_time::seconds(1));
243  //by imposing BEGINTIME IS NOT NULL, we remove fills which never went into stable beams,
244  //by additionally imposing ENDTIME IS NOT NULL, we select only finished fills
245  std::string conditionStr = "BEGINTIME IS NOT NULL AND CREATETIME > :targetTime AND LHCFILL IS NOT NULL";
246  if (ended)
247  conditionStr += " AND ENDTIME IS NOT NULL";
248  return LHCInfoImpl::makeFillDataQuery(session, conditionStr, fillDataBindVariables, m_fillPayload, m_debug);
249 }

References m_debug, m_fillPayload, LHCInfoImpl::makeFillDataQuery(), seconds(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getNewObjects().

◆ id()

std::string LHCInfoPopConSourceHandler::id ( ) const
overridevirtual

Implements popcon::PopConSourceHandler< LHCInfo >.

Definition at line 978 of file LHCInfoPopConSourceHandler.cc.

978 { return m_name; }

References m_name.

Member Data Documentation

◆ m_authpath

std::string LHCInfoPopConSourceHandler::m_authpath
private

Definition at line 46 of file LHCInfoPopConSourceHandler.h.

Referenced by getNewObjects().

◆ m_connectionString

std::string LHCInfoPopConSourceHandler::m_connectionString
private

Definition at line 45 of file LHCInfoPopConSourceHandler.h.

Referenced by getNewObjects().

◆ m_debug

bool LHCInfoPopConSourceHandler::m_debug
private

◆ m_dipSchema

std::string LHCInfoPopConSourceHandler::m_dipSchema
private

Definition at line 46 of file LHCInfoPopConSourceHandler.h.

Referenced by getDipData().

◆ m_ecalConnectionString

std::string LHCInfoPopConSourceHandler::m_ecalConnectionString
private

Definition at line 45 of file LHCInfoPopConSourceHandler.h.

Referenced by getNewObjects().

◆ m_endFill

bool LHCInfoPopConSourceHandler::m_endFill = true
private

Definition at line 42 of file LHCInfoPopConSourceHandler.h.

Referenced by getNewObjects().

◆ m_endTime

boost::posix_time::ptime LHCInfoPopConSourceHandler::m_endTime
private

Definition at line 39 of file LHCInfoPopConSourceHandler.h.

Referenced by LHCInfoPopConSourceHandler().

◆ m_fillPayload

std::unique_ptr<LHCInfo> LHCInfoPopConSourceHandler::m_fillPayload
private

◆ m_lastPayloadEmpty

bool LHCInfoPopConSourceHandler::m_lastPayloadEmpty = false
private

Definition at line 51 of file LHCInfoPopConSourceHandler.h.

Referenced by addEmptyPayload().

◆ m_name

std::string LHCInfoPopConSourceHandler::m_name
private

Definition at line 43 of file LHCInfoPopConSourceHandler.h.

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

◆ m_payloadBuffer

std::vector<std::shared_ptr<LHCInfo> > LHCInfoPopConSourceHandler::m_payloadBuffer
private

Definition at line 50 of file LHCInfoPopConSourceHandler.h.

Referenced by addEmptyPayload(), and getNewObjects().

◆ m_prevPayload

std::shared_ptr<LHCInfo> LHCInfoPopConSourceHandler::m_prevPayload
private

Definition at line 48 of file LHCInfoPopConSourceHandler.h.

Referenced by addEmptyPayload(), getEcalData(), and getNewObjects().

◆ m_samplingInterval

unsigned int LHCInfoPopConSourceHandler::m_samplingInterval
private

Definition at line 41 of file LHCInfoPopConSourceHandler.h.

◆ m_startTime

boost::posix_time::ptime LHCInfoPopConSourceHandler::m_startTime
private

Definition at line 38 of file LHCInfoPopConSourceHandler.h.

Referenced by getNewObjects(), and LHCInfoPopConSourceHandler().

◆ m_tmpBuffer

std::vector<std::pair<cond::Time_t, std::shared_ptr<LHCInfo> > > LHCInfoPopConSourceHandler::m_tmpBuffer
private

Definition at line 49 of file LHCInfoPopConSourceHandler.h.

Referenced by getCTTPSData(), getEcalData(), getLumiData(), and getNewObjects().

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:367
LHCInfoPopConSourceHandler::getNextFillData
bool getNextFillData(cond::persistency::Session &session, const boost::posix_time::ptime &targetTime, bool ended)
Definition: LHCInfoPopConSourceHandler.cc:235
popcon::PopConSourceHandler< LHCInfo >::m_to_transfer
OldContainer m_to_transfer
Definition: PopConSourceHandler.h:162
LHCInfoPopConSourceHandler::addEmptyPayload
void addEmptyPayload(cond::Time_t iov)
Definition: LHCInfoPopConSourceHandler.cc:774
cond::time::to_boost
boost::posix_time::ptime to_boost(Time_t iValue)
Definition: TimeConversions.h:39
popcon::PopConSourceHandler< LHCInfo >::dbSession
cond::persistency::Session & dbSession() const
Definition: PopConSourceHandler.h:144
LHCInfoPopConSourceHandler::m_name
std::string m_name
Definition: LHCInfoPopConSourceHandler.h:43
LHCInfoPopConSourceHandler::m_connectionString
std::string m_connectionString
Definition: LHCInfoPopConSourceHandler.h:45
submitPVValidationJobs.now
now
Definition: submitPVValidationJobs.py:639
LHCInfoPopConSourceHandler::m_endTime
boost::posix_time::ptime m_endTime
Definition: LHCInfoPopConSourceHandler.h:39
LHCInfoPopConSourceHandler::getCTTPSData
bool getCTTPSData(cond::persistency::Session &session, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
Definition: LHCInfoPopConSourceHandler.cc:533
LHCInfoPopConSourceHandler::getFillData
bool getFillData(cond::persistency::Session &session, unsigned short fillId)
Definition: LHCInfoPopConSourceHandler.cc:251
LHCInfo
Definition: LHCInfo.h:12
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
LHCInfo::fillNumber
unsigned const short fillNumber() const
Definition: LHCInfo.cc:158
cond::persistency::ConnectionPool::createSession
Session createSession(const std::string &connectionString, bool writeCapable=false)
Definition: ConnectionPool.cc:158
LHCInfoImpl::setElementData
void setElementData(cond::Time_t since, const std::string &dipVal, unsigned int elementNr, float value, LHCInfo &payload, std::set< cond::Time_t > &initList)
Definition: LHCInfoPopConSourceHandler.cc:633
LHCInfoPopConSourceHandler::getEcalData
bool getEcalData(cond::persistency::Session &session, const boost::posix_time::ptime &lowerTime, const boost::posix_time::ptime &upperTime, bool update)
Definition: LHCInfoPopConSourceHandler.cc:668
cond::TagInfo_t::name
std::string name
Definition: Types.h:72
LHCInfoImpl::makeFillDataQuery
bool makeFillDataQuery(cond::persistency::Session &session, const std::string &conditionString, const coral::AttributeList &fillDataBindVariables, std::unique_ptr< LHCInfo > &targetPayload, bool debug)
Definition: LHCInfoPopConSourceHandler.cc:68
LHCInfo::availableBunchSlots
static const size_t availableBunchSlots
Definition: LHCInfo.h:61
cond::persistency::Session::fetchPayload
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
Definition: Session.h:213
LHCInfoPopConSourceHandler::m_startTime
boost::posix_time::ptime m_startTime
Definition: LHCInfoPopConSourceHandler.h:38
LHCInfoPopConSourceHandler::m_payloadBuffer
std::vector< std::shared_ptr< LHCInfo > > m_payloadBuffer
Definition: LHCInfoPopConSourceHandler.h:50
LHCInfoPopConSourceHandler::m_authpath
std::string m_authpath
Definition: LHCInfoPopConSourceHandler.h:46
Debug
const bool Debug
Definition: CosmicMuonParameters.h:12
ECAL
Definition: HCALResponse.h:21
seconds
double seconds()
cond::persistency::ConnectionPool
Definition: ConnectionPool.h:35
CommonMethods.isnan
def isnan(num)
Definition: CommonMethods.py:98
writeEcalDQMStatus.since
since
Definition: writeEcalDQMStatus.py:53
jets_cff.payload
payload
Definition: jets_cff.py:32
LHCInfoPopConSourceHandler::getDipData
bool getDipData(cond::persistency::Session &session, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
Definition: LHCInfoPopConSourceHandler.cc:390
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
LHCInfoPopConSourceHandler::m_dipSchema
std::string m_dipSchema
Definition: LHCInfoPopConSourceHandler.h:46
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LHCInfoPopConSourceHandler::m_samplingInterval
unsigned int m_samplingInterval
Definition: LHCInfoPopConSourceHandler.h:41
LHCInfoPopConSourceHandler::m_lastPayloadEmpty
bool m_lastPayloadEmpty
Definition: LHCInfoPopConSourceHandler.h:51
cond::persistency::ConnectionPool::setMessageVerbosity
void setMessageVerbosity(coral::MsgLevel level)
Definition: ConnectionPool.cc:172
popcon::PopConSourceHandler< LHCInfo >::tagInfo
cond::TagInfo_t const & tagInfo() const
Definition: PopConSourceHandler.h:78
cond::Iov_t::payloadId
Hash payloadId
Definition: Types.h:55
cond::time::from_boost
Time_t from_boost(boost::posix_time::ptime bt)
Definition: TimeConversions.h:43
cond::persistency::Session::nominalSchema
coral::ISchema & nominalSchema()
Definition: Session.cc:224
LHCInfoPopConSourceHandler::m_prevPayload
std::shared_ptr< LHCInfo > m_prevPayload
Definition: LHCInfoPopConSourceHandler.h:48
cond::persistency::Session
Definition: Session.h:63
cond::Iov_t::since
Time_t since
Definition: Types.h:53
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
leef::Error
edm::ErrorSummaryEntry Error
Definition: LogErrorEventFilter.cc:29
cond::persistency::Transaction::commit
void commit()
Definition: Session.cc:23
cond::persistency::Session::coralSession
coral::ISessionProxy & coralSession()
Definition: Session.cc:218
cond::persistency::ConnectionPool::setAuthenticationPath
void setAuthenticationPath(const std::string &p)
Definition: ConnectionPool.cc:33
value
Definition: value.py:1
cond::persistency::ConnectionPool::configure
void configure()
Definition: ConnectionPool.cc:125
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
muonGEMDigis_cfi.instLumi
instLumi
Definition: muonGEMDigis_cfi.py:10
LHCInfoImpl::transferPayloads
size_t transferPayloads(const std::vector< std::pair< cond::Time_t, std::shared_ptr< LHCInfo >>> &buffer, std::vector< std::shared_ptr< LHCInfo >> &payloadBuffer, std::vector< std::pair< LHCInfo *, cond::Time_t >> &vecToTransfer, std::shared_ptr< LHCInfo > &prevPayload)
Definition: LHCInfoPopConSourceHandler.cc:818
LHCInfoPopConSourceHandler::m_debug
bool m_debug
Definition: LHCInfoPopConSourceHandler.h:36
LHCInfoPopConSourceHandler::m_fillPayload
std::unique_ptr< LHCInfo > m_fillPayload
Definition: LHCInfoPopConSourceHandler.h:47
cond::TagInfo_t::lastInterval
Iov_t lastInterval
Definition: Types.h:73
cond::persistency::Session::transaction
Transaction & transaction()
Definition: Session.cc:52
cond::persistency::Transaction::start
void start(bool readOnly=true)
Definition: Session.cc:18
popcon::PopConSourceHandler< LHCInfo >::add
int add(value_type *payload, Summary *summary, Time_t time)
Definition: PopConSourceHandler.h:146
reco::JetExtendedAssociation::Ref
edm::Ref< Container > Ref
Definition: JetExtendedAssociation.h:32
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
LHCInfoPopConSourceHandler::m_endFill
bool m_endFill
Definition: LHCInfoPopConSourceHandler.h:42
LHCInfoImpl::LumiSectionFilter
Definition: LHCInfoPopConSourceHandler.cc:334
LHCInfoPopConSourceHandler::m_tmpBuffer
std::vector< std::pair< cond::Time_t, std::shared_ptr< LHCInfo > > > m_tmpBuffer
Definition: LHCInfoPopConSourceHandler.h:49
LHCInfoPopConSourceHandler::m_ecalConnectionString
std::string m_ecalConnectionString
Definition: LHCInfoPopConSourceHandler.h:45
ntuplemaker.time
time
Definition: ntuplemaker.py:310
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
update
#define update(a, b)
Definition: TrackClassifier.cc:10
cond::TagInfo_t::size
size_t size
Definition: Types.h:74
LHCInfoPopConSourceHandler::getLumiData
size_t getLumiData(cond::persistency::Session &session, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
Definition: LHCInfoPopConSourceHandler.cc:260