CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CmsShowNavigator.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: newVersion
4 // Class : CmsShowNavigator
5 //
6 
9 
11 
12 // system include files
13 #include <functional>
14 #include "boost/regex.hpp"
15 #include "TROOT.h"
16 #include "TTree.h"
17 #include "TFile.h"
18 #include "TError.h"
19 #include "TGTextEntry.h"
20 #include "TGNumberEntry.h"
21 #include "TBranch.h"
22 #include "TAxis.h"
23 
24 #include "TApplication.h"
25 #include "TSystem.h"
26 #include "TObject.h"
27 
28 // user include files
40 
42 
43 //
44 // constructors and destructor
45 //
47  : FWNavigatorBase(main),
48  m_currentEvent(0),
49 
50  m_filterState(kOff),
51  m_filterMode(kOr),
52 
53  m_filesNeedUpdate(true),
54  m_newFileOnNextEvent(false),
55 
56  m_maxNumberOfFilesToChain(1),
57 
58  m_main(main),
59  m_guiFilter(nullptr) {
60  m_guiFilter = new FWGUIEventFilter(this);
61  filterStateChanged_.connect(std::bind(&FWGUIEventFilter::updateFilterStateLabel, m_guiFilter, std::placeholders::_1));
62 }
63 
65 
66 //
67 // member functions
68 //
69 
71  fwLog(fwlog::kDebug) << "CmsShowNavigator::openFile [" << fileName << "]" << std::endl;
72  FWFileEntry* newFile = nullptr;
73  try {
74  newFile = new FWFileEntry(fileName, m_main.getVersionCheck(), m_main.getGlobalTagCheck());
75  } catch (std::exception& iException) {
76  fwLog(fwlog::kError) << "Navigator::openFile ecaught exception FWFileEntry constructor " << iException.what()
77  << std::endl;
78 
79  delete newFile;
80  return false;
81  }
82 
83  try {
84  // delete all previous files
85  while (!m_files.empty()) {
86  FWFileEntry* file = m_files.front();
87  m_files.pop_front();
88  file->closeFile();
89  delete file;
90  }
91 
92  m_files.push_back(newFile);
94 
95  // set filters
96  for (std::list<FWEventSelector*>::iterator i = m_selectors.begin(); i != m_selectors.end(); ++i)
97  newFile->filters().push_back(new FWFileEntry::Filter(*i));
98 
99  if (m_filterState != kOff)
101 
102  return true;
103  } catch (std::exception& iException) {
104  fwLog(fwlog::kError) << "Navigator::openFile caught exception " << iException.what() << std::endl;
105  return false;
106  }
107 }
108 
109 bool CmsShowNavigator::appendFile(const std::string& fileName, bool checkFileQueueSize, bool live) {
110  fwLog(fwlog::kDebug) << "CmsShowNavigator::appendFile [" << fileName << "]" << std::endl;
111  FWFileEntry* newFile = nullptr;
112  try {
113  newFile = new FWFileEntry(fileName, m_main.getVersionCheck(), m_main.getGlobalTagCheck());
114  } catch (std::exception& iException) {
115  fwLog(fwlog::kError) << "Navigator::appendFile caught exception FWFileEntry constructor " << iException.what()
116  << std::endl;
117  delete newFile;
118  return false;
119  }
120 
121  try {
122  if (checkFileQueueSize) {
123  int toErase = m_files.size() - (m_maxNumberOfFilesToChain + 1);
124  while (toErase > 0) {
125  FileQueue_i si = m_files.begin();
126  if (m_currentFile == si)
127  si++;
128  FWFileEntry* file = *si;
129  file->closeFile();
130  delete file;
131 
132  m_files.erase(si);
133  --toErase;
134  }
135 
136  if (m_files.size() > m_maxNumberOfFilesToChain)
137  fwLog(fwlog::kWarning) << " " << m_files.size() << " chained files more than maxNumberOfFilesToChain \n"
138  << m_maxNumberOfFilesToChain << std::endl;
139  }
140 
141  m_files.push_back(newFile);
142 
143  // Needed for proper handling of first registered file when -port option is in effect.
144  if (!m_currentFile.isSet())
146 
147  // set filters
148  for (std::list<FWEventSelector*>::iterator i = m_selectors.begin(); i != m_selectors.end(); ++i)
149  newFile->filters().push_back(new FWFileEntry::Filter(*i));
150 
151  if (m_filterState != kOff)
153 
154  } catch (std::exception& iException) {
155  std::cerr << "Navigator::openFile caught exception " << iException.what() << std::endl;
156  return false;
157  }
158 
159  return true;
160 }
161 
162 //______________________________________________________________________________
163 
166  int cnt = 0;
167  for (FileQueue_i i = m_files.begin(); i != m_files.end(); i++) {
168  if (i == fi)
169  break;
170  cnt++;
171  }
172 
173  fwLog(fwlog::kDebug) << "CmsShowNavigator::setCurrentFile [" << (*fi)->file()->GetName() << "] file idx in chain ["
174  << cnt << "/" << m_files.size() - 1 << "]" << std::endl;
175  } else {
176  fwLog(fwlog::kInfo) << "Set current file to " << (*fi)->file()->GetName() << ".\n";
177  }
178 
179  m_currentFile = fi;
180  fileChanged_.emit((*m_currentFile)->file());
181 }
182 
184  if (fi != m_currentFile)
185  setCurrentFile(fi);
186 
188  int total = (*fi)->tree()->GetEntries();
189  fwLog(fwlog::kDebug) << "CmsShowNavigator::goTo current file event [" << event << "/" << total - 1 << "]"
190  << std::endl;
191 
192  CpuInfo_t cpuInfo;
193  MemInfo_t memInfo;
194  ProcInfo_t procInfo;
195  gSystem->GetCpuInfo(&cpuInfo, 0);
196  gSystem->GetMemInfo(&memInfo);
197  gSystem->GetProcInfo(&procInfo);
198 
199  time_t curtime;
200  time(&curtime);
201 
202  fwLog(fwlog::kDebug) << "Current Time: " << ctime(&curtime);
203  fwLog(fwlog::kDebug) << "memInfo.fMemUsed \t" << memInfo.fMemUsed << std::endl;
204  fwLog(fwlog::kDebug) << "memInfo.fSwapUsed\t" << memInfo.fSwapUsed << std::endl;
205  fwLog(fwlog::kDebug) << "procInfo.fMemResident\t" << procInfo.fMemResident << std::endl;
206  fwLog(fwlog::kDebug) << "procInfo.fMemVirtual\t" << procInfo.fMemVirtual << std::endl;
207  fwLog(fwlog::kDebug) << "cpuInfo.fLoad1m \t" << cpuInfo.fLoad1m << std::endl;
208  fwLog(fwlog::kDebug) << "cpuInfo.fLoad5m \t" << cpuInfo.fLoad5m << std::endl;
209  }
210 
211  if (FWTTreeCache::IsLogging()) {
212  printf("FWTTreeCache statistics before going to event %d:\n", event);
213  (*m_currentFile)->tree()->PrintCacheStats(); // ("cachedbranches");
214  }
215 
216  (*m_currentFile)->event()->to(event);
217  (*m_currentFile)->tree()->LoadTree(event);
219 
220  newEvent_.emit();
221 }
222 
224  for (FileQueue_i file = m_files.begin(); file != m_files.end(); ++file) {
225  Long64_t index = (*file)->event()->indexFromEventId(run, lumi, event);
226  if (index >= 0) {
227  goTo(file, index);
228  break;
229  }
230  }
231 }
232 
233 //______________________________________________________________________________
234 
237  if (m_filterState == kOn) {
238  while (x != m_files.end()) {
239  if ((*x)->hasSelectedEvents()) {
240  goTo(x, (*x)->firstSelectedEvent());
241  return;
242  }
243  ++x;
244  }
245  } else {
246  goTo(x, 0);
247  }
248 }
249 
251  FileQueue_i x = m_files.end();
252  if (m_filterState == kOn) {
253  while (x != m_files.begin()) {
254  --x;
255  if ((*x)->hasSelectedEvents()) {
256  goTo(x, (*x)->lastSelectedEvent());
257  return;
258  }
259  }
260  } else {
261  --x;
262  goTo(x, (*x)->lastEvent());
263  }
264 }
265 
266 //______________________________________________________________________________
267 
269  int nextEv = (*m_currentFile)->nextSelectedEvent(m_currentEvent);
270  if (nextEv > -1) {
271  goTo(m_currentFile, nextEv);
272  return true;
273  } else {
275  ++i;
276  while (i != m_files.end()) {
277  if ((*i)->hasSelectedEvents()) {
278  goTo(i, (*i)->firstSelectedEvent());
279  return true;
280  }
281  ++i;
282  }
283  }
284 
285  return false;
286 }
287 
288 //______________________________________________________________________________
289 
291  if (m_newFileOnNextEvent) {
293  --last;
294  if (m_filterState == kOn)
295  goTo(last, (*last)->firstSelectedEvent());
296  else
297  goTo(last, 0);
298 
299  m_newFileOnNextEvent = false;
300  return;
301  }
302 
303  if (m_filterState == kOn) {
305  return;
306  } else {
307  if (m_currentEvent < (*m_currentFile)->lastEvent()) {
309  } else {
311  ++x;
312  if (x != m_files.end()) {
313  goTo(x, 0);
314  }
315  }
316  }
317 }
318 
319 //______________________________________________________________________________
320 
322  int prevEv = (*m_currentFile)->previousSelectedEvent(m_currentEvent);
323  if (prevEv > -1) {
324  goTo(m_currentFile, prevEv);
325  return true;
326  } else {
328  i.previous(m_files);
329  while (i != m_files.end()) {
330  if ((*i)->hasSelectedEvents()) {
331  goTo(i, (*i)->lastSelectedEvent());
332  return true;
333  }
334  i.previous(m_files);
335  }
336  }
337  return false;
338 }
339 
340 //______________________________________________________________________________
341 
343  if (m_filterState == kOn) {
345  } else {
346  if (m_currentEvent > 0) {
348  } else {
349  // last event in previous file
351  if (x != m_files.begin()) {
352  --x;
353  goTo(x, (*x)->lastEvent());
354  }
355  }
356  }
357 }
358 
359 //______________________________________________________________________________
360 
362  // callback
363 
364  fwLog(fwlog::kInfo) << "CmsShowNavigator::toggleFilterEnable filters enabled [" << (m_filterState == kOff) << "]"
365  << std::endl;
366 
367  if (m_filterState == kOff) {
368  m_filterState = kOn;
370 
372  } else {
375  }
376 
378 }
379 
381  fwLog(fwlog::kInfo) << "CmsShowNavigator::witdrawFilter" << std::endl;
384 }
385 
387  fwLog(fwlog::kInfo) << "CmsShowNavigator::resumeFilter" << std::endl;
388  m_filterState = kOn;
390 }
391 
393  // run filters on files
394  std::list<FWFileEntry::Filter>::iterator it;
395  for (FileQueue_i file = m_files.begin(); file != m_files.end(); ++file) {
396  if (m_filesNeedUpdate)
397  (*file)->needUpdate();
398  (*file)->updateFilters(m_main.context()->eventItemsManager(), m_filterMode == kOr);
399  }
401  m_filesNeedUpdate = false;
402 
403  int nSelected = getNSelectedEvents();
404  if (nSelected) {
405  // go to the nearest selected event/file
406  bool changeCurrentEvent = !(*m_currentFile)->isEventSelected(m_currentEvent);
407  if (changeCurrentEvent) {
408  if (!nextSelectedEvent())
410  }
411 
412  if (m_filterState == kWithdrawn)
413  resumeFilter();
414 
415  postFiltering_.emit(changeCurrentEvent);
416  } else {
417  withdrawFilter();
418  }
419 
421  fwLog(fwlog::kDebug) << "CmsShowNavigator::updateFileFilters selected events over files [" << getNSelectedEvents()
422  << "/" << getNTotalEvents() << "]" << std::endl;
423  }
424 }
425 
426 //=======================================================================
427 void CmsShowNavigator::removeFilter(std::list<FWEventSelector*>::iterator si) {
428  fwLog(fwlog::kDebug) << "CmsShowNavigator::removeFilter " << (*si)->m_expression << std::endl;
429 
430  std::list<FWFileEntry::Filter*>::iterator it;
431  for (FileQueue_i file = m_files.begin(); file != m_files.end(); ++file) {
432  for (it = (*file)->filters().begin(); it != (*file)->filters().end(); ++it) {
433  if ((*it)->m_selector == *si) {
434  FWFileEntry::Filter* f = *it;
435  delete f;
436  (*file)->filters().erase(it);
437  break;
438  }
439  }
440  }
441 
442  delete *si;
443  m_selectors.erase(si);
444  m_filesNeedUpdate = true;
445 }
446 
448  fwLog(fwlog::kDebug) << "CmsShowNavigator::addFilter " << ref->m_expression << std::endl;
449 
450  FWEventSelector* selector = new FWEventSelector(ref);
451  m_selectors.push_back(selector);
452 
453  for (FileQueue_i file = m_files.begin(); file != m_files.end(); ++file) {
454  (*file)->filters().push_back(new FWFileEntry::Filter(selector));
455  }
456  m_filesNeedUpdate = true;
457 }
458 
459 void CmsShowNavigator::changeFilter(FWEventSelector* selector, bool updateFilter) {
460  fwLog(fwlog::kDebug) << "CmsShowNavigator::changeFilter " << selector->m_expression << std::endl;
461 
462  std::list<FWFileEntry::Filter*>::iterator it;
463  for (FileQueue_i file = m_files.begin(); file != m_files.end(); ++file) {
464  for (it = (*file)->filters().begin(); it != (*file)->filters().end(); ++it) {
465  if ((*it)->m_selector == selector) {
466  if (updateFilter)
467  (*it)->m_needsUpdate = true;
468  (*it)->m_selector->m_expression = selector->m_expression;
469  break;
470  }
471  }
472  }
473  m_filesNeedUpdate = true;
474 }
475 
477  m_filesNeedUpdate = false;
478 
479  // check if filters are set ON
480  if (m_filterState == kOff) {
481  m_filesNeedUpdate = true;
482  m_filterState = kOn;
484  }
485 
486  // compare changes and then call updateFileFilters
487  std::list<FWEventSelector*>::iterator si = m_selectors.begin();
488  std::list<FWGUIEventSelector*>::iterator gi = m_guiFilter->guiSelectors().begin();
489 
492  m_filesNeedUpdate = true;
493  }
494 
495  while (si != m_selectors.end() || gi != m_guiFilter->guiSelectors().end()) {
496  if (gi == m_guiFilter->guiSelectors().end() && si != m_selectors.end()) {
497  removeFilter(si++);
498  } else if (si == m_selectors.end() && gi != m_guiFilter->guiSelectors().end()) {
499  addFilter((*gi)->guiSelector());
500  (*gi)->setOrigSelector(m_selectors.back());
501  ++gi;
502  } else {
503  if (*si == (*gi)->origSelector()) {
504  FWEventSelector* g = (*gi)->guiSelector();
505  FWEventSelector* o = *si;
506  bool filterNeedUpdate = o->m_expression != g->m_expression;
507  if (filterNeedUpdate || o->m_enabled != g->m_enabled) {
508  *o = *g;
509  changeFilter(*si, filterNeedUpdate);
510  } else {
512  }
513  ++si;
514  ++gi;
515  } else if ((*gi)->origSelector() == nullptr) {
516  addFilter((*gi)->guiSelector());
517  (*gi)->setOrigSelector(m_selectors.back());
518  ++gi;
519  } else {
520  removeFilter(si++);
521  }
522  }
523  }
524 
525  if (m_filesNeedUpdate)
527 
529 }
530 //______________________________________________________________________________
531 // helpers for gui state
532 
534  if (m_filterState == kOn) {
535  FileQueue_i firstSelectedFile;
536  for (FileQueue_i file = m_files.begin(); file != m_files.end(); ++file) {
537  if ((*file)->hasSelectedEvents()) {
538  firstSelectedFile = file;
539  break;
540  }
541  }
542 
543  if (firstSelectedFile == m_currentFile)
544  return (*m_currentFile)->firstSelectedEvent() == m_currentEvent;
545  } else {
546  if (m_currentFile == m_files.begin()) {
547  return m_currentEvent == 0;
548  }
549  }
550  return false;
551 }
552 
554  if (m_filterState == kOn) {
555  FileQueue_i lastSelectedFile;
556  for (FileQueue_i file = m_files.begin(); file != m_files.end(); ++file) {
557  if ((*file)->hasSelectedEvents())
558  lastSelectedFile = file;
559  }
560  if (lastSelectedFile == m_currentFile)
561  return (*m_currentFile)->lastSelectedEvent() == m_currentEvent;
562  } else {
563  FileQueue_i lastFile = m_files.end();
564  --lastFile;
565  if (m_currentFile == lastFile) {
566  return (*m_currentFile)->lastEvent() == m_currentEvent;
567  }
568  }
569  return false;
570 }
571 
572 //______________________________________________________________________________
574  // reset
575  std::list<FWEventSelector*>::const_iterator sel = m_selectors.begin();
576  while (sel != m_selectors.end()) {
577  (*sel)->m_selected = 0;
578  (*sel)->m_updated = true;
579  ++sel;
580  }
581 
582  // loop file filters
583  std::list<FWFileEntry::Filter*>::iterator i;
584  for (FileQueue_i file = m_files.begin(); file != m_files.end(); ++file) {
585  std::list<FWFileEntry::Filter*>& filters = (*file)->filters();
586  for (i = filters.begin(); i != filters.end(); ++i) {
587  if ((*i)->m_eventList) {
588  (*i)->m_selector->m_selected += (*i)->m_eventList->GetN();
589  }
590 
591  if ((*i)->m_needsUpdate)
592  (*i)->m_selector->m_updated = false;
593  }
594  }
595  if (m_guiFilter) {
596  std::list<FWGUIEventSelector*>::const_iterator gs = m_guiFilter->guiSelectors().begin();
597  while (gs != m_guiFilter->guiSelectors().end()) {
598  (*gs)->updateNEvents();
599  ++gs;
600  }
601  }
602 }
603 
605  int sum = 0;
606  for (FileQueue_i file = m_files.begin(); file != m_files.end(); ++file) {
607  if ((*file)->globalSelection())
608  sum += (*file)->globalSelection()->GetN();
609  }
610  return sum;
611 }
612 
614  int sum = 0;
615  for (FileQueue_i file = m_files.begin(); file != m_files.end(); ++file) {
616  sum += (*file)->tree()->GetEntries();
617  }
618 
619  return sum;
620 }
621 
623  if (m_filterState == kOn)
624  return Form("%d events are selected from %d.", getNSelectedEvents(), getNTotalEvents());
625  else if (m_filterState == kOff)
626  return "Filtering is OFF.";
627  else
628  return "Filtering is disabled.";
629 }
630 
632  bool haveActiveFilters = false;
633  for (FileQueue_i file = m_files.begin(); file != m_files.end(); ++file) {
634  if ((*file)->hasActiveFilters()) {
635  haveActiveFilters = true;
636  break;
637  }
638  }
639 
640  bool btnEnabled = haveActiveFilters;
641 
642  if (m_guiFilter && m_guiFilter->isOpen())
643  btnEnabled = false;
644 
645  return btnEnabled;
646 }
647 
649 
651  if (m_guiFilter->IsMapped()) {
653  } else {
656  }
657 }
658 
659 //______________________________________________________________________________
660 
662  m_filesNeedUpdate = true;
663 
664  EFilterState oldFilterState = m_filterState;
665 
666  m_selectors.clear();
667 
668  // selectors
669  const FWConfiguration* sConf = iFrom.valueForKey("EventFilters");
670 
671  if (sConf) {
672  const FWConfiguration::KeyValues* keyVals = sConf->keyValues();
673  if (keyVals) {
674  for (FWConfiguration::KeyValuesIt it = keyVals->begin(); it != keyVals->end(); ++it) {
675  const FWConfiguration& conf = (*it).second;
676  FWEventSelector* selector = new FWEventSelector();
677  selector->m_expression = conf.valueForKey("expression")->value();
678  selector->m_description = conf.valueForKey("comment")->value();
679  selector->m_enabled = atoi(conf.valueForKey("enabled")->value().c_str());
680  if (conf.valueForKey("triggerProcess"))
681  selector->m_triggerProcess = conf.valueForKey("triggerProcess")->value();
682  m_selectors.push_back(selector);
683  }
684  }
685  } else {
686  int numberOfFilters = 0;
687  const FWConfiguration* nfvalue = iFrom.valueForKey("EventFilter_total");
688  if (nfvalue)
689  numberOfFilters = atoi(nfvalue->value().c_str());
690 
691  for (int i = 0; i < numberOfFilters; ++i) {
692  FWEventSelector* selector = new FWEventSelector();
693  {
694  const FWConfiguration* value = iFrom.valueForKey(Form("EventFilter%d_enabled", i));
695  assert(value);
696  std::istringstream s(value->value());
697  s >> selector->m_enabled;
698  }
699  selector->m_expression = iFrom.valueForKey(Form("EventFilter%d_selection", i))->value();
700  selector->m_description = iFrom.valueForKey(Form("EventFilter%d_comment", i))->value();
701 
702  if (strstr(selector->m_expression.c_str(), "HLT"))
703  selector->m_triggerProcess = "HLT";
704 
705  m_selectors.push_back(selector);
706  }
707  }
708 
709  // filter mode
710  {
711  const FWConfiguration* value = iFrom.valueForKey("EventFilter_mode");
712  if (value) {
713  std::istringstream s(value->value());
714  s >> m_filterMode;
715  }
716  }
717 
718  // filter on
719  {
720  const FWConfiguration* value = iFrom.valueForKey("EventFilter_enabled");
721  std::istringstream s(value->value());
722  int x;
723  s >> x;
724  m_filterState = x ? kOn : kOff;
725  }
726 
727  // redesplay new filters in event filter dialog if already mapped
728  if (m_guiFilter) {
729  m_guiFilter->reset();
730  if (m_guiFilter->IsMapped())
732  }
733 
734  if (!m_files.empty()) {
735  // change filters in existing files
736  for (FileQueue_i file = m_files.begin(); file != m_files.end(); ++file) {
737  (*file)->filters().clear();
738  for (std::list<FWEventSelector*>::iterator i = m_selectors.begin(); i != m_selectors.end(); ++i)
739  (*file)->filters().push_back(new FWFileEntry::Filter(*i));
740  }
741 
742  // run new filters if enabled, else just reset
743  if (m_filterState == kOn)
745  else
746  postFiltering_.emit(true);
747  }
748  // update CmsShowMainFrame checkBoxIcon and button text
749  if (oldFilterState != m_filterState)
751 }
752 
754  // selectors
756  int cnt = 0;
757  for (std::list<FWEventSelector*>::const_iterator sel = m_selectors.begin(); sel != m_selectors.end(); ++sel) {
759 
760  filter.addKeyValue("expression", FWConfiguration((*sel)->m_expression));
761  filter.addKeyValue("enabled", FWConfiguration((*sel)->m_enabled ? "1" : "0"));
762  filter.addKeyValue("comment", FWConfiguration((*sel)->m_description));
763 
764  if (!(*sel)->m_triggerProcess.empty())
765  filter.addKeyValue("triggerProcess", FWConfiguration((*sel)->m_triggerProcess));
766 
767  tmp.addKeyValue(Form("------Filter[%d]------", cnt), filter, true);
768  ++cnt;
769  }
770 
771  iTo.addKeyValue("EventFilters", tmp, true);
772 
773  // mode
774  {
775  std::stringstream s;
776  s << m_filterMode;
777  iTo.addKeyValue("EventFilter_mode", s.str());
778  }
779 
780  // enabled
781  iTo.addKeyValue("EventFilter_enabled", FWConfiguration(m_filterState == kOn ? "1" : "0"));
782 }
783 
784 std::vector<std::string>& CmsShowNavigator::getProcessList() const {
786 }
787 
789  return m_currentFile.isSet() ? (*m_currentFile)->event() : nullptr;
790 }
791 
793  if (m_files.empty())
794  return "";
795 
796  int nf = 0;
797  for (FileQueue_t::const_iterator i = m_files.begin(); i != m_files.end(); i++) {
798  if (i == m_currentFile)
799  break;
800  nf++;
801  }
802 
803  TString name = (*m_currentFile)->file()->GetName();
804  int l = name.Last('/');
805  if (l != kNPOS)
806  name.Remove(0, l + 1);
807 
808  return Form("%s [%d/%d], event [%d/%d]",
809  name.Data(),
810  nf + 1,
811  (int)m_files.size(),
812  m_currentEvent + 1,
813  (*m_currentFile)->lastEvent() + 1);
814 }
815 
817  std::string res;
818  if (!m_files.empty()) {
819  res = (*m_currentFile)->getGlobalTag();
820  }
821  return res;
822 }
int getNSelectedEvents() override
EFilterState m_filterState
void closeFile()
Definition: FWFileEntry.cc:214
void showEventFilterGUI(const TGWindow *p)
const KeyValues * keyValues() const
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:56
const char * frameTitle()
const CmsShowMain & m_main
sigc::signal< void, bool > editFiltersExternally_
unsigned int m_maxNumberOfFilesToChain
std::vector< std::string > & processNamesInJob()
unsigned long long EventNumber_t
const edm::EventBase * getCurrentEvent() const override
std::string m_triggerProcess
void show(std::list< FWEventSelector * > *sels, int filterMode, int state)
LogLevel presentLogLevel()
Definition: fwLog.cc:46
assert(be >=bs)
const char * filterStatusMessage()
void addFilter(FWEventSelector *)
unsigned int LuminosityBlockNumber_t
std::vector< TPRegexp > filters
Definition: eve_filter.cc:22
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
FWGUIEventFilter * m_guiFilter
bool openFile(const std::string &fileName)
void newFile(FileQueue_i)
bool appendFile(const std::string &fileName, bool checkFileQueueSize, bool live)
bool nextSelectedEvent() override
bool isFirstEvent() override
bool isLastEvent() override
void changeFilter(FWEventSelector *, bool filterNeedUpdate)
FileQueue_i m_currentFile
static bool IsLogging()
Definition: FWTTreeCache.cc:23
bool getGlobalTagCheck() const
Definition: CmsShowMain.h:79
std::string m_expression
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
int getNTotalEvents() override
bool previousSelectedEvent() override
void goToRunEvent(edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t) override
void nextEvent() override
CmsShowNavigator(const CmsShowMain &)
sigc::signal< void, bool > postFiltering_
void updateFilterStateLabel(int)
void goTo(FileQueue_i fi, int event)
sigc::signal< void, const TFile * > fileChanged_
std::list< Filter * > & filters()
Definition: FWFileEntry.h:58
list lumi
Definition: dqmdumpme.py:53
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
std::string m_description
const std::string & value(unsigned int iIndex=0) const
bool getVersionCheck() const
Definition: CmsShowMain.h:78
std::vector< std::string > & getProcessList() const
void lastEvent() override
#define fwLog(_level_)
Definition: fwLog.h:45
void CloseWindow() override
void setFrom(const FWConfiguration &) override
FWJobMetadataManager * metadataManager() const
Definition: Context.h:60
KeyValues::const_iterator KeyValuesIt
std::list< FWGUIEventSelector * > & guiSelectors()
void addTo(FWConfiguration &) const override
void previousEvent() override
std::string getCurrentGlobalTag()
void setupDisableFilteringButton(bool)
void setCurrentFile(FileQueue_i)
unsigned int RunNumber_t
const FWConfiguration * valueForKey(const std::string &iKey) const
tuple last
Definition: dqmdumpme.py:56
void firstEvent() override
std::list< FWEventSelector * > m_selectors
sigc::signal< void, int > filterStateChanged_
const fireworks::Context * context() const
Definition: CmsShowMain.h:77
iterator & previous(FileQueue_t &cont)
tmp
align.sh
Definition: createJobs.py:716
void removeFilter(std::list< FWEventSelector * >::iterator)
~CmsShowNavigator() override
sigc::signal< void > newEvent_