Classes | Public Member Functions | Private Attributes | List of all members
dbutils::RunHistory Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-30/DatabaseUtils/cxx/include/RunHistory/RunHistory.h"

Classes

class  BNEVB
 
class  DCM
 
class  FEB
 

Public Member Functions

 RunHistory (int run, std::string det)
 
 RunHistory (int run, int detid)
 
 ~RunHistory ()
 
void Load ()
 
void SetDBInfo (std::string dbname="", std::string dbhost="", std::string user="", std::string port="")
 
void SetRunNumber (int run)
 
void SetDetector (std::string det)
 
void Dump ()
 
int RunNumber () const
 
int NSubruns () const
 
std::string Detector () const
 
time_t TStart () const
 
time_t TStop () const
 
std::string TStartAsString () const
 
std::string TStopAsString () const
 
int Duration () const
 in units of seconds More...
 
int NTriggers () const
 
int NDCMs () const
 
int NBNEVBs () const
 
int NActiveChannels () const
 
int NTotalChannels () const
 
int NTotalFEBs () const
 
int NMaskedOffFEBs () const
 
const DCM GetDCM (int idcm)
 
int NDCMInstalled () const
 
int NFEBInstalled () const
 
int NAPDInstalled () const
 
bool FEBEnableMask (const std::string &dcmName, int64_t &febMask)
 
bool PixelEnableMask (const std::string &dcmName, const int &febId, int32_t &pixelMask)
 
bool PixelThresholdsForFEB (const std::string &dcmName, const int &febId, std::vector< int16_t > &thresholdList)
 

Private Attributes

int _runNumber
 
int _nsubrun
 
int _nTotTrig
 
int _nActiveChannels
 
int _nTotalChannels
 
int _nTotalFEBs
 
int _nMaskedOffFEBs
 
int _nInstalledDCMs
 
int _nInstalledFEBs
 
int _nInstalledAPDs
 
std::string _detector
 
std::string _tStart
 
std::string _tEnd
 
std::vector< int_nEvtTrig
 
std::vector< DCM_dcmList
 
std::vector< BNEVB_bnevbList
 
int64_t _gCfgId
 
std::unique_ptr< db::TablerunsTable
 
std::unique_ptr< db::TableresTable
 
std::unique_ptr< db::TablehwposTable
 
std::unique_ptr< daqcfg::PixelEnableMasks_pixMaskPtr
 
std::unique_ptr< daqcfg::PixelThresholds_pixThreshPtr
 

Detailed Description

Utilities for accessing DB via kerberos

Author
Jonathan Paley
Version
Revision
1.9.14.1
Date
2019/09/27 00:07:04

Definition at line 27 of file RunHistory.h.

Constructor & Destructor Documentation

dbutils::RunHistory::RunHistory ( int  run,
std::string  det 
)

Definition at line 14 of file RunHistory.cpp.

References _detector, fillBadChanDBTables::det, novadaq::cnv::DetInfo::DetNameOk(), hwposTable, Load(), resTable, runsTable, and string.

14  :
15  _runNumber(run), _nsubrun(0), _nTotTrig(0),
18  _tStart("2010-01-01 00:00:00"), _tEnd(""),
19  _dcmList(0), _bnevbList(0)
20  {
21  runsTable.reset(new db::Table("NovaDatabase/tables/RunHistory/Runs.xml"));
22  resTable.reset(new db::Table("NovaDatabase/tables/RunHistory/DAQResourcesByRun.xml"));
24  _detector = det;
25  runsTable->SetDetector(det);
26  resTable->SetDetector(det);
27  char daqEnv[128];
28  sprintf(daqEnv,"NOVADAQ_ENVIRONMENT=%s",det.c_str());
29  putenv(daqEnv);
30  }
31  else {
32  std::string errStr = "RunHistory::RunHistory: invalid detector name!";
33  throw std::runtime_error(errStr);
34  }
35 
36  hwposTable.reset(new db::Table("NovaDatabase/tables/Hardware/HardwarePosition.xml"));
37  hwposTable->SetDBInfo("nova_hardware","ifdbprod.fnal.gov",
38  "5432","nova_reader");
39  hwposTable->SetIgnoreEnvVar(true);
40 
41  Load();
42  }
std::unique_ptr< db::Table > hwposTable
Definition: RunHistory.h:136
std::string _tStart
Definition: RunHistory.h:126
std::unique_ptr< db::Table > resTable
Definition: RunHistory.h:135
std::vector< BNEVB > _bnevbList
Definition: RunHistory.h:130
std::unique_ptr< db::Table > runsTable
Definition: RunHistory.h:134
Definition: run.py:1
std::vector< DCM > _dcmList
Definition: RunHistory.h:129
std::string _tEnd
Definition: RunHistory.h:127
static bool DetNameOk(std::string name)
std::string _detector
Definition: RunHistory.h:125
enum BeamMode string
dbutils::RunHistory::RunHistory ( int  run,
int  detid 
)

