Main Page
Namespaces
Classes
Package Documentation
Fireworks
Core
interface
FWFileEntry.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
#ifndef Fireworks_Core_FWFileEntry_h
3
#define Fireworks_Core_FWFileEntry_h
4
//
5
// Package: Core
6
// Class : FWFileEntry
7
//
8
9
// system include files
10
#include <string>
11
#include <sigc++/sigc++.h>
12
13
#include "TTree.h"
14
15
// user include files
16
// MT -- to get auxBranch
17
#include "
DataFormats/FWLite/interface/Event.h
"
18
#include "
Fireworks/Core/interface/FWEventSelector.h
"
19
#include "
Fireworks/Core/interface/FWTEventList.h
"
20
#include "
Fireworks/Core/interface/FWConfigurable.h
"
21
22
// forward declarations
23
class
FWEventItem
;
24
class
FWTEventList
;
25
class
FWTTreeCache
;
26
class
CSGAction
;
27
class
CmsShowMain
;
28
class
TFile;
29
class
TGWindow;
30
class
FWEventItemsManager
;
31
32
namespace
edm
{
33
class
EventID;
34
}
35
36
class
FWFileEntry
{
37
public
:
38
struct
Filter
{
39
FWTEventList
*
m_eventList
;
40
FWEventSelector
*
m_selector
;
// owned by navigator
41
bool
m_needsUpdate
;
42
43
Filter
(
FWEventSelector
*
s
) : m_eventList(
nullptr
), m_selector(s), m_needsUpdate(
true
) {}
44
~Filter
() {
delete
m_eventList; }
45
46
bool
hasSelectedEvents
() {
return
m_eventList && m_eventList->GetN(); }
47
};
48
49
FWFileEntry
(
const
std::string
&
name
,
bool
checkVersion);
50
virtual
~
FWFileEntry
();
51
52
TFile*
file
() {
return
m_file; }
53
fwlite::Event
*
event
() {
return
m_event; }
54
TTree*
tree
() {
return
m_eventTree; }
55
FWTEventList
*
globalSelection
() {
return
m_globalEventList; }
56
FWTTreeCache
* fwTreeCache();
57
58
std::list<Filter*>&
filters
() {
return
m_filterEntries; }
59
60
void
openFile(
bool
);
61
void
closeFile();
62
63
bool
isEventSelected(
int
event
);
64
65
bool
hasSelectedEvents();
66
67
bool
hasActiveFilters();
68
69
int
firstSelectedEvent();
70
int
lastSelectedEvent();
71
72
int
lastEvent
() {
return
m_eventTree->GetEntries() - 1; }
73
74
int
nextSelectedEvent(
int
event);
75
int
previousSelectedEvent(
int
event);
76
77
void
needUpdate
() { m_needUpdate =
true
; }
78
void
updateFilters(
const
FWEventItemsManager
* eiMng,
bool
isOR);
79
80
// CallIns from FWEventItemsManager for tree-cache add/remove branch
81
void
NewEventItemCallIn(
const
FWEventItem
* it);
82
void
RemovingEventItemCallIn(
const
FWEventItem
* it);
83
84
private
:
85
FWFileEntry
(
const
FWFileEntry
&) =
delete
;
// stop default
86
const
FWFileEntry
& operator=(
const
FWFileEntry
&) =
delete
;
// stop default
87
88
void
runFilter(
Filter
* fe,
const
FWEventItemsManager
* eiMng);
89
bool
filterEventsWithCustomParser(
Filter
*
filter
);
90
91
std::string
getBranchName(
const
FWEventItem
* it)
const
;
92
93
std::string
m_name
;
94
TFile*
m_file
;
95
TTree*
m_eventTree
;
96
fwlite::Event
*
m_event
;
97
98
bool
m_needUpdate
;
// To be set in navigator::filterChanged/Added, newFile
99
100
std::list<Filter*>
m_filterEntries
;
101
FWTEventList
*
m_globalEventList
;
102
};
103
#endif
FWFileEntry::tree
TTree * tree()
Definition:
FWFileEntry.h:54
FWEventSelector
Definition:
FWEventSelector.h:12
FWFileEntry::Filter::~Filter
~Filter()
Definition:
FWFileEntry.h:44
FWEventItemsManager
Definition:
FWEventItemsManager.h:44
FWFileEntry::Filter::Filter
Filter(FWEventSelector *s)
Definition:
FWFileEntry.h:43
FWFileEntry::Filter::m_selector
FWEventSelector * m_selector
Definition:
FWFileEntry.h:40
FWFileEntry::globalSelection
FWTEventList * globalSelection()
Definition:
FWFileEntry.h:55
FWFileEntry::Filter::hasSelectedEvents
bool hasSelectedEvents()
Definition:
FWFileEntry.h:46
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
nullptr
#define nullptr
Definition:
GCC11Compatibility.h:37
CmsShowMain
Definition:
CmsShowMain.h:58
FWFileEntry::Filter::m_eventList
FWTEventList * m_eventList
Definition:
FWFileEntry.h:39
FWFileEntry::file
TFile * file()
Definition:
FWFileEntry.h:52
funct::true
true
Definition:
Factorize.h:173
CSGAction
Definition:
CSGAction.h:38
FWEventSelector.h
FWFileEntry::m_filterEntries
std::list< Filter * > m_filterEntries
Definition:
FWFileEntry.h:100
FWFileEntry::event
fwlite::Event * event()
Definition:
FWFileEntry.h:53
FWConfigurable.h
FWFileEntry::filters
std::list< Filter * > & filters()
Definition:
FWFileEntry.h:58
FWFileEntry::m_file
TFile * m_file
Definition:
FWFileEntry.h:94
FWFileEntry::Filter::m_needsUpdate
bool m_needsUpdate
Definition:
FWFileEntry.h:41
FWEventItem
Definition:
FWEventItem.h:56
FWFileEntry::m_needUpdate
bool m_needUpdate
Definition:
FWFileEntry.h:98
FWFileEntry::m_eventTree
TTree * m_eventTree
Definition:
FWFileEntry.h:95
FWFileEntry::m_event
fwlite::Event * m_event
Definition:
FWFileEntry.h:96
Event.h
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition:
ALCARECOTkAlBeamHalo_cff.py:27
FWFileEntry
Definition:
FWFileEntry.h:36
FWTEventList
Definition:
FWTEventList.h:12
Filter
Definition:
Filter.py:1
FWTEventList.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
fwlite::Event
Definition:
Event.h:85
FWTTreeCache
Definition:
FWTTreeCache.h:9
FWFileEntry::m_globalEventList
FWTEventList * m_globalEventList
Definition:
FWFileEntry.h:101
FWFileEntry::m_name
std::string m_name
Definition:
FWFileEntry.h:93
event
Definition:
event.py:1
FWFileEntry::lastEvent
int lastEvent()
Definition:
FWFileEntry.h:72
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
FWFileEntry::needUpdate
void needUpdate()
Definition:
FWFileEntry.h:77
Generated for CMSSW Reference Manual by
1.8.11