CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
edm::EventSelector Class Reference

#include <EventSelector.h>

Classes

struct  BitInfo
 

Public Types

typedef std::vector< std::string > Strings
 

Public Member Functions

bool acceptEvent (TriggerResults const &)
 
bool acceptEvent (unsigned char const *, int) const
 
 EventSelector (Strings const &pathspecs, Strings const &names)
 
 EventSelector (Strings const &pathspecs)
 
 EventSelector (edm::ParameterSet const &pset, Strings const &pathNames)
 
std::shared_ptr< TriggerResultsmaskTriggerResults (TriggerResults const &inputResults)
 
bool wantAll () const
 

Static Public Member Functions

static void fillDescription (ParameterSetDescription &desc)
 
static std::vector< std::string > getEventSelectionVString (edm::ParameterSet const &pset)
 
static bool selectionIsValid (Strings const &pathspec, Strings const &fullPathList)
 
static evtSel::OverlapResult testSelectionOverlap (Strings const &pathspec1, Strings const &pathspec2, Strings const &fullPathList)
 

Private Types

typedef std::vector< BitInfoBits
 

Private Member Functions

bool acceptAllBits (Bits const &b, HLTGlobalStatus const &tr) const
 
bool acceptOneBit (Bits const &b, HLTGlobalStatus const &tr, hlt::HLTState const &s=hlt::Ready) const
 
bool acceptTriggerPath (HLTPathStatus const &, BitInfo const &) const
 
bool containsExceptions (HLTGlobalStatus const &tr) const
 
bool initAcceptAll ()
 
void initPathNames (Strings const &pathNames)
 
Strings initPathSpecs (Strings const &pathSpecs)
 
bool selectionDecision (HLTGlobalStatus const &tr) const
 

Static Private Member Functions

static std::vector< bool > combine (std::vector< bool > const &a, std::vector< bool > const &b)
 
static std::vector< bool > expandDecisionList (Bits const &b, bool PassOrFail, unsigned int n)
 
static std::string glob2reg (std::string const &s)
 
static bool identical (std::vector< bool > const &a, std::vector< bool > const &b)
 
static bool identical (EventSelector const &a, EventSelector const &b, unsigned int N)
 
static std::vector
< Strings::const_iterator > 
matching_triggers (Strings const &trigs, std::string const &s)
 
static bool overlapping (std::vector< bool > const &a, std::vector< bool > const &b)
 
static bool subset (std::vector< bool > const &a, std::vector< bool > const &b)
 

Private Attributes

Bits absolute_acceptors_
 
bool const accept_all_
 
std::vector< Bitsall_must_fail_
 
std::vector< Bitsall_must_fail_noex_
 
Bits conditional_acceptors_
 
Bits exception_acceptors_
 
int nPathNames_
 
Strings const pathspecs_
 
ParameterSetID psetID_
 
bool const results_from_current_process_
 

Detailed Description

Definition at line 40 of file EventSelector.h.

Member Typedef Documentation

typedef std::vector<BitInfo> edm::EventSelector::Bits
private

Definition at line 90 of file EventSelector.h.

typedef std::vector<std::string> edm::EventSelector::Strings

Definition at line 44 of file EventSelector.h.

Constructor & Destructor Documentation

EventSelector::EventSelector ( Strings const &  pathspecs,
Strings const &  names 
)

Definition at line 51 of file EventSelector.cc.

EventSelector::EventSelector ( Strings const &  pathspecs)
explicit

Definition at line 67 of file EventSelector.cc.

EventSelector::EventSelector ( edm::ParameterSet const &  pset,
Strings const &  pathNames 
)

Definition at line 81 of file EventSelector.cc.

Member Function Documentation

bool EventSelector::acceptAllBits ( Bits const &  b,
HLTGlobalStatus const &  tr 
) const
private

Definition at line 411 of file EventSelector.cc.

bool EventSelector::acceptEvent ( TriggerResults const &  tr)

Definition at line 266 of file EventSelector.cc.

Referenced by edm::detail::NamedEventSelector::match().

bool EventSelector::acceptEvent ( unsigned char const *  array_of_trigger_results,
int  number_of_trigger_paths 
) const

Definition at line 305 of file EventSelector.cc.

bool EventSelector::acceptOneBit ( Bits const &  b,
HLTGlobalStatus const &  tr,
hlt::HLTState const &  s = hlt::Ready 
) const
private

Definition at line 393 of file EventSelector.cc.

bool EventSelector::acceptTriggerPath ( HLTPathStatus const &  pathStatus,
BitInfo const &  pathInfo 
) const
private

Definition at line 381 of file EventSelector.cc.

std::vector< bool > EventSelector::combine ( std::vector< bool > const &  a,
std::vector< bool > const &  b 
)
staticprivate

Definition at line 1090 of file EventSelector.cc.

bool EventSelector::containsExceptions ( HLTGlobalStatus const &  tr) const
private

Definition at line 937 of file EventSelector.cc.

std::vector< bool > EventSelector::expandDecisionList ( Bits const &  b,
bool  PassOrFail,
unsigned int  n 
)
staticprivate

Definition at line 1027 of file EventSelector.cc.

void EventSelector::fillDescription ( ParameterSetDescription desc)
static

Definition at line 1103 of file EventSelector.cc.

std::vector< std::string > EventSelector::getEventSelectionVString ( edm::ParameterSet const &  pset)
static

Returns the list of strings that correspond to the trigger selection request in the specified parameter set (the list of strings contained in the "SelectEvents" parameter).

Parameters
psetThe ParameterSet that contains the trigger selection.
Returns
the trigger selection list (vector of string).

Definition at line 913 of file EventSelector.cc.

static std::string edm::EventSelector::glob2reg ( std::string const &  s)
staticprivate
bool EventSelector::identical ( std::vector< bool > const &  a,
std::vector< bool > const &  b 
)
staticprivate

Definition at line 949 of file EventSelector.cc.

bool EventSelector::identical ( EventSelector const &  a,
EventSelector const &  b,
unsigned int  N 
)
staticprivate

Definition at line 960 of file EventSelector.cc.

bool EventSelector::initAcceptAll ( )
private

Definition at line 107 of file EventSelector.cc.

void EventSelector::initPathNames ( Strings const &  pathNames)
private

Definition at line 126 of file EventSelector.cc.

Strings EventSelector::initPathSpecs ( Strings const &  pathSpecs)
private

Definition at line 97 of file EventSelector.cc.

std::shared_ptr< TriggerResults > EventSelector::maskTriggerResults ( TriggerResults const &  inputResults)

Applies a trigger selection mask to a specified trigger result object. Within the trigger result object, each path status is left unchanged if it satisfies the trigger selection (path specs) or cleared if it does not satisfy the trigger selection. In this way, the resulting trigger result object contains only path status values that "pass" the selection criteria.

Parameters
inputResultsThe raw trigger results object that will be masked.
Returns
a copy of the input trigger results object with only the path status results that match the trigger selection.
Exceptions
edm::Exceptionif the number of paths in the TriggerResults object does not match the specified full trigger list, or if the trigger selection is invalid in the context of the full trigger list.

Definition at line 748 of file EventSelector.cc.

static std::vector< Strings::const_iterator > edm::EventSelector::matching_triggers ( Strings const &  trigs,
std::string const &  s 
)
staticprivate
bool EventSelector::overlapping ( std::vector< bool > const &  a,
std::vector< bool > const &  b 
)
staticprivate

Definition at line 1039 of file EventSelector.cc.

bool EventSelector::selectionDecision ( HLTGlobalStatus const &  tr) const
private

Definition at line 346 of file EventSelector.cc.

bool EventSelector::selectionIsValid ( Strings const &  pathspecs,
Strings const &  fullPathList 
)
static

Tests if the specified trigger selection list (pathspecs) is valid in the context of the specified full trigger list. Each element in the selection list is tested to see if it possible for some combination of trigger results to satisfy the selection. If all selection elements can be satisfied one way or another, then this method returns true. If one or more selection elements could never be satisfied given the input full trigger list, then this method returns false. At some level, this method tests whether the selection list is a "subset" of the full path list.

Parameters
pathspecsThe trigger selection list (vector of string).
fullPathListThe full list of path names (vector of string).
Returns
true if the selection list is valid, false otherwise.

Definition at line 436 of file EventSelector.cc.

bool EventSelector::subset ( std::vector< bool > const &  a,
std::vector< bool > const &  b 
)
staticprivate

Definition at line 1051 of file EventSelector.cc.

evtSel::OverlapResult EventSelector::testSelectionOverlap ( Strings const &  pathspec1,
Strings const &  pathspec2,
Strings const &  fullPathList 
)
static

Tests if the specified trigger selection lists (path specs) overlap, where "overlap" means that a valid trigger result (given the full trigger list) could satisfy both selections.

Parameters
pathspec1The first trigger selection list (vector of string).
pathspec2The second trigger selection list (vector of string).
fullPathListThe full list of trigger names (vector of string).
Returns
OverlapResult which indicates the degree of overlap.

Definition at line 532 of file EventSelector.cc.

bool edm::EventSelector::wantAll ( ) const
inline

Definition at line 55 of file EventSelector.h.

References accept_all_.

55 { return accept_all_; }
bool const accept_all_
Definition: EventSelector.h:88

Member Data Documentation

Bits edm::EventSelector::absolute_acceptors_
private

Definition at line 92 of file EventSelector.h.

bool const edm::EventSelector::accept_all_
private

Definition at line 88 of file EventSelector.h.

Referenced by wantAll().

std::vector<Bits> edm::EventSelector::all_must_fail_
private

Definition at line 95 of file EventSelector.h.

std::vector<Bits> edm::EventSelector::all_must_fail_noex_
private

Definition at line 96 of file EventSelector.h.

Bits edm::EventSelector::conditional_acceptors_
private

Definition at line 93 of file EventSelector.h.

Bits edm::EventSelector::exception_acceptors_
private

Definition at line 94 of file EventSelector.h.

int edm::EventSelector::nPathNames_
private

Definition at line 100 of file EventSelector.h.

Strings const edm::EventSelector::pathspecs_
private

Definition at line 86 of file EventSelector.h.

ParameterSetID edm::EventSelector::psetID_
private

Definition at line 98 of file EventSelector.h.

bool const edm::EventSelector::results_from_current_process_
private

Definition at line 87 of file EventSelector.h.