Definition at line 45 of file RunHistory.cpp.

References _detector, novadaq::cnv::DetInfo::DetIdOk(), novadaq::cnv::DetInfo::GetName(), hwposTable, Load(), resTable, runsTable, and string.

45  :
46  _runNumber(run), _nsubrun(0), _nTotTrig(0),
49  _tStart("2010-01-01 00:00:00"), _tEnd(""),
50  _dcmList(0), _bnevbList(0)
51  {
52  runsTable.reset(new db::Table("NovaDatabase/tables/RunHistory/Runs.xml"));
53  resTable.reset(new db::Table("NovaDatabase/tables/RunHistory/DAQResourcesByRun.xml"));
56  runsTable->SetDetector(det);
57  resTable->SetDetector(det);
58  char daqEnv[128];
59  sprintf(daqEnv,"NOVADAQ_ENVIRONMENT=%s",_detector.c_str());
60  putenv(daqEnv);
61  }
62  else {
63  std::string errStr = "RunHistory::RunHistory: invalid detector id!";
64  throw std::runtime_error(errStr);
65  }
66 
67  hwposTable.reset(new db::Table("NovaDatabase/tables/Hardware/HardwarePosition.xml"));
68  hwposTable->SetDBInfo("nova_hardware","ifdbprod.fnal.gov",
69  "5432","nova_reader");
70  hwposTable->SetIgnoreEnvVar(true);
71 
72  Load();
73  }
static std::string GetName(int id)
std::unique_ptr< db::Table > hwposTable
Definition: RunHistory.h:136
std::string _tStart
Definition: RunHistory.h:126
std::unique_ptr< db::Table > resTable
Definition: RunHistory.h:135
std::vector< BNEVB > _bnevbList
Definition: RunHistory.h:130
static bool DetIdOk(int id)
std::unique_ptr< db::Table > runsTable
Definition: RunHistory.h:134
Definition: run.py:1
std::vector< DCM > _dcmList
Definition: RunHistory.h:129
std::string _tEnd
Definition: RunHistory.h:127
std::string _detector
Definition: RunHistory.h:125
enum BeamMode string
dbutils::RunHistory::~RunHistory ( )

Definition at line 77 of file RunHistory.cpp.

78  {
79  }

Member Function Documentation

std::string dbutils::RunHistory::Detector ( ) const
inline

Definition at line 83 of file RunHistory.h.

References _detector, TStart(), and TStop().

83 { return _detector; }
std::string _detector
Definition: RunHistory.h:125
void dbutils::RunHistory::Dump ( )

Definition at line 265 of file RunHistory.cpp.

References _bnevbList, _dcmList, _nActiveChannels, _nsubrun, _nTotTrig, _runNumber, om::cout, allTimeWatchdog::endl, MECModelEnuComparisons::i, TStartAsString(), and TStopAsString().

Referenced by SetRunNumber().

265  {
266  cout << "****************************************" << endl;
267  cout << "Dump of run " << _runNumber << endl;
268  cout << "****************************************\n" << endl;
269  cout << "Num Subruns : " << _nsubrun << endl;
270  cout << "Start time : " << TStartAsString() << endl;
271  cout << "End time : " << TStopAsString() << endl;
272  cout << "Trig Tot : " << _nTotTrig << endl;
273  cout << "Num Active Channels: " << _nActiveChannels << endl;
274  cout << "Num DCMs : " << _dcmList.size() << endl;
275  for (unsigned int i=0; i<_dcmList.size(); ++i)
276  cout << "\t" << _dcmList[i].appname << endl;
277  cout << "Num BNEVBs : " << _bnevbList.size() << endl;
278  for (unsigned int i=0; i<_bnevbList.size(); ++i)
279  cout << "\t" << _bnevbList[i].appname << endl;
280 
281  }
std::string TStartAsString() const
Definition: RunHistory.h:87
std::string TStopAsString() const
Definition: RunHistory.h:88
std::vector< BNEVB > _bnevbList
Definition: RunHistory.h:130
OStream cout
Definition: OStream.cxx:6
std::vector< DCM > _dcmList
Definition: RunHistory.h:129
int dbutils::RunHistory::Duration ( ) const
inline

