CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
L1TriggerScalerRead Class Reference

#include <L1TriggerScalerRead.h>

Inheritance diagram for L1TriggerScalerRead:
TestBase

Public Member Functions

void dropTable (const std::string &table)
 
 L1TriggerScalerRead (const std::string &connectionString, const std::string &user, const std::string &pass)
 
std::vector
< L1TriggerScaler::Lumi
readData (const int r_number)
 
void run ()
 
virtual ~L1TriggerScalerRead ()
 
- Public Member Functions inherited from TestBase
void setVerbosityLevel (coral::MsgLevel level)
 
void setVerbosityLevel (coral::MsgLevel level)
 
 TestBase ()
 
 TestBase ()
 
virtual ~TestBase ()
 
virtual ~TestBase ()
 

Private Attributes

std::string m_connectionString
 
std::string m_pass
 
std::string m_tableToDrop
 
std::string m_user
 

Additional Inherited Members

- Protected Member Functions inherited from TestBase
coral::ISession * connect (const std::string &connectionString, const std::string &user, const std::string &password)
 
coral::ISession * connect (const std::string &connectionString, const std::string &user, const std::string &password)
 

Detailed Description

Definition at line 11 of file L1TriggerScalerRead.h.

Constructor & Destructor Documentation

L1TriggerScalerRead::L1TriggerScalerRead ( const std::string &  connectionString,
const std::string &  user,
const std::string &  pass 
)

Definition at line 34 of file L1TriggerScalerRead.cc.

References m_tableToDrop.

38  :
39  TestBase(),
40 
41  m_connectionString( connectionString ),
42  m_user( user ),
43  m_pass( pass )
44 {
45  m_tableToDrop="";
46  // m_tableToRead="";
47  //m_columnToRead="";
48 
49 }
std::string m_connectionString
TestBase()
Definition: TestBase.cc:10
L1TriggerScalerRead::~L1TriggerScalerRead ( )
virtual

Definition at line 52 of file L1TriggerScalerRead.cc.

53 {}

Member Function Documentation

void L1TriggerScalerRead::dropTable ( const std::string &  table)

Definition at line 63 of file L1TriggerScalerRead.cc.

References TestBase::connect(), gather_cfg::cout, m_connectionString, m_pass, m_tableToDrop, m_user, python.IdGenerator::schema, python.CommonUtils::session, and asciidump::table.

63  {
65  coral::ISession* session = this->connect( m_connectionString,m_user, m_pass );
66  session->transaction().start( );
67  std::cout << "connected succesfully to omds" <<std::endl;
68  coral::ISchema& schema = session->nominalSchema();
69  schema.dropIfExistsTable( m_tableToDrop );
70 
71 }
list table
Definition: asciidump.py:386
std::string m_connectionString
tuple cout
Definition: gather_cfg.py:121
coral::ISession * connect(const std::string &connectionString, const std::string &user, const std::string &password)
Definition: TestBase.cc:24
std::vector< L1TriggerScaler::Lumi > L1TriggerScalerRead::readData ( const int  r_number)

Definition at line 77 of file L1TriggerScalerRead.cc.

References TestBase::connect(), gather_cfg::cout, cond::rpcobgas::day, dt, i, m_connectionString, L1TriggerScaler::Lumi::m_date, L1TriggerScaler::Lumi::m_GTAlgoCounts, L1TriggerScaler::Lumi::m_GTAlgoPrescaling, L1TriggerScaler::Lumi::m_GTAlgoRates, L1TriggerScaler::Lumi::m_GTPartition0DeadTime, L1TriggerScaler::Lumi::m_GTPartition0DeadTimeRatio, L1TriggerScaler::Lumi::m_GTPartition0TriggerCounts, L1TriggerScaler::Lumi::m_GTPartition0TriggerRates, L1TriggerScaler::Lumi::m_GTTechCounts, L1TriggerScaler::Lumi::m_GTTechPrescaling, L1TriggerScaler::Lumi::m_GTTechRates, L1TriggerScaler::Lumi::m_lumi_id, L1TriggerScaler::Lumi::m_lumisegment, m_pass, L1TriggerScaler::Lumi::m_rn, L1TriggerScaler::Lumi::m_runnumber, L1TriggerScaler::Lumi::m_start_time, L1TriggerScaler::Lumi::m_string_format, m_user, python.IdGenerator::schema, edm::second(), python.CommonUtils::session, AlCaHLTBitMon_QueryRunRegistry::string, findQualityFiles::v, and create_public_lumi_plots::year.

