CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Typedefs | Functions
edm::detail Namespace Reference

Classes

struct  FillViewRefTypeTrait
 
struct  FillViewRefTypeTrait< RefVector< C, T, F >, T1, F1 >
 
struct  getMemberType
 
struct  getMemberType< T, false >
 
struct  getMemberType< T, true >
 
struct  GetProduct
 
struct  GetProduct< RefVector< C, T, F > >
 
struct  getValueType
 
struct  getValueType< T, false >
 
struct  getValueType< T, true >
 
struct  has_donotrecordparents
 
struct  has_isProductEqual_function
 
struct  has_mergeProduct_function
 
struct  has_postinsert
 
struct  has_swap_function
 
struct  has_typedef_member_type
 
struct  has_typedef_value_type
 
struct  isProductEqual_function
 
struct  mergeProduct_function
 
class  NamedEventSelector
 
struct  postinsert_function
 
struct  swap_function
 
class  ThreadSafeRegistry
 
class  TRBESSentry
 
class  TriggerResultsBasedEventSelector
 

Typedefs

typedef edm::Handle
< edm::TriggerResults
handle_t
 
typedef detail::NamedEventSelector NES
 
typedef char(& no_tag )[1]
 
typedef char(& yes_tag )[2]
 

Functions

void _throw_range (det_id_type i)
 
bool configureEventSelector (edm::ParameterSet const &iPSet, std::string const &iProcessName, std::vector< std::string > const &iAllTriggerNames, edm::detail::TriggerResultsBasedEventSelector &oSelector)
 
void doTheOffset (int bunchSpace, int bcr, std::vector< SimTrack > &simtracks, unsigned int evtNr, int vertexOffset)
 
void doTheOffset (int bunchSpace, int bcr, std::vector< SimVertex > &simvertices, unsigned int evtNr, int vertexOffset)
 
void doTheOffset (int bunchSpace, int bcr, std::vector< PSimHit > &simhits, unsigned int evtNr, int vertexOffset)
 
void doTheOffset (int bunchSpace, int bcr, std::vector< PCaloHit > &calohits, unsigned int evtNr, int vertexOffset)
 
void doTheOffset (int bunchSpace, int bcr, TrackingRecHitCollection &trackingrechits, unsigned int evtNr, int vertexOffset)
 
template<typename T >
no_tag has_isProductEqual_helper (...)
 
template<typename T >
yes_tag has_isProductEqual_helper (isProductEqual_function< T,&T::isProductEqual > *dummy)
 
template<typename T >
static yes_taghas_member_type (typename T::member_type *)
 
template<typename T >
static no_taghas_member_type (...)
 
template<typename T >
no_tag has_mergeProduct_helper (...)
 
template<typename T >
yes_tag has_mergeProduct_helper (mergeProduct_function< T,&T::mergeProduct > *dummy)
 
template<typename T >
no_tag has_postinsert_helper (...)
 
template<typename T >
yes_tag has_postinsert_helper (postinsert_function< T,&T::post_insert > *p)
 
template<typename T >
no_tag has_swap_helper (...)
 
template<typename T >
yes_tag has_swap_helper (swap_function< T,&T::swap > *dummy)
 
template<typename T >
static yes_taghas_value_type (typename T::value_type *)
 
template<typename T >
static no_taghas_value_type (...)
 
std::string const & InvalidHash ()
 
bool isnan (float x)
 
bool isnan (double x)
 
bool isnan (long double x)
 
template<typename KEY , typename T , typename E >
std::ostream & operator<< (std::ostream &os, ThreadSafeRegistry< KEY, T > const &reg)
 
template<typename COLLECTION >
void reallyfillPtrVector (COLLECTION const &coll, std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const * > &oPtr)
 
template<class COLLECTION >
void reallyFillView (COLLECTION const &coll, ProductID const &id, std::vector< void const * > &ptrs, helper_vector &helpers)
 
template<typename COLLECTION >
void reallySetPtr (COLLECTION const &coll, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr)
 