in units of seconds

Definition at line 90 of file RunHistory.h.

References TStart(), and TStop().

bool dbutils::RunHistory::FEBEnableMask ( const std::string dcmName,
int64_t &  febMask 
)

Definition at line 285 of file RunHistory.cpp.

References _dcmList, _gCfgId, _pixMaskPtr, and MECModelEnuComparisons::i.

Referenced by NAPDInstalled().

285  {
286  if (_pixMaskPtr.get() == 0) {
287  std::vector<std::string> dcmNameList;
288  for (unsigned int i=0; i<_dcmList.size(); ++i) {
289  dcmNameList.push_back(_dcmList[i].appname);
290  }
291  daqcfg::PixelEnableMasks blah(_gCfgId, dcmNameList);
292  _pixMaskPtr.reset(new daqcfg::PixelEnableMasks(_gCfgId, dcmNameList));
293  }
294 
295  if (! _pixMaskPtr->hasValidData()) {return false;}
296  return _pixMaskPtr->getFEBEnableMask(dcmName, febMask);
297  }
std::vector< DCM > _dcmList
Definition: RunHistory.h:129
std::unique_ptr< daqcfg::PixelEnableMasks > _pixMaskPtr
Definition: RunHistory.h:137
const DCM dbutils::RunHistory::GetDCM ( int  idcm)
inline

Definition at line 99 of file RunHistory.h.

References _dcmList.

99 { return _dcmList[idcm]; }
std::vector< DCM > _dcmList
Definition: RunHistory.h:129
void dbutils::RunHistory::Load ( )

Definition at line 115 of file RunHistory.cpp.

References _bnevbList, _dcmList, _detector, _gCfgId, _nActiveChannels, _nMaskedOffFEBs, _nsubrun, _nTotalChannels, _nTotalFEBs, _nTotTrig, _runNumber, _tEnd, _tStart, dbutils::RunHistory::FEB::apdV, dbutils::RunHistory::DCM::appname, dbutils::RunHistory::BNEVB::appname, b, elec2geo::block, run_hadd::cmd, nova::dbi::Row::Col(), d, dbutils::RunHistory::FEB::dcmid, MakeMiniprodValidationCuts::f, dbutils::daqconfig::PixelEnableMasks::febIsEnabled(), nova::dbi::Column::Get(), dbutils::daqconfig::PixelEnableMasks::getFEBEnableMask(), dbutils::daqconfig::PixelEnableMasks::getPixelEnableMask(), dbutils::dcs::APDSettings::getTemperature(), dbutils::dcs::APDSettings::getTemperatureEnable(), dbutils::dcs::APDSettings::hasValidData(), hwposTable, MECModelEnuComparisons::i, dbutils::RunHistory::FEB::isCooled, dbutils::RunHistory::FEB::isEnabled, dbutils::RunHistory::FEB::loc, dbutils::RunHistory::FEB::nActivePix, dbutils::RunHistory::FEB::pixelMask, NDAPDHVSetting::plane, resTable, check_grl::row, runsTable, string, APDHVSetting::temp, dbutils::RunHistory::FEB::tempEnabled, and dbutils::RunHistory::FEB::temperature.

Referenced by RunHistory().

