Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Fun4AllEVIOInputManager.cc
Go to the documentation of this file.
2 
3 #include "MainDaqParser.h"
4 #include "CodaInputManager.h"
5 #include "DecoData.h"
6 
7 //#include <event/EVIO_Event.h>
18 
19 #include <fun4all/Fun4AllServer.h>
22 #include <fun4all/Fun4AllUtils.h>
23 
24 #include <ffaobjects/RunHeader.h>
26 
27 #include <phool/getClass.h>
28 #include <phool/PHCompositeNode.h>
29 #include <phool/PHDataNode.h>
30 #include <phool/recoConsts.h>
31 #include <cstdlib>
32 #include <memory>
33 
34 //#include <boost/tokenizer.hpp>
35 //#include <boost/foreach.hpp>
36 //#include <boost/lexical_cast.hpp>
37 
38 using namespace std;
39 
40 Fun4AllEVIOInputManager::Fun4AllEVIOInputManager(const string &name, const string &topnodename) :
41  Fun4AllInputManager(name, ""),
42  segment(-999),
43  isopen(0),
44  events_total(0),
45  events_thisfile(0),
46  topNodeName(topnodename),
47  //evt(NULL),
48  //save_evt(NULL),
49  parser(new MainDaqParser())
50  //coda(NULL)
51 {
53  topNode = se->topNode(topNodeName.c_str());
54  PHNodeIterator iter(topNode);
55 
57  PHCompositeNode* runNode = static_cast<PHCompositeNode*>(iter.findFirst("PHCompositeNode", "RUN"));
58  if (!runNode) {
59  runNode = new PHCompositeNode("RUN");
60  topNode->addNode(runNode);
61  }
62 
63  PHIODataNode<PHObject>* runHeaderNode = new PHIODataNode<PHObject>(new SQRun_v1(), "SQRun", "PHObject");
64  runNode->addNode(runHeaderNode);
65 
66  PHIODataNode<PHObject>* spillNode = new PHIODataNode<PHObject>(new SQSpillMap_v1(), "SQSpillMap", "PHObject");
67  runNode->addNode(spillNode);
68 
69  PHIODataNode<PHObject>* paramDecoNode = new PHIODataNode<PHObject>(new SQParamDeco_v1(), "SQParamDeco", "PHObject");
70  runNode->addNode(paramDecoNode);
71 
73  PHCompositeNode* eventNode = static_cast<PHCompositeNode*>(iter.findFirst("PHCompositeNode", "DST"));
74  if (!eventNode) {
75  eventNode = new PHCompositeNode("DST");
76  topNode->addNode(eventNode);
77  }
78 
79  PHIODataNode<PHObject>* eventHeaderNode = new PHIODataNode<PHObject>(new SQEvent_v1(),"SQEvent", "PHObject");
80  eventNode->addNode(eventHeaderNode);
81 
82  PHIODataNode<PHObject>* hitNode = new PHIODataNode<PHObject>(new SQHitVector_v1(), "SQHitVector", "PHObject");
83  eventNode->addNode(hitNode);
84 
85  PHIODataNode<PHObject>* triggerhitNode = new PHIODataNode<PHObject>(new SQHitVector_v1(), "SQTriggerHitVector", "PHObject");
86  eventNode->addNode(triggerhitNode);
87 
88  //PHDataNode<Event> *PrdfNode = dynamic_cast<PHDataNode<Event> *>(iter.findFirst("PHDataNode","EVIO"));
89  //if (!PrdfNode)
90  // {
91  // PHDataNode<Event> *newNode = new PHDataNode<Event>(evt,"EVIO","Event");
92  // topNode->addNode(newNode);
93  // }
94  syncobject = new SyncObjectv2();
95  return ;
96 }
97 
99 {
100  if (isopen)
101  {
102  fileclose();
103  }
104  if (parser) delete parser;
105  delete syncobject;
106 }
107 
108 int Fun4AllEVIOInputManager::fileopen(const string &filenam)
109 {
110  if (isopen)
111  {
112  cout << "Closing currently open file "
113  << filename
114  << " and opening " << filenam << endl;
115  fileclose();
116  }
117  filename = filenam;
118  //FROG frog;
119  //string fname = frog.location(filename.c_str());
120  string fname = filename;
121  if (verbosity > 0)
122  {
123  cout << ThisName << ": opening file " << filename.c_str() << endl;
124  }
125 
126  events_thisfile = 0;
128  int status = parser->OpenCodaFile(fname);
129  if (status!=0) {
130  cout << PHWHERE << ThisName << ": could not open file " << fname << " with status = " << status << "." << endl;
131  return -1;
132  }
133  //pair<int, int> runseg = Fun4AllUtils::GetRunSegment(fname);
134  //segment = runseg.second;
135  segment = 0;
136  isopen = 1;
137  AddToFileOpened(fname); // add file to the list of files which were opened
138  return 0;
139 }
140 
142 {
143  //cout << "Fun4AllEVIOInputManager::run(): " << nevents << endl;
144  readagain:
145  if (!isopen)
146  {
147  if (filelist.empty())
148 
149  {
150  if (verbosity > 0)
151  {
152  cout << Name() << ": No Input file open" << endl;
153  }
154  return -1;
155  }
156  else
157  {
158  if (OpenNextFile())
159  {
160  cout << Name() << ": No Input file from filelist opened" << endl;
161  return -1;
162  }
163  }
164  }
165  if (verbosity > 3)
166  {
167  cout << "Getting Event from " << Name() << endl;
168  }
169  // cout << "running event " << nevents << endl;
170  //PHNodeIterator iter(topNode);
171  SQRun* run_header = findNode::getClass<SQRun>(topNode, "SQRun");
172  if (!run_header) {
174  }
175  SQSpillMap* spill_map = findNode::getClass<SQSpillMap>(topNode, "SQSpillMap");
176  if (!spill_map) {
178  }
179  SQEvent* event_header = findNode::getClass<SQEvent>(topNode, "SQEvent");
180  if (!event_header) {
182  }
183 
184  SQHitVector* hit_vec = findNode::getClass<SQHitVector>(topNode, "SQHitVector");
185  if (!hit_vec) {
187  }
188 
189  SQHitVector* trig_hit_vec = findNode::getClass<SQHitVector>(topNode, "SQTriggerHitVector");
190  if (!trig_hit_vec) {
192  }
193 
194  //PHDataNode<Event> *PrdfNode = dynamic_cast<PHDataNode<Event> *>(iter.findFirst("PHDataNode","EVIO"));
195  EventData* ed = 0;
196  SpillData* sd = 0;
197  RunData * rd = 0;
198 // if (save_evt) // if an event was pushed back, copy saved pointer and reset save_evt pointer
199 // {
200 // cerr << "!!ERROR!! save_evt is not supported yet." << endl;
201 // evt = save_evt;
202 // save_evt = NULL;
203 // events_thisfile--;
204 // events_total--;
205 // }
206 // else
207  {
208  //int * data_ptr = NULL;
209  //unsigned int coda_id = 0;
210  //if(parser->coda->NextCodaEvent(coda_id, data_ptr))
211  // evt = new EVIO_Event(data_ptr);
212  parser->NextPhysicsEvent(ed, sd, rd);
213  }
214  if (!ed)
215  {
216  fileclose();
217  goto readagain;
218  }
219  if (verbosity > 3)
220  {
221  cout << ThisName << ": run " << rd->run_id << ", spill " << sd->spill_id << ", event " << ed->event.eventID << endl;
222  }
223 
224  if (events_total == 0) {
225  SQParamDeco* sqpd = findNode::getClass<SQParamDeco>(topNode, "SQParamDeco");
226  if (!sqpd) return Fun4AllReturnCodes::ABORTEVENT;
227  DecoParam* dp = &parser->dec_par;
231  }
232 
233  events_total++;
234  events_thisfile++;
235 
236  SetRunNumber (rd->run_id);
242  syncobject->RunNumber (rd->run_id);
244 
245  run_header->set_run_id (rd->run_id);
246  run_header->set_unix_time_begin(rd->utime_b);
247  run_header->set_unix_time_end (rd->utime_e);
248  for (int ii = 0; ii < 5; ii++) {
249  run_header->set_fpga_enabled (ii, rd->fpga_enabled [ii]);
250  run_header->set_fpga_prescale(ii, rd->fpga_prescale[ii]);
251  run_header->set_nim_enabled (ii, rd-> nim_enabled [ii]);
252  }
253  for (int ii = 0; ii < 3; ii++) {
254  run_header->set_nim_prescale(ii, rd->nim_prescale[ii]);
255  }
256  run_header->set_run_desc (rd->run_desc);
257  run_header->set_n_fee_event (rd->n_fee_event);
258  run_header->set_n_fee_prescale (rd->n_fee_prescale);
259  run_header->set_n_run_desc (rd->n_run_desc);
260  run_header->set_n_spill (rd->n_spill);
261  run_header->set_n_evt_all (rd->n_evt_all);
262  run_header->set_n_evt_dec (rd->n_evt_dec);
263  run_header->set_n_phys_evt (rd->n_phys_evt);
264  run_header->set_n_phys_evt_bad (rd->n_phys_evt_bad);
265  run_header->set_n_flush_evt (rd->n_flush_evt);
266  run_header->set_n_flush_evt_bad(rd->n_flush_evt_bad);
267  run_header->set_n_hit (rd->n_hit);
268  run_header->set_n_t_hit (rd->n_t_hit);
269  run_header->set_n_hit_bad (rd->n_hit_bad);
270  run_header->set_n_t_hit_bad (rd->n_t_hit_bad);
271  run_header->set_n_v1495 (rd->n_v1495);
272  run_header->set_n_v1495_d1ad (rd->n_v1495_d1ad);
273  run_header->set_n_v1495_d2ad (rd->n_v1495_d2ad);
274  run_header->set_n_v1495_d3ad (rd->n_v1495_d3ad);
275 
276  SQSpill* spill = spill_map->get(sd->spill_id);
277  if (! spill) {
278  spill = new SQSpill_v2();
279  spill->set_spill_id (sd->spill_id);
280  spill->set_run_id (sd->run_id );
281  spill->set_target_pos (sd->targ_pos);
282  spill->set_bos_coda_id (sd->bos_coda_id );
283  spill->set_bos_vme_time(sd->bos_vme_time);
284  spill->set_eos_coda_id (sd->eos_coda_id );
285  spill->set_eos_vme_time(sd->eos_vme_time);
286  for (ScalerDataList::iterator it = sd->list_scaler.begin(); it != sd->list_scaler.end(); it++) {
287  SQScaler_v1 obj;
288  obj.set_name (it->name );
289  obj.set_count(it->value);
290  if (it->type == MainDaqParser::TYPE_BOS) {
291  obj.set_type(SQScaler::BOS);
292  spill->get_bos_scaler_list()->insert(it->name, &obj);
293  } else {
294  obj.set_type(SQScaler::EOS);
295  spill->get_eos_scaler_list()->insert(it->name, &obj);
296  }
297  }
298  for (SlowControlDataList::iterator it = sd->list_slow_cont.begin(); it != sd->list_slow_cont.end(); it++) {
299  SQSlowCont_v1 obj;
300  obj.set_time_stamp(it->ts );
301  obj.set_name (it->name );
302  obj.set_value (it->value);
303  obj.set_type (it->type );
304  spill->get_slow_cont_list()->insert(it->name, &obj);
305  }
306  spill_map->insert(spill);
307  }
308 
309  event_header->set_run_id (ed->event.runID );
310  event_header->set_spill_id (ed->event.spillID);
311  event_header->set_event_id (ed->event.eventID);
312  event_header->set_coda_event_id(ed->event.codaEventID);
313  event_header->set_data_quality (ed->event.dataQuality);
314  event_header->set_vme_time (ed->event.vmeTime);
315  event_header->set_trigger (SQEvent::MATRIX1, ed->event.MATRIX[0]);
316  event_header->set_trigger (SQEvent::MATRIX2, ed->event.MATRIX[1]);
317  event_header->set_trigger (SQEvent::MATRIX3, ed->event.MATRIX[2]);
318  event_header->set_trigger (SQEvent::MATRIX4, ed->event.MATRIX[3]);
319  event_header->set_trigger (SQEvent::MATRIX5, ed->event.MATRIX[4]);
320  event_header->set_trigger (SQEvent::NIM1 , ed->event.NIM [0]);
321  event_header->set_trigger (SQEvent::NIM2 , ed->event.NIM [1]);
322  event_header->set_trigger (SQEvent::NIM3 , ed->event.NIM [2]);
323  event_header->set_trigger (SQEvent::NIM4 , ed->event.NIM [3]);
324  event_header->set_trigger (SQEvent::NIM5 , ed->event.NIM [4]);
325  for (int ii=0; ii<5; ii++) {
326  event_header->set_raw_matrix (ii, ed->event.RawMATRIX [ii]);
327  event_header->set_after_inh_matrix(ii, ed->event.AfterInhMATRIX[ii]);
328  }
329  for (int ii=0; ii<4; ii++) event_header->set_qie_presum(ii, ed->event.sums[ii]);
330  event_header->set_qie_trigger_count(ed->event.triggerCount);
331  event_header->set_qie_turn_id (ed->event.turnOnset);
332  event_header->set_qie_rf_id (ed->event.rfOnset);
333  for (int ii=0; ii<33; ii++) event_header->set_qie_rf_intensity(ii-16, ed->event.rf[ii]);
334  event_header->set_flag_v1495 (ed->event.flag_v1495);
335  event_header->set_n_board_qie (ed->n_qie );
336  event_header->set_n_board_v1495 (ed->n_v1495 );
337  event_header->set_n_board_taiwan (ed->n_tdc );
338  event_header->set_n_board_trig_bit (ed->n_trig_b);
339  event_header->set_n_board_trig_count(ed->n_trig_c);
340 
341  for (HitDataList::iterator it = ed->list_hit.begin(); it != ed->list_hit.end(); it++) {
342  HitData* hd = &*it;
343  SQHit* hit = new SQHit_v1();
344  hit->set_hit_id (hd->id );
345  hit->set_detector_id(hd->det );
346  hit->set_element_id (hd->ele );
347  hit->set_level (hd->lvl );
348  hit->set_tdc_time (hd->time);
349  hit_vec->push_back(hit);
350  delete hit;
351  }
352 
353  for (HitDataList::iterator it = ed->list_hit_trig.begin(); it != ed->list_hit_trig.end(); it++) {
354  HitData* hd = &*it;
355  SQHit* hit = new SQHit_v1();
356  hit->set_hit_id (hd->id );
357  hit->set_detector_id(hd->det );
358  hit->set_element_id (hd->ele );
359  hit->set_level (hd->lvl );
360  hit->set_tdc_time (hd->time);
361  trig_hit_vec->push_back(hit);
362  delete hit;
363  }
364 
365  // check if the local SubsysReco discards this event
367  {
368  ResetEvent();
369  goto readagain;
370  }
371  return 0;
372 }
373 
375 {
376  if (!isopen)
377  {
378  cout << Name() << ": fileclose: No Input file open" << endl;
379  return -1;
380  }
381 
382  parser->End();
383  //delete parser;
384  //parser = NULL;
385  isopen = 0;
386  // if we have a file list, move next entry to top of the list
387  // or repeat the same entry again
388  if (!filelist.empty())
389  {
390  if (repeat)
391  {
392  filelist.push_back(*(filelist.begin()));
393  if (repeat > 0)
394  {
395  repeat--;
396  }
397  }
398  filelist.pop_front();
399  }
400 
401  return 0;
402 }
403 
404 
405 void
406 Fun4AllEVIOInputManager::Print(const string &what) const
407 {
409  return ;
410 }
411 
412 int
414 {
415  while (!filelist.empty())
416  {
417  list<string>::const_iterator iter = filelist.begin();
418  if (verbosity)
419  {
420  cout << PHWHERE << " opening next file: " << *iter << endl;
421  }
422  if (fileopen(*iter))
423  {
424  cout << PHWHERE << " could not open file: " << *iter << endl;
425  filelist.pop_front();
426  }
427  else
428  {
429  return 0;
430  }
431 
432  }
433  return -1;
434 }
435 
436 int
438 {
439  //PHNodeIterator iter(topNode);
440  //PHDataNode<Event> *PrdfNode = dynamic_cast<PHDataNode<Event> *>(iter.findFirst("PHDataNode","EVIO"));
441  //PrdfNode->setData(NULL); // set pointer in Node to NULL before deleting it
442  //delete evt;
443  //evt = NULL;
444  syncobject->Reset();
445  return 0;
446 }
447 
448 int
450 {
451  cerr << "!!ERROR!! PushBackEvents(): Not implemented yet." << endl;
452  // PushBackEvents is supposedly pushing events back on the stack which works
453  // easily with root trees (just grab a different entry) but hard in these HepMC ASCII files.
454  // A special case is when the synchronization fails and we need to only push back a single
455  // event. In this case we save the evt pointer as save_evt which is used in the run method
456  // instead of getting the next event.
457 // if (i > 0)
458 // {
459 // if (i == 1 && evt) // check on evt pointer makes sure it is not done from the cmd line
460 // {
461 // save_evt = evt;
462 // return 0;
463 // }
464 // cout << PHWHERE << ThisName
465 // << " Fun4AllEVIOInputManager cannot push back " << i << " events into file"
466 // << endl;
467 // return -1;
468 // }
469 // if (!parser->coda)
470 // {
471 // cout << PHWHERE << ThisName
472 // << " no file open" << endl;
473 // return -1;
474 // }
475  // Skipping events is implemented as
476  // pushing a negative number of events on the stack, so in order to implement
477  // the skipping of events we read -i events.
478 // int nevents = -i; // negative number of events to push back -> skip num events
479 // int errorflag = 0;
480 // while (nevents > 0 && ! errorflag)
481 // {
482 // int * data_ptr = NULL;
483 // unsigned int coda_id = 0;
484 // if(parser->coda->NextCodaEvent(coda_id, data_ptr))
485 // evt = new EVIO_Event(data_ptr);
486 // if (! evt)
487 // {
488 // cout << "Error after skipping " << i - nevents
489 // << " file exhausted?" << endl;
490 // errorflag = -1;
491 // fileclose();
492 // }
493 // else
494 // {
495 // if (verbosity > 3)
496 // {
497 // //TODO implement this
498 // //cout << "Skipping evt no: " << evt->getEvtSequence() << endl;
499 // }
500 // }
501 // delete evt;
502 // nevents--;
503 // }
504 // return errorflag;
505  return -1;
506 }
507 
508 int
510 {
511  // here we copy the sync object from the current file to the
512  // location pointed to by mastersync. If mastersync is a 0 pointer
513  // the syncobject is cloned. If mastersync allready exists the content
514  // of syncobject is copied
515  if (!(*mastersync))
516  {
517  if (syncobject) *mastersync = syncobject->clone();
518  }
519  else
520  {
521  *(*mastersync) = *syncobject; // copy syncobject content
522  }
524 }
525 
526 int
528 {
529  if (!mastersync)
530  {
531  cout << PHWHERE << Name() << " No MasterSync object, cannot perform synchronization" << endl;
532  cout << "Most likely your first file does not contain a SyncObject and the file" << endl;
533  cout << "opened by the Fun4AllDstInputManager with Name " << Name() << " has one" << endl;
534  cout << "Change your macro and use the file opened by this input manager as first input" << endl;
535  cout << "and you will be okay. Fun4All will not process the current configuration" << endl << endl;
537  }
538  int iret = syncobject->Different(mastersync);
539  if (iret)
540  {
541  cout << "big problem" << endl;
542  exit(1);
543  }
545 }
546 
547 void Fun4AllEVIOInputManager::SetOnline(const bool is_online)
548 {
549  parser->dec_par.is_online = is_online;
550  parser->GetCoda()->SetOnline(is_online);
551 }
552 
554 {
555  parser->dec_par.sampling = factor;
556 }
557 
558 void Fun4AllEVIOInputManager::DirParam(const std::string dir)
559 {
560  parser->dec_par.dir_param = dir;
561 }
562 
564 {
565  parser->dec_par.time_wait = sec;
566 }
virtual void set_run_id(const int a)
Definition: SQSpill.h:33
virtual void set_fpga_prescale(const int chan, const int a)
Definition: SQRun.h:48
int n_phys_evt
Definition: DecoData.h:93
virtual void Print(const std::string &what="ALL") const
int n_v1495_d3ad
Definition: DecoData.h:104
SlowControlDataList list_slow_cont
Definition: DecoData.h:155
int verbosity
The verbosity level. 0 means not verbose at all.
Definition: Fun4AllBase.h:75
Fun4AllEVIOInputManager(const std::string &name="DUMMY", const std::string &topnodename="TOP")
virtual void set_nim_prescale(const int chan, const int a)
Definition: SQRun.h:51
virtual void set_type(const ScalerType_t a)
Definition: SQScaler_v1.h:23
void SetOnline(const bool is_online)
Fun4AllSyncManager * mySyncManager
virtual SyncObject * clone() const
Virtual copy constructor.
Definition: SyncObject.cc:28
virtual void EventNumber(const int)
set Event Number
Definition: SyncObject.h:36
int utime_e
Definition: DecoData.h:75
virtual PHObject * insert(const std::string key, const PHObject *item)
Definition: SQStringMap.h:36
ChanMapV1495 chan_map_v1495
Definition: DecoParam.h:26
virtual void set_unix_time_end(const int a)
Definition: SQRun.h:39
virtual void RunNumber(const int)
set Run Number
Definition: SyncObject.h:43
virtual void Reset()
Clear Sync.
Definition: SyncObject.cc:9
virtual void set_n_v1495_d1ad(const int a)
Definition: SQRun.h:102
int n_v1495
Definition: DecoData.h:101
virtual void set_n_v1495(const int a)
Definition: SQRun.h:99
PHNode * findFirst(const std::string &, const std::string &)
virtual void set_bos_vme_time(const int a)
Definition: SQSpill.h:45
std::list< std::string > filelist
int vmeTime
Definition: DecoData.h:188
virtual void set_after_inh_matrix(const unsigned short i, const bool a)=0
int utime_b
Definition: DecoData.h:74
#define PHWHERE
Definition: phool.h:23
virtual void set_run_desc(const std::string a)
Definition: SQRun.h:54
virtual void set_run_id(const int a)=0
virtual void set_qie_rf_intensity(const short i, const int a)=0
int n_v1495_d1ad
Definition: DecoData.h:102
bool NextPhysicsEvent(EventData *&ed, SpillData *&sd, RunData *&rd)
void PretendSpillInterval(const int sec)
int spillID
Definition: DecoData.h:186
int OpenCodaFile(const std::string fname, const long file_size_min=32768, const int sec_wait=15, const int n_wait=40)
virtual void set_count(const int a)
Definition: SQScaler_v1.h:29
virtual void set_n_hit_bad(const int a)
Definition: SQRun.h:93
virtual void set_n_board_qie(const short a)=0
void CurrentEvent(const int evt)
virtual void set_tdc_time(const float a)
Definition: SQHit.h:55
ChanMapTaiwan chan_map_taiwan
Definition: DecoParam.h:25
virtual void set_n_flush_evt(const int a)
Definition: SQRun.h:81
virtual void set_bos_coda_id(const int a)
Definition: SQSpill.h:42
static Fun4AllServer * instance()
unsigned int bos_coda_id
Definition: DecoData.h:145
PHBoolean addNode(PHNode *)
Fun4AllServer * se
int fpga_prescale[5]
Definition: DecoData.h:79
int n_hit
Definition: DecoData.h:97
virtual void set_n_evt_dec(const int a)
Definition: SQRun.h:72
virtual void set_level(const short a)
Definition: SQHit.h:52
int n_spill
Definition: DecoData.h:90
An SQ interface class to hold one detector hit.
Definition: SQHit.h:20
int n_evt_dec
Definition: DecoData.h:92
void Print(const std::string &what="ALL") const
int n_hit_bad
Definition: DecoData.h:99
virtual void set_event_id(const int a)=0
int sampling
Definition: DecoParam.h:21
virtual void EventCounter(const int)
set Event Counter
Definition: SyncObject.h:33
short ele
Definition: DecoData.h:174
unsigned int targ_pos
Definition: DecoData.h:144
virtual void set_flag_v1495(const short a)=0
virtual void set_n_fee_event(const int a)
Definition: SQRun.h:57
int n_evt_all
Definition: DecoData.h:91
int fileopen(const std::string &filenam)
virtual void set_detector_id(const short a)
Definition: SQHit.h:43
bool is_online
Definition: DecoParam.h:20
DecoParam dec_par
Definition: MainDaqParser.h:70
int n_t_hit
Definition: DecoData.h:98
unsigned int n_trig_c
Definition: DecoData.h:210
int eventID
Definition: DecoData.h:183
std::string GetParamID()
Definition: RunParamBase.h:25
virtual SQStringMap * get_bos_scaler_list()
Return the list of scaler variables read out at BOS.
Definition: SQSpill.h:53
int runID
Definition: DecoData.h:185
virtual void set_n_board_taiwan(const short a)=0
int AfterInhMATRIX[5]
Definition: DecoData.h:190
int SyncIt(const SyncObject *mastersync)
virtual void set_qie_presum(const unsigned short i, const int a)=0
int n_phys_evt_bad
Definition: DecoData.h:94
int RawMATRIX[5]
Definition: DecoData.h:189
virtual void set_n_phys_evt(const int a)
Definition: SQRun.h:75
virtual void set_type(const std::string a)
Definition: SQSlowCont_v1.h:32
virtual void set_qie_turn_id(const int a)=0
short flag_v1495
Definition: DecoData.h:199
int GetSyncObject(SyncObject **mastersync)
unsigned int n_qie
Definition: DecoData.h:206
virtual void set_fpga_enabled(const int chan, const int a)
Definition: SQRun.h:42
tuple nevents
Definition: submit_bnl.py:11
unsigned int eos_vme_time
Definition: DecoData.h:148
virtual const std::string Name() const
Returns the name of this module.
Definition: Fun4AllBase.h:23
virtual void set_qie_trigger_count(const int a)=0
void SegmentNumber(const int iseg)
virtual void set_spill_id(const int a)
Definition: SQSpill.h:36
int n_fee_event
Definition: DecoData.h:87
unsigned int rf[33]
Definition: DecoData.h:198
virtual void SegmentNumber(const int)
set Segment Number
Definition: SyncObject.h:40
virtual SQStringMap * get_eos_scaler_list()
Return the list of scaler variables read out at EOS.
Definition: SQSpill.h:54
virtual void set_trigger(const SQEvent::TriggerMask i, const bool a)=0
virtual void set_raw_matrix(const unsigned short i, const bool a)=0
int codaEventID
Definition: DecoData.h:184
double time
Definition: DecoData.h:176
virtual void set_target_pos(const short a)
Definition: SQSpill.h:39
ChanMapScaler chan_map_scaler
Definition: DecoParam.h:27
ScalerDataList list_scaler
Definition: DecoData.h:156
An SQ interface class to hold the data of one spill.
Definition: SQSpill.h:19
virtual void set_nim_enabled(const int chan, const int a)
Definition: SQRun.h:45
virtual void set_variable(const std::string name, const std::string value)=0
int run(const int nevents=0)
virtual void set_data_quality(const int a)=0
int time_wait
Definition: DecoParam.h:23
virtual void set_unix_time_begin(const int a)
Definition: SQRun.h:36
virtual int Different(const SyncObject *other) const
Definition: SyncObject.cc:47
virtual void set_n_spill(const int a)
Definition: SQRun.h:66
virtual int Verbosity() const
Gets the verbosity of this module.
Definition: Fun4AllBase.h:64
virtual void push_back(const SQHit *hit)
Definition: SQHitVector.h:55
virtual void set_vme_time(const int a)=0
PHCompositeNode * topNode() const
Definition: Fun4AllServer.h:59
virtual void set_value(const std::string a)
Definition: SQSlowCont_v1.h:29
CodaInputManager * GetCoda()
Definition: MainDaqParser.h:65
EventInfo event
Definition: DecoData.h:212
SQParamDeco_v1.h.
Definition: SQParamDeco_v1.h:6
virtual void set_n_v1495_d2ad(const int a)
Definition: SQRun.h:105
virtual void set_name(const std::string a)
Definition: SQSlowCont_v1.h:26
void DirParam(const std::string dir)
virtual void set_run_id(const int a)
Definition: SQRun.h:33
virtual void set_n_phys_evt_bad(const int a)
Definition: SQRun.h:78
unsigned int n_v1495
Definition: DecoData.h:207
virtual void set_eos_coda_id(const int a)
Definition: SQSpill.h:48
int n_fee_prescale
Definition: DecoData.h:88
int fpga_enabled[5]
Definition: DecoData.h:77
virtual void set_coda_event_id(const int a)=0
std::string ThisName
Definition: Fun4AllBase.h:72
An SQ interface class to hold a list of SQHit objects.
Definition: SQHitVector.h:32
virtual void set_n_fee_prescale(const int a)
Definition: SQRun.h:60
short lvl
Definition: DecoData.h:175
An SQ interface class to hold one event header.
Definition: SQEvent.h:17
int n_flush_evt_bad
Definition: DecoData.h:96
virtual void SetRunNumber(const int runno)
void PrdfEvents(const int i)
virtual void set_n_flush_evt_bad(const int a)
Definition: SQRun.h:84
short det
Definition: DecoData.h:173
std::string GetMapID()
Definition: RunParamBase.h:27
virtual void set_name(const std::string a)
Definition: SQScaler_v1.h:26
int n_flush_evt
Definition: DecoData.h:95
unsigned int rfOnset
Definition: DecoData.h:197
HitDataList list_hit_trig
Definition: DecoData.h:214
virtual void set_n_v1495_d3ad(const int a)
Definition: SQRun.h:108
virtual void set_spill_id(const int a)=0
int nim_prescale[3]
Definition: DecoData.h:80
virtual void set_eos_vme_time(const int a)
Definition: SQSpill.h:51
An SQ interface class to hold the run-level info.
Definition: SQRun.h:18
virtual void set_n_hit(const int a)
Definition: SQRun.h:87
virtual void set_hit_id(const int a)
Definition: SQHit.h:40
void SetOnline(const bool val)
int n_t_hit_bad
Definition: DecoData.h:100
virtual void set_n_board_v1495(const short a)=0
virtual void set_n_board_trig_bit(const short a)=0
virtual SQStringMap * get_slow_cont_list()
Return the list of slow control variables.
Definition: SQSpill.h:56
void AddToFileOpened(const std::string &filename)
virtual void set_qie_rf_id(const int a)=0
int NIM[5]
Definition: DecoData.h:191
int id
Definition: DecoData.h:169
virtual void set_element_id(const short a)
Definition: SQHit.h:46
void EventSamplingFactor(const int factor)
int dataQuality
Definition: DecoData.h:187
SQParamDeco.h.
Definition: SQParamDeco.h:16
unsigned int n_tdc
Definition: DecoData.h:208
unsigned int spill_id
Definition: DecoData.h:141
An SQ interface class to hold a list of SQSpill objects.
Definition: SQSpillMap.h:19
unsigned int run_id
Definition: DecoData.h:143
std::string run_desc
Definition: DecoData.h:85
int run_id
Definition: DecoData.h:73
int n_v1495_d2ad
Definition: DecoData.h:103
virtual void set_n_t_hit_bad(const int a)
Definition: SQRun.h:96
int MATRIX[5]
Definition: DecoData.h:192
virtual void set_n_board_trig_count(const short a)=0
virtual void set_time_stamp(const std::string a)
Definition: SQSlowCont_v1.h:23
virtual SQSpill * insert(const SQSpill *hit)
Insert the given SQSpill object.
Definition: SQSpillMap.h:43
unsigned int n_trig_b
Definition: DecoData.h:209
int n_run_desc
Definition: DecoData.h:89
virtual void set_n_evt_all(const int a)
Definition: SQRun.h:69
HitDataList list_hit
Definition: DecoData.h:213
virtual void set_n_t_hit(const int a)
Definition: SQRun.h:90
unsigned int triggerCount
Definition: DecoData.h:195
unsigned int bos_vme_time
Definition: DecoData.h:146
virtual void set_n_run_desc(const int a)
Definition: SQRun.h:63
std::string dir_param
Definition: DecoParam.h:19
unsigned int sums[4]
Definition: DecoData.h:194
unsigned int turnOnset
Definition: DecoData.h:196
virtual const SQSpill * get(unsigned int idkey) const
Return the SQSpill entry having spill ID = &#39;idkey&#39;. Return &#39;0&#39; if no entry exists.
Definition: SQSpillMap.h:41
int verbose
Definition: DecoParam.h:22
unsigned int eos_coda_id
Definition: DecoData.h:147