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 
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
string connectionString
Definition: autoCondHLT.py:4
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 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 }
std::string m_connectionString
#define table(NAME)
Definition: DbCore.h:49
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, EnergyCorrector::pt, 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  std::cout<< "date extracted == " << Itemp.m_date<<std::endl;
355  }
356  delete queryIII;
357  }
358  break;
359  case 5:{
360 
361  std::cout<<" caso 5" << std::endl;
362  coral::IQuery* queryIII = schema.newQuery();
363  queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE" , "VALUE");
364  queryIII->addToTableList("RUNSESSION_INTEGER");
365  std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
366  queryIII->setCondition( condition3, conditionData3 );
367  coral::ICursor& cursorIII = queryIII->execute();
368  int i=0;
369  while ( cursorIII.next()!=0 ) {
370  const coral::AttributeList& row = cursorIII.currentRow();
371  std::cout<< " entering the queryIII " << std::endl;
372  int v = (int)row["VALUE"].data<long long>();
373  Itemp.m_GTAlgoCounts.push_back(v);
374  // std::cout<< " m_GTAlgoCounts["<< i << "]" << " extracted == " << v << std::endl;
375  i++;
376  }
377 
378  delete queryIII;
379 
380  }
381 
382  break;
383  case 6:{
384 
385  std::cout<<" caso 6" << std::endl;
386  coral::IQuery* queryIII = schema.newQuery();
387  queryIII->addToOutputList("RUNSESSION_FLOAT.VALUE" , "VALUE");
388  queryIII->addToTableList("RUNSESSION_FLOAT");
389  std::string condition3 = "RUNSESSION_FLOAT.PARENT_ID=:n_vid_val";
390  queryIII->setCondition( condition3, conditionData3 );
391  coral::ICursor& cursorIII = queryIII->execute();
392  int i=0;
393  while ( cursorIII.next()!=0 ) {
394  const coral::AttributeList& row = cursorIII.currentRow();
395  std::cout<< " entering the queryIII " << std::endl;
396  float v = (float)row["VALUE"].data<double>();
397  Itemp.m_GTAlgoRates.push_back(v);
398  // std::cout<< " m_GTAlgoRates["<< i << "]" << " extracted == " << v << std::endl;
399  i++;
400  }
401 
402  delete queryIII;
403 
404  }
405 
406  break;
407 
408  case 7:{
409 
410  std::cout<<" caso 7" << std::endl;
411  coral::IQuery* queryIII = schema.newQuery();
412  queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE" , "VALUE");
413  queryIII->addToTableList("RUNSESSION_INTEGER");
414  std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
415  queryIII->setCondition( condition3, conditionData3 );
416  coral::ICursor& cursorIII = queryIII->execute();
417  int i=0;
418  while ( cursorIII.next()!=0 ) {
419  const coral::AttributeList& row = cursorIII.currentRow();
420  std::cout<< " entering the queryIII " << std::endl;
421  int v = (int)row["VALUE"].data<long long>();
422  Itemp.m_GTAlgoPrescaling.push_back(v);
423  // std::cout<< " m_GTAlgoPrescaling["<< i << "]" << " extracted == " << v << std::endl;
424  i++;
425  }
426 
427  delete queryIII;
428 
429  }
430 
431  break;
432  case 8:{
433 
434  std::cout<<" caso 8" << std::endl;
435  coral::IQuery* queryIII = schema.newQuery();
436  queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE" , "VALUE");
437  queryIII->addToTableList("RUNSESSION_INTEGER");
438  std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
439  queryIII->setCondition( condition3, conditionData3 );
440  coral::ICursor& cursorIII = queryIII->execute();
441  int i=0;
442  while ( cursorIII.next()!=0 ) {
443  const coral::AttributeList& row = cursorIII.currentRow();
444  std::cout<< " entering the queryIII " << std::endl;
445  int v = (int)row["VALUE"].data<long long>();
446  Itemp.m_GTTechCounts.push_back(v);
447  // std::cout<< " m_GTTechCounts["<< i << "]" << " extracted == " << v << std::endl;
448  i++;
449  }
450 
451  delete queryIII;
452 
453  }
454 
455  break;
456  case 9:{
457 
458  std::cout<<" caso 9" << std::endl;
459  coral::IQuery* queryIII = schema.newQuery();
460  queryIII->addToOutputList("RUNSESSION_FLOAT.VALUE" , "VALUE");
461  queryIII->addToTableList("RUNSESSION_FLOAT");
462  std::string condition3 = "RUNSESSION_FLOAT.PARENT_ID=:n_vid_val";
463  queryIII->setCondition( condition3, conditionData3 );
464  coral::ICursor& cursorIII = queryIII->execute();
465  int i=0;
466  while ( cursorIII.next()!=0 ) {
467  const coral::AttributeList& row = cursorIII.currentRow();
468  std::cout<< " entering the queryIII " << std::endl;
469  float v = (float)row["VALUE"].data<double>();
470  Itemp.m_GTTechRates.push_back(v);
471  // std::cout<< " m_GTTechRates["<< i << "]" << " extracted == " << v << std::endl;
472  i++;
473  }
474 
475  delete queryIII;
476 
477  }
478 
479  break;
480  case 10:{
481 
482  std::cout<<" caso 10" << std::endl;
483  coral::IQuery* queryIII = schema.newQuery();
484  queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE" , "VALUE");
485  queryIII->addToTableList("RUNSESSION_INTEGER");
486  std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
487  queryIII->setCondition( condition3, conditionData3 );
488  coral::ICursor& cursorIII = queryIII->execute();
489  int i=0;
490  while ( cursorIII.next()!=0 ) {
491  const coral::AttributeList& row = cursorIII.currentRow();
492  std::cout<< " entering the queryIII " << std::endl;
493  int v = (int)row["VALUE"].data<long long>();
494  Itemp.m_GTTechPrescaling.push_back(v);
495  // std::cout<< " m_GTTechPrescaling["<< i << "]" << " extracted == " << v << std::endl;
496  i++;
497  }
498 
499  delete queryIII;
500 
501  }
502 
503  break;
504  case 11:{
505 
506  std::cout<<" caso 11" << std::endl;
507  coral::IQuery* queryIII = schema.newQuery();
508  queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE" , "VALUE");
509  queryIII->addToTableList("RUNSESSION_INTEGER");
510  std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
511  queryIII->setCondition( condition3, conditionData3 );
512  coral::ICursor& cursorIII = queryIII->execute();
513  int i=0;
514  while ( cursorIII.next()!=0 ) {
515  const coral::AttributeList& row = cursorIII.currentRow();
516  std::cout<< " entering the queryIII " << std::endl;
517  int v = (int)row["VALUE"].data<long long>();
518  Itemp.m_GTPartition0TriggerCounts.push_back(v);
519  // std::cout<< " m_GTPartition0TriggerCounts"<< i << "]" << " extracted == " << v << std::endl;
520  i++;
521  }
522 
523  delete queryIII;
524 
525  }
526 
527  break;
528  case 12:{
529 
530  std::cout<<" caso 12" << std::endl;
531  coral::IQuery* queryIII = schema.newQuery();
532  queryIII->addToOutputList("RUNSESSION_FLOAT.VALUE" , "VALUE");
533  queryIII->addToTableList("RUNSESSION_FLOAT");
534  std::string condition3 = "RUNSESSION_FLOAT.PARENT_ID=:n_vid_val";
535  queryIII->setCondition( condition3, conditionData3 );
536  coral::ICursor& cursorIII = queryIII->execute();
537  int i=0;
538  while ( cursorIII.next()!=0 ) {
539  const coral::AttributeList& row = cursorIII.currentRow();
540  std::cout<< " entering the queryIII " << std::endl;
541  float v = (float)row["VALUE"].data<double>();
542  Itemp.m_GTPartition0TriggerRates.push_back(v);
543  // std::cout<< " m_GTPartition0TriggerRates["<< i << "]" << " extracted == " << v << std::endl;
544  i++;
545  }
546 
547  delete queryIII;
548 
549  }
550 
551  break;
552  case 13:{
553 
554  std::cout<<" caso 13" << std::endl;
555  coral::IQuery* queryIII = schema.newQuery();
556  queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE" , "VALUE");
557  queryIII->addToTableList("RUNSESSION_INTEGER");
558  std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
559  queryIII->setCondition( condition3, conditionData3 );
560  coral::ICursor& cursorIII = queryIII->execute();
561  int i=0;
562  while ( cursorIII.next()!=0 ) {
563  const coral::AttributeList& row = cursorIII.currentRow();
564  std::cout<< " entering the queryIII " << std::endl;
565  int v = (int)row["VALUE"].data<long long>();
566  Itemp.m_GTPartition0DeadTime.push_back(v);
567  // std::cout<< " m_GTPartition0DeadTime"<< i << "]" << " extracted == " << v << std::endl;
568  i++;
569  }
570 
571  delete queryIII;
572 
573  }
574 
575  break;
576  case 14:{
577 
578  std::cout<<" caso 14" << std::endl;
579  coral::IQuery* queryIII = schema.newQuery();
580  queryIII->addToOutputList("RUNSESSION_FLOAT.VALUE" , "VALUE");
581  queryIII->addToTableList("RUNSESSION_FLOAT");
582  std::string condition3 = "RUNSESSION_FLOAT.PARENT_ID=:n_vid_val";
583  queryIII->setCondition( condition3, conditionData3 );
584  coral::ICursor& cursorIII = queryIII->execute();
585  int i=0;
586  while ( cursorIII.next()!=0 ) {
587  const coral::AttributeList& row = cursorIII.currentRow();
588  std::cout<< " entering the queryIII " << std::endl;
589  float v = (float)row["VALUE"].data<double>();
590  Itemp.m_GTPartition0DeadTimeRatio.push_back(v);
591  // std::cout<< " m_GTPartition0DeadTimeRatio["<< i << "]" << " extracted == " << v << std::endl;
592  i++;
593  }
594 
595  delete queryIII;
596 
597  }
598 
599  break;
600 
601  default:
602  std::cout<< "index out of range" << std::endl;
603  break;
604 
605  }
606 
607  // l1triggerscaler_array.push_back(Itemp);
608 
609  }
610  delete queryII;
611 
612 
613 
614  l1triggerscaler_array.push_back(Itemp);
615 
616  }
617 
618  delete queryI;
619 
620 
621  session->transaction().commit();
622  delete session;
623 
624  // std::cout<<"filling the lumi array to pass to the object" << std::endl;
625 
626 
627  return l1triggerscaler_array;
628 }
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.EventID::cppID(), and 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().