116  {
117  runsTable->Clear();
118  resTable->Clear();
119  hwposTable->Clear();
120 
121  runsTable->SetValidityRange("run",_runNumber);
122  runsTable->LoadFromDB();
123  db::Row* row = runsTable->GetRow(0);
124  if (row) {
125  string timeStr;
126  if (row->Col("tstart")->Get(timeStr)) _tStart = timeStr;
127  if (row->Col("tstop")->Get(timeStr)) _tEnd = timeStr;
128  row->Col("nevents")->Get(_nTotTrig);
129  row->Col("configid")->Get(_gCfgId);
130  row->Col("nsubruns")->Get(_nsubrun);
131  }
132 
133  std::vector<std::string> tmpDCMList;
134  resTable->SetValidityRange("run",_runNumber);
135  resTable->LoadFromDB();
136  int nResources = resTable->NRow();
137  for (int i=0; i<nResources; ++i) {
138  row = resTable->GetRow(i);
139  string rtype;
140  string appname;
141  if (row->Col("resource_type")->Get(rtype)) {
142  if (rtype == "bnevb") {
143  BNEVB b;
144  row->Col("appname")->Get(appname);
145  b.appname = appname;
146  _bnevbList.push_back(b);
147  }
148  else if (rtype == "dcm") {
149  DCM d;
150  row->Col("appname")->Get(appname);
151  d.appname = appname;
152  _dcmList.push_back(d);
153  tmpDCMList.push_back(appname);
154  }
155  }
156  }
157 
158  daqcfg::PixelEnableMasks pixelEnableMasks(_gCfgId, tmpDCMList);
159  dcs::APDSettings apdSettings(_gCfgId, tmpDCMList);
160  for (uint32_t iDCM = 0; iDCM < _dcmList.size(); ++iDCM) {
161  int64_t febMask = 0;
162  pixelEnableMasks.getFEBEnableMask(_dcmList[iDCM].appname,
163  febMask);
164  _dcmList[iDCM].febMask = febMask;
165  for (int iFEB = 0; iFEB < 64; ++iFEB) {
166  bool countIt = true;
167  if ( (_dcmList[iDCM].appname == "dcm-3-01-03" ||
168  _dcmList[iDCM].appname == "dcm-3-02-03") &&
169  ((iFEB >= 16 && iFEB <= 31) || (iFEB >= 47)) )
170  countIt = false;
171  if ( (_dcmList[iDCM].appname == "dcm-3-01-01" ||
172  _dcmList[iDCM].appname == "dcm-3-02-01" ||
173  _dcmList[iDCM].appname == "dcm-3-01-02" ||
174  _dcmList[iDCM].appname == "dcm-3-02-02") &&
175  (iFEB == 47 || iFEB == 63))
176  countIt = false;
177  if (( _dcmList[iDCM].appname == "dcm-3-03-02") &&
178  ((iFEB >= 62)||(iFEB >= 46 && iFEB <= 47)))
179  countIt = false;
180  if (( _dcmList[iDCM].appname == "dcm-3-03-03") &&
181  ((iFEB >= 16 && iFEB <= 31)||(iFEB >= 46)))
182  countIt = false;
183  if ( _dcmList[iDCM].appname == "dcm-3-04-01")
184  if ((iFEB >= 6 && iFEB <= 15) || iFEB >= 22)
185  countIt = false;
186  if ( _dcmList[iDCM].appname == "dcm-3-04-02")
187  if ((iFEB >= 7 && iFEB <= 15) || (iFEB >= 23 && iFEB <= 31) ||
188  iFEB >= 39)
189  countIt = false;
190 
191  if (countIt) {
192  FEB f;
193  f.dcmid = _dcmList[iDCM].appname;
194  f.loc = iFEB;
195  _nTotalChannels += 32;
196  ++_nTotalFEBs;
197  f.isEnabled = false;
198  if (pixelEnableMasks.febIsEnabled(_dcmList[iDCM].appname, iFEB)) {
199  f.isEnabled = true;
200  int32_t pixelMask = 0;
201  pixelEnableMasks.getPixelEnableMask(_dcmList[iDCM].appname,
202  iFEB, pixelMask);
203  f.pixelMask = pixelMask;
204  f.nActivePix = pixelEnableMasks.
205  getEnabledPixelCountForFEB(_dcmList[iDCM].appname, iFEB);
206  _nActiveChannels += f.nActivePix;
207  f.apdV = 0;
208  f.isCooled = false;
209  f.tempEnabled = false;
210  f.temperature = -100;
211  if (apdSettings.hasValidData()) {
212  apdSettings.getTemperatureEnable(f.dcmid,f.loc,f.tempEnabled);
213  double temp;
214  apdSettings.getTemperature(f.dcmid,f.loc,temp);
215  f.temperature = temp;
216  }
217  }
218  if (! f.isEnabled) _nMaskedOffFEBs++;
219  _dcmList[iDCM].feb[iFEB] = f;
220  }
221  }
222 
223  }
224 
225 
226  std::string cmd = "detector='" + _detector + "' and hw_type='APD' and install_date < '" + _tStart + "' and (remove_date is NULL or remove_date > '" + _tStart + "')";
227  hwposTable->SetValiditySQL(cmd);
228  hwposTable->LoadFromDB();
229  for (int i=0; i<hwposTable->NRow(); ++i) {
230  row = hwposTable->GetRow(i);
231  if (row) {
232  int block; row->Col("block")->Get(block);
233  int plane; row->Col("plane")->Get(plane);
234  int module_position; row->Col("module_position")->Get(module_position);
235  }
236  }
237 
238  }
Column & Col(int i)
Find index of column with name. Suitable for passing to Col.
Definition: Row.h:63
std::unique_ptr< db::Table > hwposTable
Definition: RunHistory.h:136
std::string _tStart
Definition: RunHistory.h:126
std::unique_ptr< db::Table > resTable
Definition: RunHistory.h:135
bool Get(T &val) const
Definition: Column.h:85
string cmd
Definition: run_hadd.py:52
block
print "ROW IS " print row
Definition: elec2geo.py:31
std::vector< BNEVB > _bnevbList
Definition: RunHistory.h:130
Float_t d
Definition: plot.C:236
std::unique_ptr< db::Table > runsTable
Definition: RunHistory.h:134
std::vector< DCM > _dcmList
Definition: RunHistory.h:129
std::string _tEnd
Definition: RunHistory.h:127
const hit & b
Definition: hits.cxx:21
std::string _detector
Definition: RunHistory.h:125
enum BeamMode string
int dbutils::RunHistory::NActiveChannels ( ) const
inline

