CMS 3D CMS Logo

CmsShowNavigator.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef Fireworks_Core_CmsShowNavigator_h
3 #define Fireworks_Core_CmsShowNavigator_h
4 //
5 // Package: newVersion
6 // Class : CmsShowNavigator
7 //
8 
9 // system include files
10 #include <string>
11 #include <sigc++/sigc++.h>
12 
13 // user include files
18 
20 
21 #include "TEventList.h"
22 
23 // forward declarations
24 class TEventList;
25 class CSGAction;
26 class CmsShowMain;
27 class TFile;
28 class TGWindow;
29 class FWGUIEventFilter;
30 
31 namespace edm {
32  class EventBase;
33  class EventID;
34 } // namespace edm
35 
37 public:
39  enum EFilterMode { kOr = 1, kAnd = 2 };
40 
41 private:
42  typedef std::list<FWFileEntry*> FQBase_t;
43  typedef FQBase_t::iterator FQBase_i;
44 
45  struct FileQueue_t : public FQBase_t {
46  struct iterator : public FQBase_i {
47  private:
48  bool m_isSet;
49 
50  public:
53 
54  bool isSet() const { return m_isSet; }
55 
57  // Go back one element, set to end() when falling off the end.
58  if (*this == cont.begin())
59  *this = cont.end();
60  else
61  FQBase_i::operator--();
62  return *this;
63  }
64  };
65 
67 
70  };
71 
73 
74 public:
76  ~CmsShowNavigator() override;
77 
78  //configuration management interface
79  void addTo(FWConfiguration&) const override;
80  void setFrom(const FWConfiguration&) override;
81 
82  Int_t realEntry(Int_t rawEntry);
83  bool openFile(const std::string& fileName);
84  bool appendFile(const std::string& fileName, bool checkFileQueueSize, bool live);
85 
86  void nextEvent() override;
87  void previousEvent() override;
88  bool nextSelectedEvent() override;
89  bool previousSelectedEvent() override;
90  void firstEvent() override;
91  void lastEvent() override;
93  void goTo(FileQueue_i fi, int event);
94 
95  void eventFilterEnableCallback(Bool_t);
96  void filterEvents();
97  void filterEventsAndReset();
98 
100 
101  bool isLastEvent() override;
102  bool isFirstEvent() override;
103 
104  void showEventFilterGUI(const TGWindow* p);
105  void applyFiltersFromGUI();
106  void toggleFilterEnable();
107  void withdrawFilter();
108  void resumeFilter();
109 
110  const edm::EventBase* getCurrentEvent() const override;
111 
112  const char* frameTitle();
113  const char* filterStatusMessage();
115 
116  int getNSelectedEvents() override;
117  int getNTotalEvents() override;
119  bool filesNeedUpdate() const { return m_filesNeedUpdate; }
120  int getFilterState() { return m_filterState; }
121 
122  void editFiltersExternally();
123 
126 
127  std::vector<std::string>& getProcessList() const;
128 
129  sigc::signal<void, const TFile*> fileChanged_;
130  sigc::signal<void> preFiltering_;
131  sigc::signal<void, bool> postFiltering_;
132  sigc::signal<void, bool> editFiltersExternally_;
133  sigc::signal<void, int> filterStateChanged_;
134 
135 private:
136  CmsShowNavigator(const CmsShowNavigator&); // stop default
137  const CmsShowNavigator& operator=(const CmsShowNavigator&); // stop default
138 
140  void updateFileFilters();
141  void updateSelectorsInfo();
142 
143  void removeFilter(std::list<FWEventSelector*>::iterator);
144  void addFilter(FWEventSelector*);
145  void changeFilter(FWEventSelector*, bool filterNeedUpdate);
146 
147  void newFile(FileQueue_i);
148 
149  // ---------- member data --------------------------------
150 
151  std::list<FWEventSelector*> m_selectors;
155 
160 
162  // entry is an event index nubmer which runs from 0 to
163  // #events or #selected_events depending on if we filter
164  // events or not
167 };
168 
169 #endif
CmsShowNavigator::addTo
void addTo(FWConfiguration &) const override
Definition: CmsShowNavigator.cc:753
CmsShowNavigator::canEditFiltersExternally
bool canEditFiltersExternally()
Definition: CmsShowNavigator.cc:631
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
CmsShowNavigator::newFile
void newFile(FileQueue_i)
CmsShowNavigator::firstEvent
void firstEvent() override
Definition: CmsShowNavigator.cc:235
CmsShowNavigator::m_selectors
std::list< FWEventSelector * > m_selectors
Definition: CmsShowNavigator.h:151
mps_fire.i
i
Definition: mps_fire.py:355
CmsShowNavigator::kOff
Definition: CmsShowNavigator.h:38
CmsShowNavigator::addFilter
void addFilter(FWEventSelector *)
Definition: CmsShowNavigator.cc:447
FWNavigatorBase
Definition: FWNavigatorBase.h:27
CmsShowNavigator::CmsShowNavigator
CmsShowNavigator(const CmsShowMain &)
Definition: CmsShowNavigator.cc:46
CmsShowNavigator::previousSelectedEvent
bool previousSelectedEvent() override
Definition: CmsShowNavigator.cc:321
funct::false
false
Definition: Factorize.h:34
CmsShowNavigator::getCurrentEvent
const edm::EventBase * getCurrentEvent() const override
Definition: CmsShowNavigator.cc:788
CmsShowNavigator::FileQueue_i
FileQueue_t::iterator FileQueue_i
Definition: CmsShowNavigator.h:72
CmsShowNavigator::EFilterMode
EFilterMode
Definition: CmsShowNavigator.h:39
CmsShowNavigator::FileQueue_t::iterator::isSet
bool isSet() const
Definition: CmsShowNavigator.h:54
CmsShowNavigator::FileQueue_t::iterator::previous
iterator & previous(FileQueue_t &cont)
Definition: CmsShowNavigator.h:56
CmsShowMain
Definition: CmsShowMain.h:58
CmsShowNavigator::m_files
FileQueue_t m_files
Definition: CmsShowNavigator.h:152
CmsShowNavigator::getNTotalEvents
int getNTotalEvents() override
Definition: CmsShowNavigator.cc:613
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CmsShowNavigator::isLastEvent
bool isLastEvent() override
Definition: CmsShowNavigator.cc:553
CmsShowNavigator::m_filterMode
int m_filterMode
Definition: CmsShowNavigator.h:157
CmsShowNavigator::toggleFilterEnable
void toggleFilterEnable()
Definition: CmsShowNavigator.cc:361
generateEDF.cont
cont
load Luminosity info ##
Definition: generateEDF.py:629
CmsShowNavigator::FileQueue_t::iterator::m_isSet
bool m_isSet
Definition: CmsShowNavigator.h:48
CSGAction
Definition: CSGAction.h:38
CmsShowNavigator::previousEvent
void previousEvent() override
Definition: CmsShowNavigator.cc:342
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
CmsShowNavigator::filterEvents
void filterEvents()
edm::LuminosityBlockNumber_t
unsigned int LuminosityBlockNumber_t
Definition: RunLumiEventNumber.h:13
CmsShowNavigator::FileQueue_t::iterator::iterator
iterator(FQBase_i i)
Definition: CmsShowNavigator.h:52
CmsShowNavigator::getNSelectedEvents
int getNSelectedEvents() override
Definition: CmsShowNavigator.cc:604
FWEventSelector.h
end
#define end
Definition: vmac.h:39
CmsShowNavigator::filterEventsAndReset
void filterEventsAndReset()
CmsShowNavigator
Definition: CmsShowNavigator.h:36
CmsShowNavigator::operator=
const CmsShowNavigator & operator=(const CmsShowNavigator &)
CmsShowNavigator::goToRunEvent
void goToRunEvent(edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t) override
Definition: CmsShowNavigator.cc:223
CmsShowNavigator::~CmsShowNavigator
~CmsShowNavigator() override
Definition: CmsShowNavigator.cc:64
CmsShowNavigator::lastEvent
void lastEvent() override
Definition: CmsShowNavigator.cc:250
FWEventSelector
Definition: FWEventSelector.h:12
CmsShowNavigator::filterStateChanged_
sigc::signal< void, int > filterStateChanged_
Definition: CmsShowNavigator.h:133
CmsShowNavigator::getCurrentGlobalTag
std::string getCurrentGlobalTag()
Definition: CmsShowNavigator.cc:816
CmsShowNavigator::getProcessList
std::vector< std::string > & getProcessList() const
Definition: CmsShowNavigator.cc:784
CmsShowNavigator::setCurrentFile
void setCurrentFile(FileQueue_i)
Definition: CmsShowNavigator.cc:164
CmsShowNavigator::kOr
Definition: CmsShowNavigator.h:39
CmsShowNavigator::FileQueue_t::iterator
Definition: CmsShowNavigator.h:46
edm::EventNumber_t
unsigned long long EventNumber_t
Definition: RunLumiEventNumber.h:12
FWGUIEventFilter
Definition: FWGUIEventFilter.h:29
FWConfigurable.h
CmsShowNavigator::preFiltering_
sigc::signal< void > preFiltering_
Definition: CmsShowNavigator.h:130
CmsShowNavigator::FileQueue_t::iterator::iterator
iterator()
Definition: CmsShowNavigator.h:51
CmsShowNavigator::m_filterState
EFilterState m_filterState
Definition: CmsShowNavigator.h:156
CmsShowNavigator::updateSelectorsInfo
void updateSelectorsInfo()
Definition: CmsShowNavigator.cc:573
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CmsShowNavigator::m_currentEvent
int m_currentEvent
Definition: CmsShowNavigator.h:154
CmsShowNavigator::m_guiFilter
FWGUIEventFilter * m_guiFilter
Definition: CmsShowNavigator.h:166
CmsShowNavigator::realEntry
Int_t realEntry(Int_t rawEntry)
CmsShowNavigator::EFilterState
EFilterState
Definition: CmsShowNavigator.h:38
funct::true
true
Definition: Factorize.h:173
FWFileEntry.h
CmsShowNavigator::kWithdrawn
Definition: CmsShowNavigator.h:38
CmsShowNavigator::setMaxNumberOfFilesToChain
void setMaxNumberOfFilesToChain(unsigned int i)
Definition: CmsShowNavigator.h:99
beam_dqm_sourceclient-live_cfg.live
live
Definition: beam_dqm_sourceclient-live_cfg.py:24
CmsShowNavigator::appendFile
bool appendFile(const std::string &fileName, bool checkFileQueueSize, bool live)
Definition: CmsShowNavigator.cc:109
CmsShowNavigator::FileQueue_t
Definition: CmsShowNavigator.h:45
CmsShowNavigator::resumeFilter
void resumeFilter()
Definition: CmsShowNavigator.cc:386
CmsShowNavigator::activateNewFileOnNextEvent
void activateNewFileOnNextEvent()
Definition: CmsShowNavigator.h:124
CmsShowNavigator::showEventFilterGUI
void showEventFilterGUI(const TGWindow *p)
Definition: CmsShowNavigator.cc:650
CmsShowNavigator::openFile
bool openFile(const std::string &fileName)
Definition: CmsShowNavigator.cc:70
CmsShowNavigator::removeFilter
void removeFilter(std::list< FWEventSelector * >::iterator)
Definition: CmsShowNavigator.cc:427
CmsShowNavigator::editFiltersExternally_
sigc::signal< void, bool > editFiltersExternally_
Definition: CmsShowNavigator.h:132
CmsShowNavigator::filterStatusMessage
const char * filterStatusMessage()
Definition: CmsShowNavigator.cc:622
CmsShowNavigator::nextEvent
void nextEvent() override
Definition: CmsShowNavigator.cc:290
CmsShowNavigator::frameTitle
const char * frameTitle()
Definition: CmsShowNavigator.cc:792
CmsShowNavigator::eventFilterEnableCallback
void eventFilterEnableCallback(Bool_t)
CmsShowNavigator::FileQueue_t::begin
iterator begin()
Definition: CmsShowNavigator.h:68
CmsShowNavigator::FileQueue_t::end
iterator end()
Definition: CmsShowNavigator.h:69
CmsShowNavigator::editFiltersExternally
void editFiltersExternally()
Definition: CmsShowNavigator.cc:648
CmsShowNavigator::kOn
Definition: CmsShowNavigator.h:38
CmsShowNavigator::m_maxNumberOfFilesToChain
unsigned int m_maxNumberOfFilesToChain
Definition: CmsShowNavigator.h:161
CmsShowNavigator::changeFilter
void changeFilter(FWEventSelector *, bool filterNeedUpdate)
Definition: CmsShowNavigator.cc:459
CmsShowNavigator::filesNeedUpdate
bool filesNeedUpdate() const
Definition: CmsShowNavigator.h:119
CmsShowNavigator::m_currentFile
FileQueue_i m_currentFile
Definition: CmsShowNavigator.h:153
Event.h
edm::EventBase
Definition: EventBase.h:46
EventBase
CmsShowNavigator::applyFiltersFromGUI
void applyFiltersFromGUI()
Definition: CmsShowNavigator.cc:476
CmsShowNavigator::fileChanged_
sigc::signal< void, const TFile * > fileChanged_
Definition: CmsShowNavigator.h:129
CmsShowNavigator::getFilterState
int getFilterState()
Definition: CmsShowNavigator.h:120
CmsShowNavigator::nextSelectedEvent
bool nextSelectedEvent() override
Definition: CmsShowNavigator.cc:268
FWNavigatorBase.h
CmsShowNavigator::m_newFileOnNextEvent
bool m_newFileOnNextEvent
Definition: CmsShowNavigator.h:159
FWConfiguration
Definition: FWConfiguration.h:31
CmsShowNavigator::setFrom
void setFrom(const FWConfiguration &) override
Definition: CmsShowNavigator.cc:661
CmsShowNavigator::m_main
const CmsShowMain & m_main
Definition: CmsShowNavigator.h:165
event
Definition: event.py:1
CmsShowNavigator::updateFileFilters
void updateFileFilters()
Definition: CmsShowNavigator.cc:392
CmsShowNavigator::isFirstEvent
bool isFirstEvent() override
Definition: CmsShowNavigator.cc:533
CmsShowNavigator::m_filesNeedUpdate
bool m_filesNeedUpdate
Definition: CmsShowNavigator.h:158
begin
#define begin
Definition: vmac.h:32
CmsShowNavigator::kAnd
Definition: CmsShowNavigator.h:39
CmsShowNavigator::FileQueue_t::FileQueue_t
FileQueue_t()
Definition: CmsShowNavigator.h:66
CmsShowNavigator::FQBase_t
std::list< FWFileEntry * > FQBase_t
Definition: CmsShowNavigator.h:42
CmsShowNavigator::postFiltering_
sigc::signal< void, bool > postFiltering_
Definition: CmsShowNavigator.h:131
CmsShowNavigator::FQBase_i
FQBase_t::iterator FQBase_i
Definition: CmsShowNavigator.h:43
CmsShowNavigator::withdrawFilter
void withdrawFilter()
Definition: CmsShowNavigator.cc:380
CmsShowNavigator::resetNewFileOnNextEvent
void resetNewFileOnNextEvent()
Definition: CmsShowNavigator.h:125
CmsShowNavigator::goTo
void goTo(FileQueue_i fi, int event)
Definition: CmsShowNavigator.cc:183