8 #ifndef ECALCONDDBINTERFACE_HH 9 #define ECALCONDDBINTERFACE_HH 165 int fromId1,
int toId1,
306 template<
class DATT,
class IOVT>
314 std::cout<<
"IOV was not set we retrieve it from DB"<<std::endl;
318 std::cout<<
"IOV was not written we write it"<<std::endl;
323 dataIface.setConnection(
env,
conn);
324 dataIface.prepareWrite();
327 const DATT* dataitem;
328 typedef typename std::map< EcalLogicID, DATT >::const_iterator CI;
329 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
330 channel = &(
p->first);
331 dataitem = &(
p->second);
332 dataIface.writeDB( channel, dataitem, iov);
335 dataIface.terminateWriteStatement();
336 }
catch (std::runtime_error &
e) {
341 throw(std::runtime_error(
"EcalCondDBInterface::insertDataSet: Unknown exception caught"));
346 template<
class DATT,
class IOVT>
353 std::cout<<
"IOV was not set we retrieve it from DB"<<std::endl;
357 std::cout<<
"IOV was not written we write it"<<std::endl;
364 dataIface.setConnection(
env,
conn);
365 dataIface.prepareWrite();
367 dataIface.writeArrayDB(
data, iov);
370 dataIface.terminateWriteStatement();
372 }
catch (std::runtime_error &
e) {
377 throw(std::runtime_error(
"EcalCondDBInterface::insertDataSet: Unknown exception caught"));
381 template<
class DATT,
class IOVT>
382 void insertDataSetVector(
const std::vector<EcalLogicID>& ecid,
const std::vector<IOVT>& run_iov,
const std::vector<DATT>&
data )
386 int nruns= run_iov.size();
388 if(run_iov.size()!=ecid.size() &&ecid.size()!=
data.size()){
389 throw(std::runtime_error(
"EcalCondDBInterface::insertDataSetVector: vector sizes are different.."));
396 dataIface.setConnection(
env,
conn);
397 dataIface.prepareWrite();
399 for (
int i=0;
i<nruns;
i++){
401 run_iov[
i].setConnection(
env,
conn);
402 run_iov[
i].writeDB();
404 dataIface.writeDB( &ecid[
i], &
data[i], &run_iov[i]);
408 }
catch (std::runtime_error &
e) {
413 throw(std::runtime_error(
"EcalCondDBInterface::insertDataSet: Unknown exception caught"));
423 template<
class ICONF >
428 iconf->setConnection(
env,
conn);
429 iconf->prepareWrite();
432 std::cout<<
"iconf inserted with ID="<<iconf->getId()<<std::endl;
434 iconf->terminateWriteStatement();
435 }
catch (std::runtime_error &
e) {
440 throw(std::runtime_error(
"EcalCondDBInterface::insertDataSet: Unknown exception caught"));
447 template<
class ICONF>
453 iconf->setConnection(
env,
conn);
454 iconf->createReadStatement();
455 iconf->fetchData(iconf);
456 iconf->terminateReadStatement();
463 template<
class ICONF>
469 iconf->setConnection(
env,
conn);
470 iconf->createReadStatement();
471 iconf->fetchLastData(iconf);
472 iconf->terminateReadStatement();
481 template<
class DATT,
class ICONF>
486 iconf->setConnection(
env,
conn);
488 if(iconf->getId()==0){
489 std::cout<<
"EcalCondDBInterface>> config_id was not set we retrieve it from DB"<<std::endl;
492 if(iconf->getId()==0){
493 std::cout<<
"EcalCondDBInterface>> configuration info was not written we write it"<<std::endl;
498 dataIface.setConnection(
env,
conn);
499 dataIface.prepareWrite();
501 const DATT* dataitem;
503 for (
int p = 0;
p !=
data->size(); ++
p) {
505 dataIface.writeDB( dataitem, iconf);
508 dataIface.terminateWriteStatement();
509 }
catch (std::runtime_error &
e) {
514 throw(std::runtime_error(
"EcalCondDBInterface::insertConfigDataSet: Unknown exception caught"));
520 template<
class DATT,
class ICONF>
525 iconf->setConnection(
env,
conn);
527 if(iconf->getId()==0){
528 std::cout<<
"EcalCondDBInterface>> config_id was not set we retrieve it from DB"<<std::endl;
531 if(iconf->getId()==0){
532 std::cout<<
"EcalCondDBInterface>> configuration info was not written we write it"<<std::endl;
537 dataIface.setConnection(
env,
conn);
538 dataIface.prepareWrite();
540 dataIface.writeArrayDB(
data, iconf);
543 dataIface.terminateWriteStatement();
545 }
catch (std::runtime_error &
e) {
550 throw(std::runtime_error(
"EcalCondDBInterface::insertConfigDataArraySet: Unknown exception caught"));
556 template<
class DATT,
class ICONF>
562 datiface.setConnection(
env,
conn);
563 datiface.createReadStatement();
564 datiface.setPrefetchRowCount(1024);
565 datiface.fetchData( fillMap, iconf );
566 datiface.terminateReadStatement();
579 template<
class DATT,
class IOVT>
586 datiface.setConnection(
env,
conn);
587 datiface.createReadStatement();
588 datiface.setPrefetchRowCount(1024);
589 datiface.fetchData( fillMap, iov );
590 datiface.terminateReadStatement();
607 datiface.setConnection(
env,
conn);
608 datiface.createReadStatement();
609 datiface.setPrefetchRowCount(1024);
610 datiface.fetchHistoricalData( fillMap, t );
611 datiface.terminateReadStatement();
623 template<
class DATT,
class IOVT>
630 datiface.setConnection(
env,
conn);
631 datiface.createReadStatement();
632 datiface.setPrefetchRowCount(1024);
633 datiface.fetchData( fillMap, iov , mapping_name);
634 datiface.terminateReadStatement();
645 template<
class DATT,
class IOVT>
654 fillIOV->setByRecentData(datiface.getTable(),
tag,
run);
655 datiface.setConnection(
env,
conn);
656 datiface.createReadStatement();
657 datiface.setPrefetchRowCount(1024);
658 datiface.fetchData( fillMap, fillIOV );
659 datiface.terminateReadStatement();
669 template<
class DATT,
class IOVT>
678 fillIOV->setByRecentData(datiface.getTable(), location,
run);
679 datiface.setConnection(
env,
conn);
680 datiface.createReadStatement();
681 datiface.setPrefetchRowCount(1024);
682 datiface.fetchData( fillMap, fillIOV );
683 datiface.terminateReadStatement();
void insertLmfSeq(LMFSeqDat *iov) noexcept(false)
std::map< int, int > _detId2LogicId
std::map< int, int > _logicId2DetId
RunList fetchGlobalRunListByLocation(const RunTag &tag, int min_run, int max_run, const LocationDef &locDef) noexcept(false)
MonRunIOV fetchMonRunIOV(RunTag *runtag, MonRunTag *montag, run_t run, subrun_t monrun) noexcept(false)
void insertMonRunIOV(MonRunIOV *iov) noexcept(false)
void fetchLastConfigSet(ICONF *iconf) noexcept(false)
EcalLogicID getEcalLogicID(std::string name, int id1=EcalLogicID::NULLID, int id2=EcalLogicID::NULLID, int id3=EcalLogicID::NULLID, std::string mapsTo="") noexcept(false)
int getLogicIdFromDetId(int det_id)
void updateRunConfig(ODRunConfigInfo *od) noexcept(false)
int fetchID() noexcept(false)
oracle::occi::Environment * env
void insertDCUIOV(DCUIOV *iov) noexcept(false)
std::list< ODDelaysDat > fetchFEDelaysForRun(RunIOV *iov) noexcept(false)
DCUIOV fetchDCUIOV(DCUTag *tag, const Tm &evenTm) noexcept(false)
RunList fetchNonEmptyRunList(const RunTag &tag, int min_run, int max_run) noexcept(false)
MonRunList fetchMonRunList(const RunTag &tag, const MonRunTag &monruntag) noexcept(false)
void fetchConfigSet(ICONF *iconf) noexcept(false)
void insertLmfDat(LMFDat *dat) noexcept(false)
RunList fetchRunListLastNRuns(const RunTag &tag, int max_run, int n_runs) noexcept(false)
EcalCondDBInterface(std::string host, std::string sid, std::string user, std::string pass, int port=1521)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
std::vector< EcalLogicID > getEcalLogicIDMappedTo(int logic_id, std::string maps_to)
RunList fetchNonEmptyGlobalRunList(const RunTag &tag, int min_run, int max_run) noexcept(false)
std::vector< EcalLogicID > getEcalLogicIDForLMPN(int lmr_logic_id)
std::vector< EcalLogicID > getEcalLogicIDSet(std::string name, int fromId1=EcalLogicID::NULLID, int toId1=EcalLogicID::NULLID, int fromId2=EcalLogicID::NULLID, int toId2=EcalLogicID::NULLID, int fromId3=EcalLogicID::NULLID, int toId3=EcalLogicID::NULLID, std::string mapsTo="") noexcept(false)
DateHandler * getDateHandler()
void updateRunIOV(RunIOV *iov) noexcept(false)
oracle::occi::Connection * conn
RunIOV fetchRunIOV(RunTag *tag, run_t run) noexcept(false)
void updateRunIOVStartTime(RunIOV *iov) noexcept(false)
void fetchDCSDataSet(std::list< std::pair< Tm, std::map< EcalLogicID, DATT > > > *fillMap, const Tm &t) noexcept(false)
void insertDataSetVector(const std::vector< EcalLogicID > &ecid, const std::vector< IOVT > &run_iov, const std::vector< DATT > &data) noexcept(false)
MonRunList fetchMonRunListLastNRuns(const RunTag &tag, const MonRunTag &monruntag, int max_run, int n_runs) noexcept(false)
int writeDB() noexcept(false)
EcalCondDBInterface(std::string sid, std::string user, std::string pass)
DCSPTMTempList fetchDCSPTMTempList(const EcalLogicID &ecid) noexcept(false)
void insertConfigDataArraySet(const std::vector< DATT > &data, ICONF *iconf) noexcept(false)
std::vector< EcalLogicID > getEcalLogicIDSetOrdered(std::string name, int fromId1, int toId1, int fromId2=EcalLogicID::NULLID, int toId2=EcalLogicID::NULLID, int fromId3=EcalLogicID::NULLID, int toId3=EcalLogicID::NULLID, std::string mapsTo="", int orderedBy=EcalLogicID::NULLID) noexcept(false)
std::map< int, int > getEcalLogicID2LmrMap()
RunIOV fetchLMFLastRun() const
void insertConfigSet(ICONF *iconf) noexcept(false)
void fetchValidDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *fillIOV, std::string location, run_t run=(unsigned int)-1) noexcept(false)
void insertRunIOV(RunIOV *iov) noexcept(false)
void insertLmfRunIOV(LMFRunIOV *iov) noexcept(false)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
CaliIOV fetchCaliIOV(CaliTag *tag, const Tm &evenTm) noexcept(false)
void insertConfigDataSet(const std::vector< DATT > data, ICONF *iconf) noexcept(false)
LMFRunIOV fetchLMFRunIOV(RunTag *runtag, LMFRunTag *lmftag, run_t run, subrun_t lmfrun) noexcept(false)
RunList fetchRunListByLocation(const RunTag &tag, int min_run, int max_run, const LocationDef &locDef) noexcept(false)
void updateRunIOVEndTime(RunIOV *iov) noexcept(false)
virtual ~EcalCondDBInterface() noexcept(false)
RunList fetchRunList(const RunTag &tag) noexcept(false)
void insertLmfLmrSubIOV(LMFLmrSubIOV *iov) noexcept(false)
int getDetIdFromLogicId(int logic_id)
char data[epos_bytes_allocation]
void insertDataSet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
std::map< int, int > getLogicId2DetIdMap()
void insertLmfIOV(LMFIOV *iov) noexcept(false)
void fetchDataSetWithMap(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov, std::string mapping_name) noexcept(false)
void fillLogicId2DetIdMaps()
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
void fetchConfigDataSet(std::vector< DATT > *fillMap, ICONF *iconf) noexcept(false)
std::vector< EcalLogicID > getEcalLogicIDForLMR(int lmr_logic_id)
std::map< int, int > getDetId2LogicIdMap()
void fetchValidDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *fillIOV, RunTag *tag, run_t run=(unsigned int)-1) noexcept(false)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run