Definition at line 95 of file RunHistory.h.

References _nActiveChannels.

95 { return _nActiveChannels; }
int dbutils::RunHistory::NAPDInstalled ( ) const
inline
int dbutils::RunHistory::NBNEVBs ( ) const
inline

Definition at line 94 of file RunHistory.h.

References _bnevbList.

94 { return _bnevbList.size(); }
std::vector< BNEVB > _bnevbList
Definition: RunHistory.h:130
int dbutils::RunHistory::NDCMInstalled ( ) const
inline

Definition at line 101 of file RunHistory.h.

References _nInstalledDCMs.

101 { return _nInstalledDCMs; }
int dbutils::RunHistory::NDCMs ( ) const
inline

Definition at line 93 of file RunHistory.h.

References _dcmList.

93 { return _dcmList.size(); }
std::vector< DCM > _dcmList
Definition: RunHistory.h:129
int dbutils::RunHistory::NFEBInstalled ( ) const
inline

Definition at line 102 of file RunHistory.h.

References _nInstalledFEBs.

102 { return _nInstalledFEBs; }
int dbutils::RunHistory::NMaskedOffFEBs ( ) const
inline

Definition at line 98 of file RunHistory.h.

References _nMaskedOffFEBs.

98 { return _nMaskedOffFEBs; }
int dbutils::RunHistory::NSubruns ( ) const
inline

Definition at line 82 of file RunHistory.h.

References _nsubrun.

82 { return _nsubrun; }
int dbutils::RunHistory::NTotalChannels ( ) const
inline

Definition at line 96 of file RunHistory.h.

References _nTotalChannels.

96 { return _nTotalChannels; }
int dbutils::RunHistory::NTotalFEBs ( ) const
inline

Definition at line 97 of file RunHistory.h.

References _nTotalFEBs.

97 { return _nTotalFEBs; }
int dbutils::RunHistory::NTriggers ( ) const
inline

Definition at line 91 of file RunHistory.h.

References _nTotTrig.

91 { return _nTotTrig; }
bool dbutils::RunHistory::PixelEnableMask ( const std::string dcmName,
const int febId,
int32_t &  pixelMask 
)

Definition at line 301 of file RunHistory.cpp.

References _dcmList, _gCfgId, _pixMaskPtr, and MECModelEnuComparisons::i.

Referenced by NAPDInstalled().

