test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 }
35 
37 {
38 public:
40  enum EFilterMode { kOr = 1, kAnd = 2 };
41 
42 private:
43  typedef std::list<FWFileEntry*> FQBase_t;
44  typedef FQBase_t::iterator FQBase_i;
45 
46 
47  struct FileQueue_t : public FQBase_t
48  {
49  struct iterator : public FQBase_i
50  {
51  private:
52  bool m_isSet;
53 
54  public:
57 
58  bool isSet() const { return m_isSet; }
59 
61  {
62  // Go back one element, set to end() when falling off the end.
63  if (*this == cont.begin())
64  *this = cont.end();
65  else
66  FQBase_i::operator--();
67  return *this;
68  }
69  };
70 
72 
75  };
76 
78 
79 public:
81  virtual ~CmsShowNavigator();
82 
83  //configuration management interface
84  virtual void addTo(FWConfiguration&) const;
85  virtual void setFrom(const FWConfiguration&);
86 
87  Int_t realEntry(Int_t rawEntry);
88  bool openFile(const std::string& fileName);
89  bool appendFile(const std::string& fileName, bool checkFileQueueSize, bool live);
90 
91  virtual void nextEvent();
92  virtual void previousEvent();
93  virtual bool nextSelectedEvent();
94  virtual bool previousSelectedEvent();
95  virtual void firstEvent();
96  virtual void lastEvent();
98  void goTo(FileQueue_i fi, int event);
99 
100  void eventFilterEnableCallback(Bool_t);
101  void filterEvents();
102  void filterEventsAndReset();
103 
104  void setMaxNumberOfFilesToChain( unsigned int i ) {
106  }
107 
108  virtual bool isLastEvent();
109  virtual bool isFirstEvent();
110 
111  void showEventFilterGUI(const TGWindow* p);
112  void applyFiltersFromGUI();
113  void toggleFilterEnable();
114  void withdrawFilter();
115  void resumeFilter();
116 
117  virtual const edm::EventBase* getCurrentEvent() const;
118 
119  const char* frameTitle();
120  const char* filterStatusMessage();
121  int getNSelectedEvents();
122  int getNTotalEvents();
124  bool filesNeedUpdate() const { return m_filesNeedUpdate; }
125  int getFilterState() { return m_filterState; }
126 
127  void editFiltersExternally();
128 
131 
132  std::vector<std::string>& getProcessList() const;
133 
134  sigc::signal<void, const TFile*> fileChanged_;
135  sigc::signal<void> preFiltering_;
136  sigc::signal<void, bool> postFiltering_;
137  sigc::signal<void, bool> editFiltersExternally_;
138  sigc::signal<void, int> filterStateChanged_;
139 
140 private:
141  CmsShowNavigator(const CmsShowNavigator&); // stop default
142  const CmsShowNavigator& operator=(const CmsShowNavigator&); // stop default
143 
145  void updateFileFilters();
146  void updateSelectorsInfo();
147 
148  void removeFilter(std::list<FWEventSelector*>::iterator);
149  void addFilter(FWEventSelector*);
150  void changeFilter(FWEventSelector*, bool filterNeedUpdate);
151 
152  void newFile(FileQueue_i);
153 
154  // ---------- member data --------------------------------
155 
156  std::list<FWEventSelector*> m_selectors;
160 
165 
167  // entry is an event index nubmer which runs from 0 to
168  // #events or #selected_events depending on if we filter
169  // events or not
172 };
173 
174 #endif
virtual ~CmsShowNavigator()
EFilterState m_filterState
int i
Definition: DBlmapReader.cc:9
void showEventFilterGUI(const TGWindow *p)
virtual void previousEvent()
tuple cont
load Luminosity info ##
Definition: generateEDF.py:622
const char * frameTitle()
virtual void lastEvent()
virtual bool isFirstEvent()
const CmsShowMain & m_main
const CmsShowNavigator & operator=(const CmsShowNavigator &)
sigc::signal< void, bool > editFiltersExternally_
virtual void goToRunEvent(edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t)
unsigned int m_maxNumberOfFilesToChain
bool filesNeedUpdate() const
unsigned long long EventNumber_t
void resetNewFileOnNextEvent()
FileQueue_t::iterator FileQueue_i
virtual bool isLastEvent()
const char * filterStatusMessage()
void addFilter(FWEventSelector *)
unsigned int LuminosityBlockNumber_t
std::list< FWFileEntry * > FQBase_t
sigc::signal< void > preFiltering_
FWGUIEventFilter * m_guiFilter
bool openFile(const std::string &fileName)
void newFile(FileQueue_i)
bool appendFile(const std::string &fileName, bool checkFileQueueSize, bool live)
void activateNewFileOnNextEvent()
void changeFilter(FWEventSelector *, bool filterNeedUpdate)
FileQueue_i m_currentFile
virtual void firstEvent()
CmsShowNavigator(const CmsShowMain &)
sigc::signal< void, bool > postFiltering_
void filterEventsAndReset()
#define end
Definition: vmac.h:37
void goTo(FileQueue_i fi, int event)
void eventFilterEnableCallback(Bool_t)
sigc::signal< void, const TFile * > fileChanged_
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void nextEvent()
virtual bool previousSelectedEvent()
Int_t realEntry(Int_t rawEntry)
std::vector< std::string > & getProcessList() const
virtual bool nextSelectedEvent()
virtual const edm::EventBase * getCurrentEvent() const
#define begin
Definition: vmac.h:30
FQBase_t::iterator FQBase_i
void setMaxNumberOfFilesToChain(unsigned int i)
void setCurrentFile(FileQueue_i)
unsigned int RunNumber_t
volatile std::atomic< bool > shutdown_flag false
virtual void addTo(FWConfiguration &) const
std::list< FWEventSelector * > m_selectors
sigc::signal< void, int > filterStateChanged_
iterator & previous(FileQueue_t &cont)
void removeFilter(std::list< FWEventSelector * >::iterator)
virtual void setFrom(const FWConfiguration &)