8 #ifndef ECALCONDDBINTERFACE_HH
9 #define ECALCONDDBINTERFACE_HH
92 throw(std::runtime_error)
123 throw(std::runtime_error);
145 throw(std::runtime_error);
160 std::
string mapsTo = "" )
161 throw(std::runtime_error);
165 int fromId1,
int toId1,
168 std::
string mapsTo = "",
int orderedBy=
EcalLogicID::NULLID )
throw(std::runtime_error);
175 throw(std::runtime_error);
178 throw(std::runtime_error);
180 throw(std::runtime_error);
182 throw(std::runtime_error);
187 throw(std::runtime_error);
189 throw(std::runtime_error);
191 throw(std::runtime_error);
193 throw(std::runtime_error);
195 throw(std::runtime_error);
197 throw(std::runtime_error);
204 throw(std::runtime_error);
210 throw(std::runtime_error);
220 throw(std::runtime_error);
223 throw(std::runtime_error);
231 throw(std::runtime_error);
238 throw(std::runtime_error);
245 throw(std::runtime_error);
252 throw(std::runtime_error);
260 throw(std::runtime_error);
269 throw(std::runtime_error);
308 throw(std::runtime_error)
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();
326 const EcalLogicID* channel;
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>
348 throw(std::runtime_error)
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 )
383 throw(std::runtime_error)
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 >
425 throw(std::runtime_error)
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>
449 throw(std::runtime_error)
453 iconf->setConnection(
env,
conn);
454 iconf->createReadStatement();
455 iconf->fetchData(iconf);
456 iconf->terminateReadStatement();
463 template<
class ICONF>
465 throw(std::runtime_error)
469 iconf->setConnection(
env,
conn);
470 iconf->createReadStatement();
471 iconf->fetchLastData(iconf);
472 iconf->terminateReadStatement();
481 template<
class DATT,
class ICONF>
483 throw(std::runtime_error)
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>
522 throw(std::runtime_error)
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>
558 throw(std::runtime_error)
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>
581 throw(std::runtime_error)
586 datiface.setConnection(
env,
conn);
587 datiface.createReadStatement();
588 datiface.setPrefetchRowCount(1024);
589 datiface.fetchData( fillMap,
iov );
590 datiface.terminateReadStatement();
602 throw(std::runtime_error)
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>
625 throw(std::runtime_error)
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>
649 throw(std::runtime_error)
653 fillIOV->setConnection(
env,
conn);
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>
673 throw(std::runtime_error)
677 fillIOV->setConnection(
env,
conn);
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();
DCUIOV fetchDCUIOV(DCUTag *tag, const Tm &evenTm)
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="")
std::map< int, int > _detId2LogicId
RunList fetchRunList(const RunTag &tag)
std::map< int, int > _logicId2DetId
tuple start
Check for commandline option errors.
RunList fetchRunListLastNRuns(const RunTag &tag, int max_run, int n_runs)
void insertRunIOV(RunIOV *iov)
std::list< ODDelaysDat > fetchFEDelaysForRun(RunIOV *iov)
int getLogicIdFromDetId(int det_id)
void insertConfigSet(ICONF *iconf)
void fetchValidDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *fillIOV, RunTag *tag, run_t run=(unsigned int)-1)
void insertLmfDat(LMFDat *dat)
oracle::occi::Environment * env
RunIOV fetchRunIOV(RunTag *tag, run_t run)
void updateRunIOVStartTime(RunIOV *iov)
void insertLmfSeq(LMFSeqDat *iov)
EcalCondDBInterface(std::string host, std::string sid, std::string user, std::string pass, int port=1521)
std::vector< EcalLogicID > getEcalLogicIDMappedTo(int logic_id, std::string maps_to)
MonRunList fetchMonRunList(const RunTag &tag, const MonRunTag &monruntag)
LMFRunIOV fetchLMFRunIOV(RunTag *runtag, LMFRunTag *lmftag, run_t run, subrun_t lmfrun)
std::vector< EcalLogicID > getEcalLogicIDForLMPN(int lmr_logic_id)
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)
void fetchLastConfigSet(ICONF *iconf)
void fetchConfigDataSet(std::vector< DATT > *fillMap, ICONF *iconf)
DateHandler * getDateHandler()
oracle::occi::Connection * conn
void insertDataSetVector(const std::vector< EcalLogicID > &ecid, const std::vector< IOVT > &run_iov, const std::vector< DATT > &data)
MonRunList fetchMonRunListLastNRuns(const RunTag &tag, const MonRunTag &monruntag, int max_run, int n_runs)
EcalCondDBInterface(std::string sid, std::string user, std::string pass)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov)
std::map< int, int > getEcalLogicID2LmrMap()
RunList fetchGlobalRunListByLocation(const RunTag &tag, int min_run, int max_run, const LocationDef &locDef)
EcalLogicID getEcalLogicID(std::string name, int id1=EcalLogicID::NULLID, int id2=EcalLogicID::NULLID, int id3=EcalLogicID::NULLID, std::string mapsTo="")
RunIOV fetchLMFLastRun() const
void insertDCUIOV(DCUIOV *iov)
void insertConfigDataSet(const std::vector< DATT > data, ICONF *iconf)
void insertLmfRunIOV(LMFRunIOV *iov)
RunList fetchNonEmptyGlobalRunList(const RunTag &tag, int min_run, int max_run)
void fetchDCSDataSet(std::list< std::pair< Tm, std::map< EcalLogicID, DATT > > > *fillMap, const Tm &t)
void insertLmfIOV(LMFIOV *iov)
void updateRunConfig(ODRunConfigInfo *od)
virtual ~EcalCondDBInterface()
DCSPTMTempList fetchDCSPTMTempList(const EcalLogicID &ecid)
void fetchConfigSet(ICONF *iconf)
MonRunIOV fetchMonRunIOV(RunTag *runtag, MonRunTag *montag, run_t run, subrun_t monrun)
int getDetIdFromLogicId(int logic_id)
void insertMonRunIOV(MonRunIOV *iov)
std::map< int, int > getLogicId2DetIdMap()
CaliIOV fetchCaliIOV(CaliTag *tag, const Tm &evenTm)
void insertConfigDataArraySet(const std::vector< DATT > &data, ICONF *iconf)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
void insertDataSet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
void fillLogicId2DetIdMaps()
void updateRunIOV(RunIOV *iov)
void updateRunIOVEndTime(RunIOV *iov)
std::vector< EcalLogicID > getEcalLogicIDForLMR(int lmr_logic_id)
void fetchDataSetWithMap(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov, std::string mapping_name)
std::map< int, int > getDetId2LogicIdMap()
RunList fetchNonEmptyRunList(const RunTag &tag, int min_run, int max_run)
void insertLmfLmrSubIOV(LMFLmrSubIOV *iov)
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
void fetchValidDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *fillIOV, std::string location, run_t run=(unsigned int)-1)
RunList fetchRunListByLocation(const RunTag &tag, int min_run, int max_run, const LocationDef &locDef)