302  {
303  if (_pixMaskPtr.get() == 0) {
304  std::vector<std::string> dcmNameList;
305  for (unsigned int i=0; i<_dcmList.size(); ++i) {
306  dcmNameList.push_back(_dcmList[i].appname);
307  }
308  _pixMaskPtr.reset(new daqcfg::PixelEnableMasks(_gCfgId, dcmNameList));
309  }
310 
311  if (! _pixMaskPtr->hasValidData()) {return false;}
312  return _pixMaskPtr->getPixelEnableMask(dcmName, febId, pixelMask);
313  }
std::vector< DCM > _dcmList
Definition: RunHistory.h:129
std::unique_ptr< daqcfg::PixelEnableMasks > _pixMaskPtr
Definition: RunHistory.h:137
bool dbutils::RunHistory::PixelThresholdsForFEB ( const std::string dcmName,
const int febId,
std::vector< int16_t > &  thresholdList 
)

Definition at line 317 of file RunHistory.cpp.

References _dcmList, _gCfgId, _pixThreshPtr, and MECModelEnuComparisons::i.

Referenced by NAPDInstalled().

319  {
320  if (_pixThreshPtr.get() == 0) {
321  std::vector<std::string> dcmNameList;
322  for (unsigned int i=0; i<_dcmList.size(); ++i) {
323  dcmNameList.push_back(_dcmList[i].appname);
324  }
325  _pixThreshPtr.reset(new daqcfg::PixelThresholds(_gCfgId, dcmNameList));
326  }
327 
328  if (! _pixThreshPtr->hasValidData()) {return false;}
329  return _pixThreshPtr->getThresholdsForFEB(dcmName, febId, thresholdList);
330  }
std::unique_ptr< daqcfg::PixelThresholds > _pixThreshPtr
Definition: RunHistory.h:138
std::vector< DCM > _dcmList
Definition: RunHistory.h:129
int dbutils::RunHistory::RunNumber ( ) const
inline

Definition at line 81 of file RunHistory.h.

References _runNumber.

81 { return _runNumber; }
void dbutils::RunHistory::SetDBInfo ( std::string  dbname = "",
std::string  dbhost = "",
std::string  user = "",
std::string  port = "" 
)

Definition at line 83 of file RunHistory.cpp.

References resTable, and runsTable.

85  {
86  if (dbname!="") {
87  runsTable->SetDBName(dbname);
88  runsTable->SetIgnoreEnvVar(true);
89  resTable->SetDBName(dbname);
90  resTable->SetIgnoreEnvVar(true);
91  }
92  if (dbhost!="") {
93  runsTable->SetDBHost(dbhost);
94  runsTable->SetIgnoreEnvVar(true);
95  resTable->SetDBHost(dbhost);
96  resTable->SetIgnoreEnvVar(true);
97  }
98  if (user!="") {
99  runsTable->SetUser(user);
100  runsTable->SetIgnoreEnvVar(true);
101  resTable->SetUser(user);
102  resTable->SetIgnoreEnvVar(true);
103  }
104  if (dbport!="") {
105  runsTable->SetDBPort(dbport);
106  runsTable->SetIgnoreEnvVar(true);
107  resTable->SetDBPort(dbport);
108  resTable->SetIgnoreEnvVar(true);
109  }
110 
111  }
std::unique_ptr< db::Table > resTable
Definition: RunHistory.h:135
std::unique_ptr< db::Table > runsTable
Definition: RunHistory.h:134
void dbutils::RunHistory::SetDetector ( std::string  det)

Referenced by SetRunNumber().

void dbutils::RunHistory::SetRunNumber ( int  run)
inline
time_t dbutils::RunHistory::TStart ( ) const

Definition at line 242 of file RunHistory.cpp.

References _tStart, confusionMatrixTree::t, and nova::database::Util::TimeAsStringToTime_t().

Referenced by Detector(), and Duration().

242  {
243  time_t t;
245  return t;
246  else
247  return 0;
248  }
std::string _tStart
Definition: RunHistory.h:126
static bool TimeAsStringToTime_t(std::string ts, time_t &t)
std::string dbutils::RunHistory::TStartAsString ( ) const
inline

Definition at line 87 of file RunHistory.h.

References _tStart.

Referenced by Dump().

87 { return _tStart;}
std::string _tStart
Definition: RunHistory.h:126
time_t dbutils::RunHistory::TStop ( ) const

Definition at line 252 of file RunHistory.cpp.

References _tEnd, confusionMatrixTree::t, and nova::database::Util::TimeAsStringToTime_t().

Referenced by Detector(), and Duration().