ParameterSetID registerProperSelectionInfo (edm::ParameterSet const &iInitial, std::string const &iLabel, std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
 

Typedef Documentation

Definition at line 27 of file TriggerResultsBasedEventSelector.h.

Definition at line 125 of file TriggerResultsBasedEventSelector.cc.

typedef char(& edm::detail::no_tag

Definition at line 243 of file Wrapper.h.

typedef char(& edm::detail::yes_tag

Definition at line 244 of file Wrapper.h.

Function Documentation

void edm::detail::_throw_range ( det_id_type  i)
inline

Definition at line 73 of file DetSetVector.h.

References edm::errors::InvalidReference, and edm::Exception::throwThis().

Referenced by edm::DetSetVector< T >::operator[]().

73  {
74  Exception::throwThis(errors::InvalidReference,
75  "DetSetVector::operator[] called with index not in collection;\nindex value: ", i);
76  }
int i
Definition: DBlmapReader.cc:9
bool edm::detail::configureEventSelector ( edm::ParameterSet const &  iPSet,
std::string const &  iProcessName,
std::vector< std::string > const &  iAllTriggerNames,
edm::detail::TriggerResultsBasedEventSelector oSelector 
)

Handles the final initialization of the TriggerResutsBasedEventSelector

Returns
true if all events will be selected

Definition at line 83 of file TriggerResultsBasedEventSelector.cc.

References edm::ParameterSet::empty(), edm::ParameterSet::getParameter(), i, edm::detail::TriggerResultsBasedEventSelector::setup(), and edm::detail::TriggerResultsBasedEventSelector::setupDefault().

Referenced by edm::OutputModule::OutputModule(), edm::one::OutputModuleBase::OutputModuleBase(), and edm::SubProcess::SubProcess().

86  {
87  // If selectevents is an emtpy ParameterSet, then we are to write
88  // all events, or one which contains a vstrig 'SelectEvents' that
89  // is empty, we are to write all events. We have no need for any
90  // EventSelectors.
91  if(iPSet.empty()) {
92  oSelector.setupDefault(iAllTriggerNames);
93  return true;
94  }
95 
96  std::vector<std::string> path_specs =
97  iPSet.getParameter<std::vector<std::string> >("SelectEvents");
98 
99  if(path_specs.empty()) {
100  oSelector.setupDefault(iAllTriggerNames);
101  return true;
102  }
103 
104  // If we get here, we have the possibility of having to deal with
105  // path_specs that look at more than one process.
106  std::vector<parsed_path_spec_t> parsed_paths(path_specs.size());
107  for(size_t i = 0; i < path_specs.size(); ++i) {
108  parse_path_spec(path_specs[i], parsed_paths[i]);
109  }
110  oSelector.setup(parsed_paths, iAllTriggerNames, iProcessName);
111 
112  return false;
113  }
int i
Definition: DBlmapReader.cc:9
void setupDefault(std::vector< std::string > const &triggernames)
void setup(std::vector< parsed_path_spec_t > const &path_specs, std::vector< std::string > const &triggernames, const std::string &process_name)
void edm::detail::doTheOffset ( int  bunchSpace,
int  bcr,
std::vector< SimTrack > &  simtracks,
unsigned int  evtNr,
int  vertexOffset 
)

Definition at line 6 of file Adjuster.cc.

Referenced by edm::Adjuster< T >::doOffset().

6  {
7 
8  EncodedEventId id(bcr,evtNr);
9  for (auto& item : simtracks) {
10  item.setEventId(id);
11  if (!item.noVertex()) {
12  item.setVertexIndex(item.vertIndex() + vertexOffset);
13  }
14  }
15 }
void edm::detail::doTheOffset ( int  bunchSpace,
int  bcr,
std::vector< SimVertex > &  simvertices,
unsigned int  evtNr,
int  vertexOffset 
)

Definition at line 17 of file Adjuster.cc.

17  {
18 
19  int timeOffset = bcr * bunchSpace;
20  EncodedEventId id(bcr,evtNr);
21  for (auto& item : simvertices) {
22  item.setEventId(id);
23  item.setTof(item.position().t() + timeOffset);
24  }
25 }
void edm::detail::doTheOffset ( int  bunchSpace,
int  bcr,
std::vector< PSimHit > &  simhits,
unsigned int  evtNr,
int  vertexOffset 
)

Definition at line 27 of file Adjuster.cc.

27  {
28 
29  int timeOffset = bcr * bunchSpace;
30  EncodedEventId id(bcr,evtNr);
31  for (auto& item : simhits) {
32  item.setEventId(id);
33  item.setTof(item.timeOfFlight() + timeOffset);
34  }
35 }
void edm::detail::doTheOffset ( int  bunchSpace,
int  bcr,
std::vector< PCaloHit > &  calohits,
unsigned int  evtNr,
int  vertexOffset 
)

Definition at line 37 of file Adjuster.cc.

37  {
38 
39  int timeOffset = bcr * bunchSpace;
40  EncodedEventId id(bcr,evtNr);
41  for (auto& item : calohits) {
42  item.setEventId(id);
43  item.setTime(item.time() + timeOffset);
44  }
45 }
void edm::detail::doTheOffset ( int  bunchSpace,
int  bcr,
TrackingRecHitCollection trackingrechits,
unsigned int  evtNr,
int  vertexOffset 
)

Definition at line 47 of file Adjuster.cc.

References edm::OwnVector< T, P >::begin(), edm::OwnVector< T, P >::end(), SiTrackerGSRecHit2D::setEeId(), and SiTrackerGSMatchedRecHit2D::setEeId().

47  {
48 
49  EncodedEventId id(bcr,evtNr);
50  for (auto it = trackingrechits.begin();it!=trackingrechits.end();++it) {
51  {
52  SiTrackerGSMatchedRecHit2D * rechit = dynamic_cast<SiTrackerGSMatchedRecHit2D*>(&(*it));
53  if(rechit){
54  rechit->setEeId(id.rawId());
55  continue;
56  }
57  }
58  {
59  SiTrackerGSRecHit2D * rechit = dynamic_cast<SiTrackerGSRecHit2D*>(&(*it));
60  if(rechit){
61  rechit->setEeId(id.rawId());
62  continue;
63  }
64  }
65  }
66 }
iterator begin()
Definition: OwnVector.h:234
void setEeId(uint32_t eeId)
iterator end()
Definition: OwnVector.h:239
template<typename T >
no_tag edm::detail::has_isProductEqual_helper (   ...)
template<typename T >
yes_tag edm::detail::has_isProductEqual_helper ( isProductEqual_function< T,&T::isProductEqual > *  dummy)
template<typename T >
static yes_tag& edm::detail::has_member_type ( typename T::member_type *  )
static
template<typename T >
static no_tag& edm::detail::has_member_type (   ...)
static
template<typename T >
no_tag edm::detail::has_mergeProduct_helper (   ...)
template<typename T >
yes_tag edm::detail::has_mergeProduct_helper ( mergeProduct_function< T,&T::mergeProduct > *  dummy)
template<typename T >
no_tag edm::detail::has_postinsert_helper (   ...)
template<typename T >
yes_tag edm::detail::has_postinsert_helper ( postinsert_function< T,&T::post_insert > *  p)
template<typename T >
no_tag edm::detail::has_swap_helper (   ...)
template<typename T >
yes_tag edm::detail::has_swap_helper ( swap_function< T,&T::swap > *  dummy)
template<typename T >
static yes_tag& edm::detail::has_value_type ( typename T::value_type *  )
static
template<typename T >
static no_tag& edm::detail::has_value_type (   ...)
static
std::string const & edm::detail::InvalidHash ( )
bool edm::detail::isnan ( float  x)
inline
bool edm::detail::isnan ( double  x)
inline

Definition at line 22 of file math.h.

References EXTRACT_WORDS.

23  {
24  u_int32_t hx, lx;
25 
26  EXTRACT_WORDS (hx, lx, x);
27  lx |= hx & 0xfffff;
28  hx &= 0x7ff00000;
29  return (bool)(hx == 0x7ff00000) && (lx != 0);
30  }
#define EXTRACT_WORDS(ix0, ix1, d)
Definition: math_private.h:66
Definition: DDAxes.h:10
bool edm::detail::isnan ( long double  x)
inline

Definition at line 32 of file math.h.

References GET_LDOUBLE_WORDS.

33  {
34  u_int32_t ex, hx, lx;
35 
36  GET_LDOUBLE_WORDS (ex, hx, lx, x);
37  ex &= 0x7fff;
38  return (bool)((ex == 0x7fff) && ((hx & 0x7fffffff) | lx));
39  }
Definition: DDAxes.h:10
#define GET_LDOUBLE_WORDS(exp, ix0, ix1, d)
Definition: math_private.h:75
template<typename KEY , typename T , typename E >
std::ostream& edm::detail::operator<< ( std::ostream &  os,
ThreadSafeRegistry< KEY, T > const &  reg 
)
inline

Definition at line 100 of file ThreadSafeRegistry.h.

100  {
101  reg.print(os);
102  return os;
103  }
template<typename COLLECTION >
void edm::detail::reallyfillPtrVector ( COLLECTION const &  coll,
std::type_info const &  iToType,
std::vector< unsigned long > const &  iIndicies,
std::vector< void const * > &  oPtr 
)

Definition at line 38 of file fillPtrVector.h.

References edm::detail::GetProduct< COLLECTION >::address(), getDQMSummary::iter, edm::errors::LogicError, mergeVDriftHistosByStation::name, edm::TypeWithDict::pointerToBaseType(), and edm::Exception::throwThis().

Referenced by edm::fillPtrVector(), edm::OwnArray< T, MAX_SIZE, P >::fillPtrVector(), edm::OwnVector< T, P >::fillPtrVector(), and edm::SortedCollection< T, SORT >::fillPtrVector().

42  {
43  typedef COLLECTION product_type;
44  typedef typename GetProduct<product_type>::element_type element_type;
45  typedef typename product_type::const_iterator iter;
46 
47  oPtr.reserve(iIndicies.size());
48  if(iToType == typeid(element_type)) {
49  for(std::vector<unsigned long>::const_iterator itIndex = iIndicies.begin(),
50  itEnd = iIndicies.end();
51  itIndex != itEnd;
52  ++itIndex) {
53  iter it = coll.begin();
54  std::advance(it, *itIndex);
55  element_type const* address = GetProduct<product_type>::address(it);
56  oPtr.push_back(address);
57  }
58  } else {
59  static TypeWithDict const s_type(typeid(element_type));
60 
61  for(std::vector<unsigned long>::const_iterator itIndex = iIndicies.begin(),
62  itEnd = iIndicies.end();
63  itIndex != itEnd;
64  ++itIndex) {
65  iter it = coll.begin();
66  std::advance(it, *itIndex);
67  element_type const* address = GetProduct<product_type>::address(it);
68  void const* ptr = TypeWithDict(iToType).pointerToBaseType(address, s_type);
69  if(0 != ptr) {
70  oPtr.push_back(ptr);
71  } else {
72  Exception::throwThis(errors::LogicError,
73  "TypeConversionError "
74  "edm::PtrVector<> : unable to convert type ",
75  typeid(element_type).name(),
76  " to ",
77  iToType.name(),
78  "\n");
79  }
80  }
81  }
82  }
JetCorrectorParametersCollection coll
Definition: classes.h:10
template<class COLLECTION >
void edm::detail::reallyFillView ( COLLECTION const &  coll,
ProductID const &  id,
std::vector< void const * > &  ptrs,
helper_vector &  helpers 
)

Definition at line 49 of file FillView.h.

References edm::detail::GetProduct< COLLECTION >::address(), alignCSCRings::e, h, i, getDQMSummary::iter, relval_steps::key, edm::reftobase::RefVectorHolderBase::push_back(), edm::reftobase::RefVectorHolderBase::reserve(), edm::reftobase::RefVectorHolderBase::size(), and relativeConstraints::value.

Referenced by edm::fillView(), edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >::fillView(), edm::SortedCollection< T, SORT >::fillView(), edm::DetSetVector< T >::fillView(), edm::reftobase::RefVectorHolder< REFV >::reallyFillView(), edm::reftobase::RefVectorHolderDoFillView< REFV >::reallyFillView(), and edm::RefToBaseProd< T >::RefToBaseProd().

53  {
54  typedef COLLECTION product_type;
55  typedef typename GetProduct<product_type>::element_type element_type;
56  typedef typename product_type::const_iterator iter;
57  typedef typename product_type::size_type size_type;
58  typedef typename FillViewRefTypeTrait<product_type,
60  typename refhelper::FindTrait<product_type,
61  typename refhelper::ValueTrait<product_type>::value>::value>::type ref_type;
62  typedef reftobase::RefHolder<ref_type> holder_type;
63 
64  ptrs.reserve(ptrs.size() + coll.size());
65  helpers.reserve(helpers.size() + coll.size());
66  size_type key = 0;
67  for (iter i = coll.begin(), e = coll.end(); i!=e; ++i, ++key) {
68  element_type const* address = GetProduct<product_type>::address(i);
69  ptrs.push_back(address);
70  ref_type ref(id, address, key, GetProduct<product_type>::product(coll) );
71  holder_type h(ref);
72  helpers.push_back(&h);
73  }
74  }
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
uint16_t size_type
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
JetCorrectorParametersCollection coll
Definition: classes.h:10
template<typename COLLECTION >
void edm::detail::reallySetPtr ( COLLECTION const &  coll,
std::type_info const &  iToType,
unsigned long  iIndex,
void const *&  oPtr 
)

Definition at line 37 of file setPtr.h.

References edm::detail::GetProduct< COLLECTION >::address(), getDQMSummary::iter, edm::errors::LogicError, mergeVDriftHistosByStation::name, edm::TypeWithDict::pointerToBaseType(), and edm::Exception::throwThis().

Referenced by edm::setPtr(), and edm::SortedCollection< T, SORT >::setPtr().

40  {
41  typedef COLLECTION product_type;
42  typedef typename GetProduct<product_type>::element_type element_type;
43  typedef typename product_type::const_iterator iter;
44 
45  if(iToType == typeid(element_type)) {
46  iter it = coll.begin();
47  std::advance(it,iIndex);
48  element_type const* address = GetProduct<product_type>::address( it );
49  oPtr = address;
50  } else {
51  static TypeWithDict const s_type(TypeWithDict(typeid(element_type)));
52 
53  iter it = coll.begin();
54  std::advance(it,iIndex);
55  element_type const* address = GetProduct<product_type>::address( it );
56 
57  oPtr = TypeWithDict(iToType).pointerToBaseType(address, s_type);
58 
59  if(0 == oPtr) {
60  Exception::throwThis(errors::LogicError,
61  "TypeConversionError"
62  "edm::Ptr<> : unable to convert type ",
63  typeid(element_type).name(),
64  " to ",
65  iToType.name(),
66  "\n");
67  }
68  }
69  }
JetCorrectorParametersCollection coll
Definition: classes.h:10
ParameterSetID edm::detail::registerProperSelectionInfo ( edm::ParameterSet const &  iInitial,
std::string const &  iLabel,
std::map< std::string, std::vector< std::pair< std::string, int > > > const &  outputModulePathPositions,
bool  anyProductProduced 
)

Takes the user specified SelectEvents PSet and creates a new one which conforms to the canonical format required for provenance

Definition at line 273 of file TriggerResultsBasedEventSelector.cc.

References edm::ParameterSet::addParameter(), assert(), edm::ParameterSet::copyForModify(), alignCSCRings::e, edm::ParameterSet::exists(), i, edm::ParameterSet::id(), getDQMSummary::iter, and edm::ParameterSet::registerIt().

Referenced by edm::OutputModule::setEventSelectionInfo(), edm::one::OutputModuleBase::setEventSelectionInfo(), and edm::SubProcess::SubProcess().

276  {
277  ParameterSet selectEventsInfo;
278  selectEventsInfo.copyForModify(iInitial);
279  selectEventsInfo.addParameter<bool>("InProcessHistory", anyProductProduced);
280  std::vector<std::string> endPaths;
281  std::vector<int> endPathPositions;
282 
283  // The label will be empty if and only if this is a SubProcess
284  // SubProcess's do not appear on any end path
285  if (!iLabel.empty()) {
286  std::map<std::string, std::vector<std::pair<std::string, int> > >::const_iterator iter = outputModulePathPositions.find(iLabel);
287  assert(iter != outputModulePathPositions.end());
288  for (std::vector<std::pair<std::string, int> >::const_iterator i = iter->second.begin(), e = iter->second.end();
289  i != e; ++i) {
290  endPaths.push_back(i->first);
291  endPathPositions.push_back(i->second);
292  }
293  }
294  selectEventsInfo.addParameter<std::vector<std::string> >("EndPaths", endPaths);
295  selectEventsInfo.addParameter<std::vector<int> >("EndPathPositions", endPathPositions);
296  if (!selectEventsInfo.exists("SelectEvents")) {
297  selectEventsInfo.addParameter<std::vector<std::string> >("SelectEvents", std::vector<std::string>());
298  }
299  selectEventsInfo.registerIt();
300 
301  return selectEventsInfo.id();
302  }
int i
Definition: DBlmapReader.cc:9
assert(m_qm.get())