6 #include "RelationalAccess/ISessionProxy.h" 7 #include "RelationalAccess/ISchema.h" 8 #include "RelationalAccess/IQuery.h" 9 #include "RelationalAccess/ICursor.h" 10 #include "CoralBase/AttributeList.h" 11 #include "CoralBase/Attribute.h" 12 #include "CoralBase/AttributeSpecification.h" 13 #include "CoralBase/TimeStamp.h" 21 m_debug( pset.getUntrackedParameter<
bool>(
"debug",
false ) )
22 ,m_firstFill( (unsigned short)pset.getUntrackedParameter<unsigned
int>(
"firstFill", 1 ) )
23 ,m_lastFill( (unsigned short)pset.getUntrackedParameter<unsigned
int>(
"lastFill", m_firstFill ) )
24 ,m_name( pset.getUntrackedParameter<
std::
string>(
"name",
"LHCInfoPopConSourceHandler" ) )
25 ,m_connectionString(pset.getUntrackedParameter<
std::
string>(
"connectionString",
""))
26 ,m_dipSchema(pset.getUntrackedParameter<
std::
string>(
"DIPSchema",
""))
27 ,m_authpath(pset.getUntrackedParameter<
std::
string>(
"authenticationPath",
"")) {}
46 <<
" ); from " <<
m_name <<
"::getNewObjects";
53 <<
" and values:\n" << *previousFill
54 <<
"from " <<
m_name <<
"::getNewObjects";
55 if( m_firstFill <= previousFill->fillNumber() ) {
58 std::ostringstream es;
59 es <<
"Trying to insert fill number " <<
m_firstFill 60 << ( (
m_firstFill < previousFill->fillNumber() ) ?
", which is an older fill than " :
", which is the same fill as " )
61 <<
"the last one in the destination tag " << previousFill->fillNumber()
62 <<
": the first fill to be looked for will become " << previousFill->fillNumber() + 1;
63 edm::LogWarning( m_name ) << es.str() <<
"; from " << m_name <<
"::getNewObjects";
72 <<
" cannot be larger than the last one " <<
m_lastFill 73 <<
" EXITING. from " <<
m_name <<
"::getNewObjects";
90 coral::ISchema& runTimeLoggerSchema = session.
nominalSchema();
94 std::unique_ptr<coral::IQuery> fillDataQuery( runTimeLoggerSchema.newQuery() );
96 fillDataQuery->addToTableList(
std::string(
"RUNTIME_SUMMARY" ) );
98 fillDataQuery->addToOutputList(
std::string(
"LHCFILL" ) );
99 fillDataQuery->addToOutputList(
std::string(
"NBUNCHESBEAM1" ) );
100 fillDataQuery->addToOutputList(
std::string(
"NBUNCHESBEAM2" ) );
101 fillDataQuery->addToOutputList(
std::string(
"NCOLLIDINGBUNCHES" ) );
102 fillDataQuery->addToOutputList(
std::string(
"NTARGETBUNCHES" ) );
103 fillDataQuery->addToOutputList(
std::string(
"RUNTIME_TYPE_ID" ) );
104 fillDataQuery->addToOutputList(
std::string(
"PARTY1" ) );
105 fillDataQuery->addToOutputList(
std::string(
"PARTY2" ) );
106 fillDataQuery->addToOutputList(
std::string(
"CROSSINGANGLE" ) );
107 fillDataQuery->addToOutputList(
std::string(
"BETASTAR" ) );
108 fillDataQuery->addToOutputList(
std::string(
"INTENSITYBEAM1" ) );
109 fillDataQuery->addToOutputList(
std::string(
"INTENSITYBEAM2" ) );
110 fillDataQuery->addToOutputList(
std::string(
"ENERGY" ) );
111 fillDataQuery->addToOutputList(
std::string(
"CREATETIME" ) );
112 fillDataQuery->addToOutputList(
std::string(
"BEGINTIME" ) );
113 fillDataQuery->addToOutputList(
std::string(
"ENDTIME" ) );
114 fillDataQuery->addToOutputList(
std::string(
"INJECTIONSCHEME" ) );
116 coral::AttributeList fillDataBindVariables;
117 fillDataBindVariables.extend(
std::string(
"firstFillNumber" ),
typeid(
unsigned short ) );
119 fillDataBindVariables.extend(
std::string(
"lastFillNumber" ),
typeid(
unsigned short ) );
123 std::string conditionStr(
"BEGINTIME IS NOT NULL AND LHCFILL BETWEEN :firstFillNumber AND :lastFillNumber" );
124 fillDataQuery->setCondition( conditionStr, fillDataBindVariables );
126 fillDataQuery->addToOrderList(
std::string(
"LHCFILL" ) );
128 coral::AttributeList fillDataOutput;
129 fillDataOutput.extend<
unsigned short>(
std::string(
"LHCFILL" ) );
130 fillDataOutput.extend<
unsigned short>(
std::string(
"NBUNCHESBEAM1" ) );
131 fillDataOutput.extend<
unsigned short>(
std::string(
"NBUNCHESBEAM2" ) );
132 fillDataOutput.extend<
unsigned short>(
std::string(
"NCOLLIDINGBUNCHES" ) );
133 fillDataOutput.extend<
unsigned short>(
std::string(
"NTARGETBUNCHES" ) );
134 fillDataOutput.extend<
int>(
std::string(
"RUNTIME_TYPE_ID" ) );
135 fillDataOutput.extend<
int>(
std::string(
"PARTY1" ) );
136 fillDataOutput.extend<
int>(
std::string(
"PARTY2" ) );
137 fillDataOutput.extend<
float>(
std::string(
"CROSSINGANGLE" ) );
138 fillDataOutput.extend<
float>(
std::string(
"BETASTAR" ) );
139 fillDataOutput.extend<
float>(
std::string(
"INTENSITYBEAM1" ) );
140 fillDataOutput.extend<
float>(
std::string(
"INTENSITYBEAM2" ) );
141 fillDataOutput.extend<
float>(
std::string(
"ENERGY" ) );
142 fillDataOutput.extend<coral::TimeStamp>(
std::string(
"CREATETIME" ) );
143 fillDataOutput.extend<coral::TimeStamp>(
std::string(
"BEGINTIME" ) );
144 fillDataOutput.extend<coral::TimeStamp>(
std::string(
"ENDTIME" ) );
146 fillDataQuery->defineOutput( fillDataOutput );
148 coral::ICursor& fillDataCursor = fillDataQuery->execute();
150 unsigned short previousFillNumber = 1, currentFill =
m_firstFill;
151 cond::Time_t previousFillEndTime = 0ULL, afterPreviousFillEndTime = 0ULL, beforeStableBeamStartTime = 0ULL;
153 previousFillNumber = previousFill->fillNumber();
154 previousFillEndTime = previousFill->endTime();
156 unsigned short bunches1 = 0, bunches2 = 0, collidingBunches = 0, targetBunches = 0;
159 float crossingAngle = 0., betastar = 0., intensityBeam1 = 0., intensityBeam2 = 0., energy = 0.;
160 coral::TimeStamp stableBeamStartTimeStamp, beamDumpTimeStamp;
161 cond::Time_t creationTime = 0ULL, stableBeamStartTime = 0ULL, beamDumpTime = 0ULL;
163 std::ostringstream ss;
166 std::unique_ptr<coral::IQuery> fillDataQuery2( runTimeLoggerSchema.newQuery() );
168 fillDataQuery2->addToTableList(
std::string(
"LUMI_SECTIONS" ) );
170 fillDataQuery2->addToOutputList(
std::string(
"MAX(DELIVLUMI)" ) );
171 fillDataQuery2->addToOutputList(
std::string(
"MAX(LIVELUMI)" ) );
175 conditionStr =
"DELIVLUMI IS NOT NULL AND LHCFILL BETWEEN :firstFillNumber AND :lastFillNumber";
176 fillDataQuery2->setCondition( conditionStr, fillDataBindVariables );
178 fillDataQuery2->addToOrderList(
std::string(
"LHCFILL" ) );
179 fillDataQuery2->groupBy(
std::string(
"LHCFILL" ) );
181 coral::AttributeList fillDataOutput2;
182 fillDataOutput2.extend<
float>(
std::string(
"DELIVEREDLUMI" ) );
183 fillDataOutput2.extend<
float>(
std::string(
"RECORDEDLUMI" ) );
184 fillDataQuery2->defineOutput( fillDataOutput2 );
186 coral::ICursor& fillDataCursor2 = fillDataQuery2->execute();
188 float delivLumi = 0., recLumi = 0.;
192 while( fillDataCursor.next() ) {
194 std::ostringstream qs;
195 fillDataCursor.currentRow().toOutputStream( qs );
198 currentFill = fillDataCursor.currentRow()[
std::string(
"LHCFILL" ) ].data<
unsigned short>();
199 coral::Attribute
const & bunches1Attribute = fillDataCursor.currentRow()[
std::string(
"NBUNCHESBEAM1" ) ];
200 if( bunches1Attribute.isNull() ) {
203 bunches1 = bunches1Attribute.data<
unsigned short>();
205 coral::Attribute
const & bunches2Attribute = fillDataCursor.currentRow()[
std::string(
"NBUNCHESBEAM2" ) ];
206 if( bunches2Attribute.isNull() ) {
209 bunches2 = bunches2Attribute.data<
unsigned short>();
211 coral::Attribute
const & collidingBunchesAttribute = fillDataCursor.currentRow()[
std::string(
"NCOLLIDINGBUNCHES" ) ];
212 if( collidingBunchesAttribute.isNull() ) {
213 collidingBunches = 0;
215 collidingBunches = collidingBunchesAttribute.data<
unsigned short>();
217 coral::Attribute
const & targetBunchesAttribute = fillDataCursor.currentRow()[
std::string(
"NTARGETBUNCHES" ) ];
218 if( targetBunchesAttribute.isNull() ) {
221 targetBunches = targetBunchesAttribute.data<
unsigned short>();
225 coral::Attribute
const & particleType1Attribute = fillDataCursor.currentRow()[
std::string(
"PARTY1" ) ];
226 if( particleType1Attribute.isNull() ) {
231 coral::Attribute
const & particleType2Attribute = fillDataCursor.currentRow()[
std::string(
"PARTY2" ) ];
232 if( particleType2Attribute.isNull() ) {
237 coral::Attribute
const & crossingAngleAttribute = fillDataCursor.currentRow()[
std::string(
"CROSSINGANGLE" ) ];
238 if( crossingAngleAttribute.isNull() ) {
241 crossingAngle = crossingAngleAttribute.data<
float>();
243 coral::Attribute
const & betastarAttribute = fillDataCursor.currentRow()[
std::string(
"BETASTAR" ) ];
244 if( betastarAttribute.isNull() ) {
247 betastar = betastarAttribute.data<
float>();
249 coral::Attribute
const & intensityBeam1Attribute = fillDataCursor.currentRow()[
std::string(
"INTENSITYBEAM1" ) ];
250 if( intensityBeam1Attribute.isNull() ) {
253 intensityBeam1 = intensityBeam1Attribute.data<
float>();
255 coral::Attribute
const & intensityBeam2Attribute = fillDataCursor.currentRow()[
std::string(
"INTENSITYBEAM2" ) ];
256 if( intensityBeam2Attribute.isNull() ) {
259 intensityBeam2 = intensityBeam2Attribute.data<
float>();
261 coral::Attribute
const & energyAttribute = fillDataCursor.currentRow()[
std::string(
"ENERGY" ) ];
262 if( energyAttribute.isNull() ){
265 energy = energyAttribute.data<
float>();
268 if( fillDataCursor2.next())
270 coral::Attribute
const & delivLumiAttribute = fillDataCursor2.currentRow()[
std::string(
"DELIVEREDLUMI" ) ];
271 if( delivLumiAttribute.isNull() ){
275 delivLumi = delivLumiAttribute.data<
float>() / 1000.;
278 coral::Attribute
const & recLumiAttribute = fillDataCursor2.currentRow()[
std::string(
"RECORDEDLUMI" ) ];
279 if( recLumiAttribute.isNull() ){
283 recLumi = recLumiAttribute.data<
float>() / 1000.;
290 stableBeamStartTimeStamp = fillDataCursor.currentRow()[
std::string(
"BEGINTIME" ) ].data<coral::TimeStamp>();
292 coral::Attribute
const & beamDumpTimeAttribute = fillDataCursor.currentRow()[
std::string(
"ENDTIME" ) ];
293 if( beamDumpTimeAttribute.isNull() ) {
296 beamDumpTimeStamp = beamDumpTimeAttribute.data<coral::TimeStamp>();
299 coral::Attribute
const & injectionSchemeAttribute = fillDataCursor.currentRow()[
std::string(
"INJECTIONSCHEME" ) ];
300 if( injectionSchemeAttribute.isNull() ) {
303 injectionScheme = injectionSchemeAttribute.data<
std::string>();
323 if( beamDumpTime == 0 ) {
325 <<
" is still ongoing" 326 <<
"; from " <<
m_name <<
"::getNewObjects";
335 coral::AttributeList bunchConfBindVariables;
336 bunchConfBindVariables.extend<coral::TimeStamp>(
std::string(
"stableBeamStartTimeStamp" ) );
337 bunchConfBindVariables[
std::string(
"stableBeamStartTimeStamp" ) ].data<coral::TimeStamp>() = stableBeamStartTimeStamp;
338 conditionStr =
std::string(
"DIPTIME <= :stableBeamStartTimeStamp" );
340 coral::AttributeList bunchConfOutput;
341 bunchConfOutput.extend<coral::TimeStamp>(
std::string(
"DIPTIME" ) );
342 bunchConfOutput.extend<
unsigned short>(
std::string(
"BUCKET" ) );
344 std::unique_ptr<coral::IQuery> bunchConf1Query(beamCondSchema.newQuery());
345 bunchConf1Query->addToTableList(
std::string(
"LHC_CIRCBUNCHCONFIG_BEAM1" ),
std::string(
"BEAMCONF\", TABLE( BEAMCONF.VALUE ) \"BUCKETS" ) );
348 bunchConf1Query->setCondition( conditionStr, bunchConfBindVariables );
349 bunchConf1Query->addToOrderList(
std::string(
"DIPTIME DESC" ) );
351 bunchConf1Query->defineOutput( bunchConfOutput );
352 coral::ICursor& bunchConf1Cursor = bunchConf1Query->execute();
353 std::bitset<LHCInfo::bunchSlots+1> bunchConfiguration1( 0ULL );
355 while( bunchConf1Cursor.next() ) {
357 std::ostringstream b1s;
358 fillDataCursor.currentRow().toOutputStream( b1s );
361 if( bunchConf1Cursor.currentRow()[
std::string(
"BUCKET" ) ].data<
unsigned short>() != 0 ) {
362 unsigned short slot = ( bunchConf1Cursor.currentRow()[
std::string(
"BUCKET" ) ].data<
unsigned short>() - 1 ) / 10 + 1;
363 bunchConfiguration1[ slot ] =
true;
369 std::unique_ptr<coral::IQuery> bunchConf2Query(beamCondSchema.newQuery());
370 bunchConf2Query->addToTableList(
std::string(
"LHC_CIRCBUNCHCONFIG_BEAM2" ),
std::string(
"BEAMCONF\", TABLE( BEAMCONF.VALUE ) \"BUCKETS" ) );
373 bunchConf2Query->setCondition( conditionStr, bunchConfBindVariables );
374 bunchConf2Query->addToOrderList(
std::string(
"DIPTIME DESC" ) );
376 bunchConf2Query->defineOutput( bunchConfOutput );
377 coral::ICursor& bunchConf2Cursor = bunchConf2Query->execute();
378 std::bitset<LHCInfo::bunchSlots+1> bunchConfiguration2( 0ULL );
380 while( bunchConf2Cursor.next() ) {
382 std::ostringstream b2s;
383 fillDataCursor.currentRow().toOutputStream( b2s );
386 if( bunchConf2Cursor.currentRow()[
std::string(
"BUCKET" ) ].data<
unsigned short>() != 0 ) {
387 unsigned short slot = ( bunchConf2Cursor.currentRow()[
std::string(
"BUCKET" ) ].data<
unsigned short>() - 1 ) / 10 + 1;
388 bunchConfiguration2[ slot ] =
true;
393 std::unique_ptr<coral::IQuery> lumiDataQuery(beamCondSchema.newQuery());
394 lumiDataQuery->addToTableList(
std::string(
"CMS_LHC_LUMIPERBUNCH" ),
std::string(
"LUMIPERBUNCH\", TABLE( LUMIPERBUNCH.LUMI_BUNCHINST ) \"VALUE" ) );
397 coral::AttributeList lumiDataBindVariables;
398 lumiDataBindVariables.extend<coral::TimeStamp>(
std::string(
"stableBeamStartTimeStamp" ) );
399 lumiDataBindVariables[
std::string(
"stableBeamStartTimeStamp" ) ].data<coral::TimeStamp>() = stableBeamStartTimeStamp;
400 lumiDataBindVariables.extend<coral::TimeStamp>(
std::string(
"beamDumpTimeStamp" ) );
401 lumiDataBindVariables[
std::string(
"beamDumpTimeStamp" ) ].data<coral::TimeStamp>() = beamDumpTimeStamp;
402 conditionStr =
std::string(
"DIPTIME BETWEEN :stableBeamStartTimeStamp AND :beamDumpTimeStamp" );
403 lumiDataQuery->setCondition( conditionStr, lumiDataBindVariables );
404 lumiDataQuery->addToOrderList(
std::string(
"DIPTIME DESC" ) );
405 lumiDataQuery->limitReturnedRows(3564);
407 coral::AttributeList lumiDataOutput;
408 lumiDataOutput.extend<coral::TimeStamp>(
std::string(
"TIME" ) );
409 lumiDataOutput.extend<
float>(
std::string(
"VALUE" ) );
410 lumiDataQuery->defineOutput( lumiDataOutput );
412 coral::ICursor& lumiDataCursor = lumiDataQuery->execute();
413 std::vector<float> lumiPerBX;
415 while( lumiDataCursor.next() ) {
417 std::ostringstream lpBX;
418 lumiDataCursor.currentRow().toOutputStream( lpBX );
421 if( lumiDataCursor.currentRow()[
std::string(
"VALUE" ) ].data<
float>() != 0.00 ) {
422 lumiPerBX.push_back(lumiDataCursor.currentRow()[
std::string(
"VALUE" ) ].data<
float>());
431 coral::ISchema& CTPPS = session.
coralSession().schema(
"CMS_CTP_CTPPS_COND");
434 std::unique_ptr<coral::IQuery> CTPPSDataQuery( CTPPS.newQuery() );
436 CTPPSDataQuery->addToTableList(
std::string(
"CTPPS_LHC_MACHINE_PARAMS" ) );
438 CTPPSDataQuery->addToOutputList(
std::string(
"LHC_STATE" ) );
439 CTPPSDataQuery->addToOutputList(
std::string(
"LHC_COMMENT" ) );
440 CTPPSDataQuery->addToOutputList(
std::string(
"CTPPS_STATUS" ) );
441 CTPPSDataQuery->addToOutputList(
std::string(
"LUMI_SECTION" ) );
443 coral::AttributeList CTPPSDataBindVariables;
444 CTPPSDataBindVariables.extend<
int>(
std::string(
"currentFill" ) );
445 CTPPSDataBindVariables[
std::string(
"currentFill" ) ].data<
int>() = currentFill;
446 conditionStr =
std::string(
"FILL_NUMBER = :currentFill" );
447 CTPPSDataQuery->setCondition( conditionStr, CTPPSDataBindVariables );
449 CTPPSDataQuery->addToOrderList(
std::string(
"DIP_UPDATE_TIME DESC" ) );
451 coral::AttributeList CTPPSDataOutput;
455 CTPPSDataOutput.extend<
int>(
std::string(
"LUMI_SECTION" ) );
456 CTPPSDataQuery->limitReturnedRows( 1 );
457 CTPPSDataQuery->defineOutput( CTPPSDataOutput );
459 coral::ICursor& CTPPSDataCursor = CTPPSDataQuery->execute();
461 unsigned int lumiSection;
463 if( CTPPSDataCursor.next() ) {
465 std::ostringstream CTPPS;
466 CTPPSDataCursor.currentRow().toOutputStream( CTPPS );
469 coral::Attribute
const & lhcStateAttribute = CTPPSDataCursor.currentRow()[
std::string(
"LHC_STATE" ) ];
470 if( lhcStateAttribute.isNull() ) {
476 coral::Attribute
const & lhcCommentAttribute = CTPPSDataCursor.currentRow()[
std::string(
"LHC_COMMENT" ) ];
477 if( lhcCommentAttribute.isNull() ) {
480 lhcComment = lhcCommentAttribute.data<
std::string>();
483 coral::Attribute
const & ctppsStatusAttribute = CTPPSDataCursor.currentRow()[
std::string(
"CTPPS_STATUS" ) ];
484 if( ctppsStatusAttribute.isNull() ) {
487 ctppsStatus = ctppsStatusAttribute.data<
std::string>();
490 coral::Attribute
const & lumiSectionAttribute = CTPPSDataCursor.currentRow()[
std::string(
"LUMI_SECTION" ) ];
491 if( lumiSectionAttribute.isNull() ) {
494 lumiSection = lumiSectionAttribute.data<
int>();
507 std::unique_ptr<coral::IQuery> ECALDataQuery( ECAL.newQuery() );
509 ECALDataQuery->addToTableList(
std::string(
"BEAM_PHASE" ) );
511 ECALDataQuery->addToOutputList(
std::string(
"DIP_value" ) );
512 ECALDataQuery->addToOutputList(
std::string(
"element_nr" ) );
514 coral::AttributeList ECALDataBindVariables;
515 conditionStr =
std::string(
"DIP_value LIKE '%beamPhaseMean%' OR DIP_value LIKE '%cavPhaseMean%'" );
517 ECALDataQuery->setCondition( conditionStr, ECALDataBindVariables );
519 ECALDataQuery->addToOrderList(
std::string(
"CHANGE_DATE" ) );
520 ECALDataQuery->addToOrderList(
std::string(
"DIP_value" ) );
521 ECALDataQuery->addToOrderList(
std::string(
"element_nr" ) );
523 coral::AttributeList ECALDataOutput;
525 ECALDataOutput.extend<
float>(
std::string(
"element_nr" ) );
526 ECALDataQuery->limitReturnedRows( 14256 );
527 ECALDataQuery->defineOutput( ECALDataOutput );
529 coral::ICursor& ECALDataCursor = ECALDataQuery->execute();
530 std::vector<float> beam1VC, beam2VC, beam1RF, beam2RF;
532 std::map<std::string, int> vecMap;
538 while( ECALDataCursor.next() ) {
540 std::ostringstream
ECAL;
541 ECALDataCursor.currentRow().toOutputStream( ECAL );
544 coral::Attribute
const & dipValAttribute = ECALDataCursor.currentRow()[
std::string(
"DIP_value" ) ];
545 if( dipValAttribute.isNull() ) {
551 coral::Attribute
const & elementNrAttribute = ECALDataCursor.currentRow()[
std::string(
"element_nr" ) ];
552 if( elementNrAttribute.isNull() ) { }
554 switch( vecMap[dipVal] )
557 beam1VC.push_back(elementNrAttribute.data<
float>());
560 beam2VC.push_back(elementNrAttribute.data<
float>());
563 beam1RF.push_back(elementNrAttribute.data<
float>());
566 beam2RF.push_back(elementNrAttribute.data<
float>());
579 if( afterPreviousFillEndTime < stableBeamStartTime ) {
580 edm::LogInfo(
m_name ) <<
"Entering fake fill between fill number " << previousFillNumber
581 <<
" and current fill number " << currentFill
582 <<
", from " << afterPreviousFillEndTime
583 <<
" ( " << boost::posix_time::to_iso_extended_string(
cond::time::to_boost( afterPreviousFillEndTime ) )
584 <<
" ) to " << beforeStableBeamStartTime
585 <<
" ( " << boost::posix_time::to_iso_extended_string(
cond::time::to_boost( beforeStableBeamStartTime ) )
586 <<
" ); from " <<
m_name <<
"::getNewObjects";
590 edm::LogError(
m_name ) <<
"WRONG DATA! In the previous fill number " << previousFillNumber
591 <<
" beams were dumped at timestamp " << boost::posix_time::to_iso_extended_string(
cond::time::to_boost( previousFillEndTime ) )
592 <<
", which is not before the timestamp " << boost::posix_time::to_iso_extended_string(
cond::time::to_boost( stableBeamStartTime ) )
593 <<
" when current fill number " << currentFill
594 <<
" entered stable beams. EXITING. from " <<
m_name <<
"::getNewObjects";
599 lhcInfo->
setInfo( const_cast<unsigned short const &>( bunches1 )
600 , const_cast<unsigned short const &>( bunches2 )
601 , const_cast<unsigned short const &>( collidingBunches )
602 , const_cast<unsigned short const &>( targetBunches )
603 , const_cast<LHCInfo::FillTypeId const &>( fillType )
604 , const_cast<LHCInfo::ParticleTypeId const &>( particleType1 )
605 , const_cast<LHCInfo::ParticleTypeId const &>( particleType2 )
606 , const_cast<float const &>( crossingAngle )
607 , const_cast<float const &>( betastar )
608 , const_cast<float const &>( intensityBeam1 )
609 , const_cast<float const &>( intensityBeam2 )
610 , const_cast<float const &>( energy )
611 , const_cast<float const &>( delivLumi )
612 , const_cast<float const &>( recLumi )
613 , const_cast<cond::Time_t const &>( creationTime )
614 , const_cast<cond::Time_t const &>( stableBeamStartTime )
615 , const_cast<cond::Time_t const &>( beamDumpTime )
616 , const_cast<std::string const &>( injectionScheme )
617 ,
const_cast<std::vector<float>
const &
>( lumiPerBX )
618 , const_cast<std::string const &>( lhcState )
619 , const_cast<std::string const &>( lhcComment )
620 , const_cast<std::string const &>( ctppsStatus )
621 , const_cast<unsigned int const &>( lumiSection )
622 ,
const_cast<std::vector<float>
const &
>( beam1VC )
623 ,
const_cast<std::vector<float>
const &
>( beam2VC )
624 ,
const_cast<std::vector<float>
const &
>( beam1RF )
625 ,
const_cast<std::vector<float>
const &
>( beam2RF )
626 ,
const_cast<std::bitset<LHCInfo::bunchSlots+1>
const &
>( bunchConfiguration1 )
627 ,
const_cast<std::bitset<LHCInfo::bunchSlots+1>
const &
>( bunchConfiguration2 ) );
631 <<
" with validity " << stableBeamStartTime
632 <<
" ( " << boost::posix_time::to_iso_extended_string(
cond::time::to_boost( stableBeamStartTime ) )
633 <<
" ) has values:\n" << *lhcInfo
634 <<
"from " <<
m_name <<
"::getNewObjects";
636 ss <<
" fill = " << currentFill
637 <<
";\tinjection scheme: " << injectionScheme
639 << boost::posix_time::to_iso_extended_string( stableBeamStartTimeStamp.time() )
641 << boost::posix_time::to_iso_extended_string( beamDumpTimeStamp.time() )
644 previousFillNumber = currentFill;
645 previousFillEndTime = beamDumpTime;
edm::ErrorSummaryEntry Error
std::string m_userTextLog
edm::Ref< Container > Ref
std::string m_connectionString
unsigned short m_firstFill
void start(bool readOnly=true)
cond::Time_t pack(cond::UnpackedTime iValue)
void setInfo(unsigned short const &bunches1, unsigned short const &bunches2, unsigned short const &collidingBunches, unsigned short const &targetBunches, FillTypeId const &fillType, ParticleTypeId const &particleType1, ParticleTypeId const &particleType2, float const &angle, float const &beta, float const &intensity1, float const &intensity2, float const &energy, float const &delivLumi, float const &recLumi, cond::Time_t const &createTime, cond::Time_t const &beginTime, cond::Time_t const &endTime, std::string const &scheme, std::vector< float > const &lumiPerBX, std::string const &lhcState, std::string const &lhcComment, std::string const &ctppsStatus, unsigned int const &lumiSection, std::vector< float > const &beam1VC, std::vector< float > const &beam2VC, std::vector< float > const &beam1RF, std::vector< float > const &beam2RF, std::bitset< bunchSlots+1 > const &bunchConf1, std::bitset< bunchSlots+1 > const &bunchConf2)
Transaction & transaction()
OldContainer m_to_transfer
U second(std::pair< T, U > const &p)
cond::ValidityInterval lastInterval
unsigned long long Time_t
coral::ISchema & nominalSchema()
Session createSession(const std::string &connectionString, bool writeCapable=false)
void setMessageVerbosity(coral::MsgLevel level)
Time_t from_boost(boost::posix_time::ptime bt)
static size_t const availableBunchSlots
std::string lastPayloadToken
coral::ISessionProxy & coralSession()
~LHCInfoPopConSourceHandler() override
std::string id() const override
void setAuthenticationPath(const std::string &p)
void getNewObjects() override
boost::posix_time::ptime to_boost(Time_t iValue)
unsigned short m_lastFill
cond::TagInfo_t const & tagInfo() const
cond::UnpackedTime unpack(cond::Time_t iValue)
LHCInfoPopConSourceHandler(const edm::ParameterSet &pset)