252  {
253  time_t t;
254  string tEnd = _tEnd;
255  if (_tEnd == "")
256  tEnd = "2000-01-01 00:00:00";
258  return t;
259  else
260  return 0;
261  }
static bool TimeAsStringToTime_t(std::string ts, time_t &t)
std::string _tEnd
Definition: RunHistory.h:127
std::string dbutils::RunHistory::TStopAsString ( ) const
inline

Definition at line 88 of file RunHistory.h.

References _tEnd.

Referenced by Dump().

88 { return _tEnd;}
std::string _tEnd
Definition: RunHistory.h:127

Member Data Documentation

std::vector<BNEVB> dbutils::RunHistory::_bnevbList
private

Definition at line 130 of file RunHistory.h.

Referenced by Dump(), Load(), and NBNEVBs().

std::vector<DCM> dbutils::RunHistory::_dcmList
private
std::string dbutils::RunHistory::_detector
private

Definition at line 125 of file RunHistory.h.

Referenced by Detector(), Load(), and RunHistory().

int64_t dbutils::RunHistory::_gCfgId
private

Definition at line 132 of file RunHistory.h.

Referenced by FEBEnableMask(), Load(), PixelEnableMask(), and PixelThresholdsForFEB().

int dbutils::RunHistory::_nActiveChannels
private

Definition at line 117 of file RunHistory.h.

Referenced by Dump(), Load(), and NActiveChannels().

std::vector<int> dbutils::RunHistory::_nEvtTrig
private

Definition at line 128 of file RunHistory.h.

int dbutils::RunHistory::_nInstalledAPDs
private

Definition at line 123 of file RunHistory.h.

Referenced by NAPDInstalled().

int dbutils::RunHistory::_nInstalledDCMs
private

Definition at line 121 of file RunHistory.h.

Referenced by NDCMInstalled().

int dbutils::RunHistory::_nInstalledFEBs
private

Definition at line 122 of file RunHistory.h.

Referenced by NFEBInstalled().

int dbutils::RunHistory::_nMaskedOffFEBs
private

Definition at line 120 of file RunHistory.h.

Referenced by Load(), and NMaskedOffFEBs().

int dbutils::RunHistory::_nsubrun
private

Definition at line 115 of file RunHistory.h.

Referenced by Dump(), Load(), and NSubruns().

int dbutils::RunHistory::_nTotalChannels
private

Definition at line 118 of file RunHistory.h.

Referenced by Load(), and NTotalChannels().

int dbutils::RunHistory::_nTotalFEBs
private

Definition at line 119 of file RunHistory.h.

Referenced by Load(), and NTotalFEBs().

int dbutils::RunHistory::_nTotTrig
private

Definition at line 116 of file RunHistory.h.

Referenced by Dump(), Load(), and NTriggers().

std::unique_ptr<daqcfg::PixelEnableMasks> dbutils::RunHistory::_pixMaskPtr
private

Definition at line 137 of file RunHistory.h.

Referenced by FEBEnableMask(), and PixelEnableMask().

std::unique_ptr<daqcfg::PixelThresholds> dbutils::RunHistory::_pixThreshPtr
private

Definition at line 138 of file RunHistory.h.

Referenced by PixelThresholdsForFEB().

int dbutils::RunHistory::_runNumber
private

Definition at line 114 of file RunHistory.h.

Referenced by Dump(), Load(), RunNumber(), and SetRunNumber().

std::string dbutils::RunHistory::_tEnd
private

Definition at line 127 of file RunHistory.h.

Referenced by Load(), TStop(), and TStopAsString().

std::string dbutils::RunHistory::_tStart
private

Definition at line 126 of file RunHistory.h.

Referenced by Load(), TStart(), and TStartAsString().

std::unique_ptr<db::Table> dbutils::RunHistory::hwposTable
private

Definition at line 136 of file RunHistory.h.

Referenced by Load(), and RunHistory().

std::unique_ptr<db::Table> dbutils::RunHistory::resTable
private

Definition at line 135 of file RunHistory.h.

Referenced by Load(), RunHistory(), and SetDBInfo().

std::unique_ptr<db::Table> dbutils::RunHistory::runsTable
private

Definition at line 134 of file RunHistory.h.

Referenced by Load(), RunHistory(), and SetDBInfo().


The documentation for this class was generated from the following files: