CMS 3D CMS Logo

edm::GroupSelector Class Reference

#include <FWCore/Framework/interface/GroupSelector.h>

List of all members.

Public Member Functions

 GroupSelector ()
void initialize (GroupSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
bool initialized () const
void print (std::ostream &os) const
bool selected (BranchDescription const &desc) const

Private Attributes

std::vector< std::string > groupsToSelect_
bool initialized_


Detailed Description

Definition at line 25 of file GroupSelector.h.


Constructor & Destructor Documentation

edm::GroupSelector::GroupSelector (  ) 

Definition at line 23 of file GroupSelector.cc.

00023 : groupsToSelect_(), initialized_(false) {}


Member Function Documentation

void edm::GroupSelector::initialize ( GroupSelectorRules const &  rules,
std::vector< BranchDescription const * > const &  branchDescriptions 
)

Referenced by edm::RootFile::RootFile(), and edm::OutputModule::selectProducts().

bool edm::GroupSelector::initialized (  )  const [inline]

Definition at line 38 of file GroupSelector.h.

References initialized_.

Referenced by edm::OutputModule::selectProducts().

00038 {return initialized_;}

void edm::GroupSelector::print ( std::ostream &  os  )  const

Definition at line 71 of file GroupSelector.cc.

References edm::copy_all(), and groupsToSelect_.

Referenced by edm::operator<<().

00071                                            {
00072     os << "GroupSelector at: "
00073        << static_cast<void const*>(this)
00074        << " has "
00075        << groupsToSelect_.size()
00076        << " groups to select:\n";      
00077     copy_all(groupsToSelect_, std::ostream_iterator<std::string>(os, "\n"));
00078   }

bool edm::GroupSelector::selected ( BranchDescription const &  desc  )  const

Definition at line 59 of file GroupSelector.cc.

References edm::binary_search_all(), edm::BranchDescription::branchName(), groupsToSelect_, initialized_, and edm::errors::LogicError.

Referenced by edm::OutputModule::selected(), and edm::RootFile::selected().

00059                                                                   {
00060     if (!initialized_) {
00061       throw edm::Exception(edm::errors::LogicError)
00062         << "GroupSelector::selected() called prematurely\n"
00063         << "before the product registry has been frozen.\n";
00064     }
00065     // We are to select this 'branch' if its name is one of the ones we
00066     // have been told to select.
00067     return binary_search_all(groupsToSelect_, desc.branchName());
00068   }


Member Data Documentation

std::vector<std::string> edm::GroupSelector::groupsToSelect_ [private]

Definition at line 51 of file GroupSelector.h.

Referenced by print(), and selected().

bool edm::GroupSelector::initialized_ [private]

Definition at line 52 of file GroupSelector.h.

Referenced by initialized(), and selected().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:41:03 2009 for CMSSW by  doxygen 1.5.4