Referenced by L1TriggerScalerHandler::getNewObjects().

78 {
79  // m_tableToRead = table; // to be cms_runinfo.runsession_parameter
80  // m_columnToRead= column; // to be string_value;
81 
82 /* query to execute
83 select * from runsession_parameter where string_value like '%[%' and name like 'CMS.TR%' order by time;
84 
85 % gets you the parameters of l1 trg
86 select * from runsession_parameter where string_value like '%[%' and name like 'CMS.TR%' and runnumber=51384 order by time;
87 
88 %what is the type?
89 select * from runsession_parameter_meta where name like 'CMS.TRG:GTLumiSegInfo';
90 
91 %what is the table for that type?
92 select * from runsession_type_meta where type like 'rcms.fm.fw.parameter.type.VectorT';
93 
94 % give me the data... value_id is the parent_id for the element
95 select * from runsession_vector where runsession_parameter_id = 3392114;
96 
97 % where is the table for that element type?
98 select * from runsession_type_meta where type like 'rcms.fm.fw.parameter.type.IntegerT';
99 
100 % what is the value of the element (of the vector)
101 select * from runsession_integer where parent_id = 3392118;
102 
103 */
104 
105 
106 
107  /* let's begin with a query to obtain the number of lumi section and the corresponding string value:
108 select string_value from runsession_parameter where string_value like '%[51384]' and name='CMS.TRG:GTLumiSegInfo' and runnumber=51384 order by time;
109 
110 */
111 
112 
113  std::cout<< "entering readData" << std::endl;
114  coral::ISession* session = this->connect( m_connectionString,
115  m_user, m_pass );
116  session->transaction().start( );
117  std::cout<< "starting session " << std::endl;
118  coral::ISchema& schema = session->nominalSchema();
119  std::cout<< " accessing schema " << std::endl;
120 
121 // queryI to access the string_format_value
122 coral::IQuery* query0 = schema.tableHandle("RUNSESSION_PARAMETER").newQuery();
123 std::cout<< "table handling " << std::endl;
124  query0->addToOutputList("RUNSESSION_PARAMETER.STRING_VALUE" , "STRING_VALUE");
125 
126  std::string condition0 = "RUNSESSION_PARAMETER.RUNNUMBER=:n_run AND RUNSESSION_PARAMETER.NAME='CMS.TRG:GTLumiSegInfo_format'";
127  coral::AttributeList conditionData0;
128  conditionData0.extend<int>( "n_run" );
129  query0->setCondition( condition0, conditionData0 );
130  conditionData0[0].data<int>() = r_number;
131  coral::ICursor& cursor0 = query0->execute();
132 
133  std::vector<L1TriggerScaler::Lumi> l1triggerscaler_array;
134 
135  std::string string_format;
136  while ( cursor0.next()!=0 )
137  {
138 
139  const coral::AttributeList& row = cursor0.currentRow();
140  std::cout<< " entering the query == " << std::endl;
141  string_format= row["STRING_VALUE"].data<std::string>();
142 
143  std::cout<< " string value extracted == " << string_format << std::endl;
144  }
145 
146 
147 
148 
149 
150 
151 
152  // queryI to access the id_value
153  coral::IQuery* queryI = schema.tableHandle("RUNSESSION_PARAMETER").newQuery();
154 
155  // queryI->addToTableList( m_tableToRead );
156  std::cout<< "table handling " << std::endl;
157  // implemating the query here.......
158  // queryI->addToOutputList("RUNSESSION_PARAMETER.STRING_VALUE" , "STRING_VALUE");
159  queryI->addToOutputList("RUNSESSION_PARAMETER.ID" , "ID");
160  // to add the starting time of the lumisection
161  queryI->addToOutputList("RUNSESSION_PARAMETER.TIME" , "TIME");
162 
163  // condition
164  std::string condition = "RUNSESSION_PARAMETER.RUNNUMBER=:n_run AND RUNSESSION_PARAMETER.NAME LIKE 'CMS.TRG:GTLumiSegInfo%' ORDER BY TIME "; //AND RUNSESSION_PARAMETER.STRING_VALUE LIKE '%[%' ORDER BY TIME";
165  // controllare...................
166  coral::AttributeList conditionData;
167  conditionData.extend<int>( "n_run" );
168  queryI->setCondition( condition, conditionData );
169  conditionData[0].data<int>() = r_number;
170  coral::ICursor& cursorI = queryI->execute();
171 
172  std::vector<std::pair<int, long long> > v_vid; // parent_id for value_id corresponding to each memeber of the lumi object, paired with his corresponding index to diceded the type
173 
174  if (cursorI.next()==0)
175  {
176 
177  std::cout<< " run " <<r_number <<" not full " << std::endl;
178  }
179  while ( cursorI.next()!=0 )
180  {
181  // 1 cicle for each lumi
182  L1TriggerScaler::Lumi Itemp;
183  // if cursor is null setting null values
184  Itemp.m_runnumber = r_number;
185  // initializing the date string ...
186  Itemp.m_date="0";
187  Itemp.m_string_format= string_format;
188  const coral::AttributeList& row = cursorI.currentRow();
189  std::cout<< " entering the query == " << std::endl;
190  // Itemp.m_string_value= row["STRING_VALUE"].data<std::string>();
191 
192  // std::cout<< " string value extracted == " << Itemp.m_string_value << std::endl;
193  Itemp.m_lumi_id=row["ID"].data<long long>();
194  std::cout<< " id value extracted == " << Itemp.m_lumi_id << std::endl; // now we have the id and we can search and fill the lumi odject
195  // retrieving all the value_id one for each member of the lumi scaler
196 
197  coral::TimeStamp st=row["TIME"].data<coral::TimeStamp>();
198  int year= st.year();
199  int month= st.month();
200  int day= st.day();
201  int hour= st.hour();
202 
203  int minute= st.minute();
204  int second = st.second();
205  long nanosecond = st.nanosecond();
206  std::cout<< " start time time extracted == " << "-->year " << year
207  << "-- month " << month
208  << "-- day " << day
209  << "-- hour " << hour
210  << "-- minute " << minute
211  << "-- second " << second <<std::endl;
212  boost::gregorian::date dt(year,month,day);
213  boost::posix_time::time_duration td(hour,minute,second,nanosecond/1000);
214  boost::posix_time::ptime pt( dt, td);
215  Itemp.m_start_time = boost::posix_time::to_iso_extended_string(pt);
216  std::cout<< " time extracted == " << Itemp.m_start_time << std::endl;
217 
218 
219 
220  coral::IQuery* queryII = schema.newQuery();
221  queryII->addToOutputList("RUNSESSION_VECTOR.VALUE_ID" , "VALUE_ID");
222  queryII->addToOutputList("RUNSESSION_VECTOR.VALUE_INDEX" , "VALUE_INDEX");
223 
224  queryII->addToTableList("RUNSESSION_VECTOR");
225  std::string condition2 = "RUNSESSION_VECTOR.PARENT_ID=:n_vid";
226  coral::AttributeList conditionData2;
227  conditionData2.extend<long>( "n_vid" );
228  queryII->setCondition( condition2, conditionData2 );
229  conditionData2[0].data<long>() =Itemp.m_lumi_id +1 ;
230  coral::ICursor& cursorII = queryII->execute();
231  while ( cursorII.next()!=0 )
232  {
233  const coral::AttributeList& row = cursorII.currentRow();
234  std::cout<< " entering the queryII == " << std::endl;
235  long long vid_val = row["VALUE_ID"].data<long long>();
236  int vid_id = (int)row["VALUE_INDEX"].data<long long>();
237  v_vid.push_back(std::make_pair(vid_id, vid_val));
238  std::cout<< " value_id index extracted == " << v_vid.back().first << std::endl;
239  std::cout<< " value_id value extracted == " << v_vid.back().second << std::endl;
240  // depending from the index, fill the object....
241 
242  coral::AttributeList conditionData3;
243  conditionData3.extend<int>( "n_vid_val" );
244  conditionData3[0].data<int>() =vid_val ;
245  switch (vid_id){
246  case 0: {
247  std::cout<<" caso 0" << std::endl;
248  coral::IQuery* queryIII = schema.newQuery();
249  queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE" , "VALUE");
250  queryIII->addToTableList("RUNSESSION_INTEGER");
251  std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
252  queryIII->setCondition( condition3, conditionData3 );
253  coral::ICursor& cursorIII = queryIII->execute();
254 
255 
256  while ( cursorIII.next()!=0 ) {
257  const coral::AttributeList& row = cursorIII.currentRow();
258  // std::cout<< " entering the queryIII " << std::endl;
259  Itemp.m_rn = row["VALUE"].data<long long>();
260  std::cout<< " run extracted == " << Itemp.m_rn << std::endl;
261  }
262  delete queryIII;
263  }
264  break;
265  case 1:{
266  std::cout<<" caso 1" << std::endl;
267  coral::IQuery* queryIII = schema.newQuery();
268  queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE" , "VALUE");
269  queryIII->addToTableList("RUNSESSION_INTEGER");
270  std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
271  queryIII->setCondition( condition3, conditionData3 );
272  coral::ICursor& cursorIII = queryIII->execute();
273  while ( cursorIII.next()!=0 ) {
274  const coral::AttributeList& row = cursorIII.currentRow();
275  std::cout<< " entering the queryIII " << std::endl;
276  Itemp.m_lumisegment = row["VALUE"].data<long long>();
277  std::cout<< " lumisegment extracted == " << Itemp.m_lumisegment << std::endl;
278  }
279  delete queryIII;
280  }
281  break;
282  case 2:{
283  std::cout<<" caso 2" << std::endl;
284  /*
285  coral::IQuery* queryIII = schema.newQuery();
286  queryIII->addToOutputList("RUNSESSION_STRING.VALUE" , "VALUE");
287  queryIII->addToTableList("RUNSESSION_STRING");
288  std::string condition3 = "RUNSESSION_STRING.PARENT_ID=:n_vid_val";
289  queryIII->setCondition( condition3, conditionData3 );
290  coral::ICursor& cursorIII = queryIII->execute();
291  while ( cursorIII.next()!=0 ) {
292  const coral::AttributeList& row = cursorIII.currentRow();
293  std::cout<< " entering the queryIII " << std::endl;
294  Itemp.m_version = row["VALUE"].data<std::string>();
295  std::cout<< "version extracted == " << Itemp.m_version << std::endl;
296 
297  }
298  delete queryIII;
299  */
300  }
301  break;
302  case 3:{
303  std::cout<<" caso 3" << std::endl;
304  /*
305  coral::IQuery* queryIII = schema.newQuery();
306  queryIII->addToOutputList("RUNSESSION_STRING.VALUE" , "VALUE");
307  queryIII->addToTableList("RUNSESSION_STRING");
308  std::string condition3 = "RUNSESSION_STRING.PARENT_ID=:n_vid_val";
309  queryIII->setCondition( condition3, conditionData3 );
310  coral::ICursor& cursorIII = queryIII->execute();
311  while ( cursorIII.next()!=0 ) {
312  const coral::AttributeList& row = cursorIII.currentRow();
313  std::cout<< " entering the queryIII " << std::endl;
314  Itemp.m_context = row["VALUE"].data<std::string>();
315  std::cout<< " context extracted == " << Itemp.m_context << std::endl;
316 
317  }
318  delete queryIII;
319  */
320  }
321  break;
322  case 4:{
323  std::cout<<" caso 4" << std::endl;
324  coral::IQuery* queryIII = schema.newQuery();
325  queryIII->addToOutputList("RUNSESSION_DATE.VALUE" , "VALUE");
326  queryIII->addToTableList("RUNSESSION_DATE");
327  std::string condition3 = "RUNSESSION_DATE.PARENT_ID=:n_vid_val";
328  queryIII->setCondition( condition3, conditionData3 );
329  coral::ICursor& cursorIII = queryIII->execute();
330  if ( cursorIII.next()!=0 ) {
331  const coral::AttributeList& row = cursorIII.currentRow();
332  std::cout<< " entering the queryIII " << std::endl;
333  coral::TimeStamp ts = row["VALUE"].data<coral::TimeStamp>();
334  int year= ts.year();
335  int month= ts.month();
336  int day= ts.day();
337  int hour= ts.hour();
338 
339  int minute= ts.minute();
340  int second = ts.second();
341  long nanosecond = ts.nanosecond();
342  std::cout<< " start time time extracted == " << "-->year " << year
343  << "-- month " << month
344  << "-- day " << day
345  << "-- hour " << hour
346  << "-- minute " << minute
347  << "-- second " << second <<std::endl;
348  boost::gregorian::date dt(year,month,day);
349  boost::posix_time::time_duration td(hour,minute,second,nanosecond/1000);
350  boost::posix_time::ptime pt( dt, td);
351  Itemp.m_date = boost::posix_time::to_iso_extended_string(pt);
352  std::cout<< " date extracted == " << Itemp.m_date << std::endl;
353  } else {
354  Itemp.m_date=="NULL";
355  std::cout<< "date extracted == " << Itemp.m_date<<std::endl;
356  }
357  delete queryIII;
358  }
359  break;
360  case 5:{
361 
362  std::cout<<" caso 5" << std::endl;
363  coral::IQuery* queryIII = schema.newQuery();
364  queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE" , "VALUE");
365  queryIII->addToTableList("RUNSESSION_INTEGER");
366  std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
367  queryIII->setCondition( condition3, conditionData3 );
368  coral::ICursor& cursorIII = queryIII->execute();
369  int i=0;
370  while ( cursorIII.next()!=0 ) {
371  const coral::AttributeList& row = cursorIII.currentRow();
372  std::cout<< " entering the queryIII " << std::endl;
373  int v = (int)row["VALUE"].data<long long>();
374  Itemp.m_GTAlgoCounts.push_back(v);
375  // std::cout<< " m_GTAlgoCounts["<< i << "]" << " extracted == " << v << std::endl;
376  i++;
377  }
378 
379  delete queryIII;
380 
381  }
382 
383  break;
384  case 6:{
385 
386  std::cout<<" caso 6" << std::endl;
387  coral::IQuery* queryIII = schema.newQuery();
388  queryIII->addToOutputList("RUNSESSION_FLOAT.VALUE" , "VALUE");
389  queryIII->addToTableList("RUNSESSION_FLOAT");
390  std::string condition3 = "RUNSESSION_FLOAT.PARENT_ID=:n_vid_val";
391  queryIII->setCondition( condition3, conditionData3 );
392  coral::ICursor& cursorIII = queryIII->execute();
393  int i=0;
394  while ( cursorIII.next()!=0 ) {
395  const coral::AttributeList& row = cursorIII.currentRow();
396  std::cout<< " entering the queryIII " << std::endl;
397  float v = (float)row["VALUE"].data<double>();
398  Itemp.m_GTAlgoRates.push_back(v);
399  // std::cout<< " m_GTAlgoRates["<< i << "]" << " extracted == " << v << std::endl;
400  i++;
401  }
402 
403  delete queryIII;
404 
405  }
406 
407  break;
408 
409  case 7:{
410 
411  std::cout<<" caso 7" << std::endl;
412  coral::IQuery* queryIII = schema.newQuery();
413  queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE" , "VALUE");
414  queryIII->addToTableList("RUNSESSION_INTEGER");
415  std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
416  queryIII->setCondition( condition3, conditionData3 );
417  coral::ICursor& cursorIII = queryIII->execute();
418  int i=0;
419  while ( cursorIII.next()!=0 ) {
420  const coral::AttributeList& row = cursorIII.currentRow();
421  std::cout<< " entering the queryIII " << std::endl;
422  int v = (int)row["VALUE"].data<long long>();
423  Itemp.m_GTAlgoPrescaling.push_back(v);
424  // std::cout<< " m_GTAlgoPrescaling["<< i << "]" << " extracted == " << v << std::endl;
425  i++;
426  }
427 
428  delete queryIII;
429 
430  }
431 
432  break;
433  case 8:{
434 
435  std::cout<<" caso 8" << std::endl;
436  coral::IQuery* queryIII = schema.newQuery();
437  queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE" , "VALUE");
438  queryIII->addToTableList("RUNSESSION_INTEGER");
439  std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
440  queryIII->setCondition( condition3, conditionData3 );
441  coral::ICursor& cursorIII = queryIII->execute();
442  int i=0;
443  while ( cursorIII.next()!=0 ) {
444  const coral::AttributeList& row = cursorIII.currentRow();
445  std::cout<< " entering the queryIII " << std::endl;
446  int v = (int)row["VALUE"].data<long long>();
447  Itemp.m_GTTechCounts.push_back(v);
448  // std::cout<< " m_GTTechCounts["<< i << "]" << " extracted == " << v << std::endl;
449  i++;
450  }
451 
452  delete queryIII;
453 
454  }
455 
456  break;
457  case 9:{
458 
459  std::cout<<" caso 9" << std::endl;
460  coral::IQuery* queryIII = schema.newQuery();
461  queryIII->addToOutputList("RUNSESSION_FLOAT.VALUE" , "VALUE");
462  queryIII->addToTableList("RUNSESSION_FLOAT");
463  std::string condition3 = "RUNSESSION_FLOAT.PARENT_ID=:n_vid_val";
464  queryIII->setCondition( condition3, conditionData3 );
465  coral::ICursor& cursorIII = queryIII->execute();
466  int i=0;
467  while ( cursorIII.next()!=0 ) {
468  const coral::AttributeList& row = cursorIII.currentRow();
469  std::cout<< " entering the queryIII " << std::endl;
470  float v = (float)row["VALUE"].data<double>();
471  Itemp.m_GTTechRates.push_back(v);
472  // std::cout<< " m_GTTechRates["<< i << "]" << " extracted == " << v << std::endl;
473  i++;
474  }
475 
476  delete queryIII;
477 
478  }
479 
480  break;
481  case 10:{
482 
483  std::cout<<" caso 10" << std::endl;
484  coral::IQuery* queryIII = schema.newQuery();
485  queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE" , "VALUE");
486  queryIII->addToTableList("RUNSESSION_INTEGER");
487  std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
488  queryIII->setCondition( condition3, conditionData3 );
489  coral::ICursor& cursorIII = queryIII->execute();
490  int i=0;
491  while ( cursorIII.next()!=0 ) {
492  const coral::AttributeList& row = cursorIII.currentRow();
493  std::cout<< " entering the queryIII " << std::endl;
494  int v = (int)row["VALUE"].data<long long>();
495  Itemp.m_GTTechPrescaling.push_back(v);
496  // std::cout<< " m_GTTechPrescaling["<< i << "]" << " extracted == " << v << std::endl;
497  i++;
498  }
499 
500  delete queryIII;
501 
502  }
503 
504  break;
505  case 11:{
506 
507  std::cout<<" caso 11" << std::endl;
508  coral::IQuery* queryIII = schema.newQuery();
509  queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE" , "VALUE");
510  queryIII->addToTableList("RUNSESSION_INTEGER");
511  std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
512  queryIII->setCondition( condition3, conditionData3 );
513  coral::ICursor& cursorIII = queryIII->execute();
514  int i=0;
515  while ( cursorIII.next()!=0 ) {
516  const coral::AttributeList& row = cursorIII.currentRow();
517  std::cout<< " entering the queryIII " << std::endl;
518  int v = (int)row["VALUE"].data<long long>();
519  Itemp.m_GTPartition0TriggerCounts.push_back(v);
520  // std::cout<< " m_GTPartition0TriggerCounts"<< i << "]" << " extracted == " << v << std::endl;
521  i++;
522  }
523 
524  delete queryIII;
525 
526  }
527 
528  break;
529  case 12:{
530 
531  std::cout<<" caso 12" << std::endl;
532  coral::IQuery* queryIII = schema.newQuery();
533  queryIII->addToOutputList("RUNSESSION_FLOAT.VALUE" , "VALUE");
534  queryIII->addToTableList("RUNSESSION_FLOAT");
535  std::string condition3 = "RUNSESSION_FLOAT.PARENT_ID=:n_vid_val";
536  queryIII->setCondition( condition3, conditionData3 );
537  coral::ICursor& cursorIII = queryIII->execute();
538  int i=0;
539  while ( cursorIII.next()!=0 ) {
540  const coral::AttributeList& row = cursorIII.currentRow();
541  std::cout<< " entering the queryIII " << std::endl;
542  float v = (float)row["VALUE"].data<double>();
543  Itemp.m_GTPartition0TriggerRates.push_back(v);
544  // std::cout<< " m_GTPartition0TriggerRates["<< i << "]" << " extracted == " << v << std::endl;
545  i++;
546  }
547 
548  delete queryIII;
549 
550  }
551 
552  break;
553  case 13:{
554 
555  std::cout<<" caso 13" << std::endl;
556  coral::IQuery* queryIII = schema.newQuery();
557  queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE" , "VALUE");
558  queryIII->addToTableList("RUNSESSION_INTEGER");
559  std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
560  queryIII->setCondition( condition3, conditionData3 );
561  coral::ICursor& cursorIII = queryIII->execute();
562  int i=0;
563  while ( cursorIII.next()!=0 ) {
564  const coral::AttributeList& row = cursorIII.currentRow();
565  std::cout<< " entering the queryIII " << std::endl;
566  int v = (int)row["VALUE"].data<long long>();
567  Itemp.m_GTPartition0DeadTime.push_back(v);
568  // std::cout<< " m_GTPartition0DeadTime"<< i << "]" << " extracted == " << v << std::endl;
569  i++;
570  }
571 
572  delete queryIII;
573 
574  }
575 
576  break;
577  case 14:{
578 
579  std::cout<<" caso 14" << std::endl;
580  coral::IQuery* queryIII = schema.newQuery();
581  queryIII->addToOutputList("RUNSESSION_FLOAT.VALUE" , "VALUE");
582  queryIII->addToTableList("RUNSESSION_FLOAT");
583  std::string condition3 = "RUNSESSION_FLOAT.PARENT_ID=:n_vid_val";
584  queryIII->setCondition( condition3, conditionData3 );
585  coral::ICursor& cursorIII = queryIII->execute();
586  int i=0;
587  while ( cursorIII.next()!=0 ) {
588  const coral::AttributeList& row = cursorIII.currentRow();
589  std::cout<< " entering the queryIII " << std::endl;
590  float v = (float)row["VALUE"].data<double>();
591  Itemp.m_GTPartition0DeadTimeRatio.push_back(v);
592  // std::cout<< " m_GTPartition0DeadTimeRatio["<< i << "]" << " extracted == " << v << std::endl;
593  i++;
594  }
595 
596  delete queryIII;
597 
598  }
599 
600  break;
601 
602  default:
603  std::cout<< "index out of range" << std::endl;
604  break;
605 
606  }
607 
608  // l1triggerscaler_array.push_back(Itemp);
609 
610  }
611  delete queryII;
612 
613 
614 
615  l1triggerscaler_array.push_back(Itemp);
616 
617  }
618 
619  delete queryI;
620 
621 
622  session->transaction().commit();
623  delete session;
624 
625  // std::cout<<"filling the lumi array to pass to the object" << std::endl;
626 
627 
628  return l1triggerscaler_array;
629 }
float dt
Definition: AMPTWrapper.h:126
int i
Definition: DBlmapReader.cc:9
std::vector< float > m_GTAlgoRates
std::vector< int > m_GTTechCounts
std::vector< float > m_GTTechRates
std::vector< int > m_GTAlgoCounts
std::vector< int > m_GTTechPrescaling
U second(std::pair< T, U > const &p)
std::vector< float > m_GTPartition0DeadTimeRatio
std::vector< int > m_GTPartition0DeadTime
std::string m_connectionString
std::string m_string_format
std::vector< int > m_GTPartition0TriggerCounts
std::vector< float > m_GTPartition0TriggerRates
std::vector< int > m_GTAlgoPrescaling
tuple cout
Definition: gather_cfg.py:121
coral::ISession * connect(const std::string &connectionString, const std::string &user, const std::string &password)
Definition: TestBase.cc:24
void L1TriggerScalerRead::run ( )
virtual

Implements TestBase.

Definition at line 58 of file L1TriggerScalerRead.cc.

Referenced by Types.LuminosityBlockID::cppID().

59 {
60 
61 }

Member Data Documentation

std::string L1TriggerScalerRead::m_connectionString
private

Definition at line 30 of file L1TriggerScalerRead.h.

Referenced by dropTable(), and readData().

std::string L1TriggerScalerRead::m_pass
private

Definition at line 32 of file L1TriggerScalerRead.h.

Referenced by dropTable(), and readData().

std::string L1TriggerScalerRead::m_tableToDrop
private

Definition at line 27 of file L1TriggerScalerRead.h.

Referenced by dropTable(), and L1TriggerScalerRead().

std::string L1TriggerScalerRead::m_user
private

Definition at line 31 of file L1TriggerScalerRead.h.

Referenced by dropTable(), and readData().