Definition at line 25 of file TRGDummy2DB.cc.
lumi::TRGDummy2DB::TRGDummy2DB |
( |
const std::string & |
dest | ) |
|
lumi::TRGDummy2DB::~TRGDummy2DB |
( |
| ) |
|
|
override |
const std::string lumi::TRGDummy2DB::dataType |
( |
| ) |
const |
|
overridevirtual |
unsigned long long lumi::TRGDummy2DB::retrieveData |
( |
unsigned int |
runnum | ) |
|
|
overridevirtual |
Implements lumi::DataPipe.
Definition at line 37 of file TRGDummy2DB.cc.
References EnergyCorrector::c, estimatePileup2::cmslsnum, KineDebug3::count(), gather_cfg::cout, Exception, lumi::idDealer::generateNextIDForTable(), mps_fire::i, lumi::DataPipe::m_authpath, lumi::DataPipe::m_dest, lumi::N_TRGALGOBIT, lumi::N_TRGTECHBIT, summaryLumi::runnum, dataDML::schema, dataDML::session, lumi::DBConfig::setAuthentication(), AlCaHLTBitMon_QueryRunRegistry::string, dataDML::svc, and lumi::LumiNames::trgTableName().
41 coral::ConnectionService*
svc=
new coral::ConnectionService;
47 coral::ISessionProxy*
session=svc->connect(
m_dest,coral::Update);
48 coral::ITypeConverter& tpc=session->typeConverter();
49 tpc.setCppTypeForSqlType(
"unsigned int",
"NUMBER(7)");
50 tpc.setCppTypeForSqlType(
"unsigned int",
"NUMBER(10)");
51 tpc.setCppTypeForSqlType(
"unsigned long long",
"NUMBER(20)");
53 unsigned int totalcmsls=32;
54 session->transaction().start(
false);
55 coral::ISchema&
schema=session->nominalSchema();
58 coral::AttributeList trgData;
59 trgData.extend(
"TRG_ID",
typeid(
unsigned long long));
60 trgData.extend(
"RUNNUM",
typeid(
unsigned int));
61 trgData.extend(
"CMSLSNUM",
typeid(
unsigned int));
62 trgData.extend(
"BITNUM",
typeid(
unsigned int));
64 trgData.extend(
"TRGCOUNT",
typeid(
unsigned int));
65 trgData.extend(
"DEADTIME",
typeid(
unsigned long long));
66 trgData.extend(
"PRESCALE",
typeid(
unsigned int));
69 unsigned long long& trg_id=trgData[
"TRG_ID"].data<
unsigned long long>();
70 unsigned int& trgrunnum=trgData[
"RUNNUM"].data<
unsigned int>();
71 unsigned int&
cmslsnum=trgData[
"CMSLSNUM"].data<
unsigned int>();
72 unsigned int& bitnum=trgData[
"BITNUM"].data<
unsigned int>();
74 unsigned int&
count=trgData[
"TRGCOUNT"].data<
unsigned int>();
75 unsigned long long& deadtime=trgData[
"DEADTIME"].data<
unsigned long long>();
76 unsigned int&
prescale=trgData[
"PRESCALE"].data<
unsigned int>();
78 for(
unsigned int i=1;
i<=totalcmsls;++
i){
95 trgInserter->processNextIteration();
101 std::cout<<
"database problem "<<er.what()<<std::endl;
102 session->transaction().rollback();
108 session->transaction().commit();
static const std::string trgTableName()
const unsigned int N_TRGTECHBIT
const unsigned int N_TRGALGOBIT
const std::string lumi::TRGDummy2DB::sourceType |
( |
| ) |
const |
|
overridevirtual |