CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
ListGroups.cc File Reference
#include <string>
#include <vector>
#include <iostream>
#include <iomanip>
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESTransientHandle.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/ParameterSet/interface/types.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/Math/interface/Vector3D.h"
#include "DetectorDescription/Core/interface/DDFilteredView.h"
#include "DetectorDescription/Core/interface/DDCompactView.h"
#include "DetectorDescription/Core/interface/DDMaterial.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"
#include "FWCore/PluginManager/interface/ModuleDef.h"
#include "FWCore/Framework/interface/MakerMacros.h"

Go to the source code of this file.

Classes

class  ListGroups
 

Functions

static double dddGetDouble (const std::string &s, DDFilteredView const &view)
 
static std::string dddGetString (const std::string &s, DDFilteredView const &view)
 
static bool dddGetStringRaw (const DDFilteredView &view, const std::string &name, std::string &value)
 
static std::ostream & operator<< (std::ostream &out, const math::XYZVector &v)
 
static const
edm::ParameterSetDescriptionFillerPluginFactory::PMaker
< edm::ParameterSetDescriptionFiller
< ListGroups > > 
s_filler__LINE__ ("ListGroups")
 
static const
edm::MakerPluginFactory::PMaker
< edm::WorkerMaker< ListGroups > > 
s_maker__LINE__ ("ListGroups")
 

Function Documentation

static double dddGetDouble ( const std::string &  s,
DDFilteredView const &  view 
)
inlinestatic

Definition at line 42 of file ListGroups.cc.

References dddGetStringRaw(), AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

42  {
44  if (dddGetStringRaw(view, s, value))
45  return double(::atof(value.c_str()));
46  else
47  return NAN;
48 }
static bool dddGetStringRaw(const DDFilteredView &view, const std::string &name, std::string &value)
Definition: ListGroups.cc:23
static std::string dddGetString ( const std::string &  s,
DDFilteredView const &  view 
)
inlinestatic

Definition at line 51 of file ListGroups.cc.

References dddGetStringRaw(), AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

Referenced by ListGroups::analyze().

51  {
53  if (dddGetStringRaw(view, s, value))
54  return value;
55  else
56  return std::string();
57 }
static bool dddGetStringRaw(const DDFilteredView &view, const std::string &name, std::string &value)
Definition: ListGroups.cc:23
static bool dddGetStringRaw ( const DDFilteredView view,
const std::string &  name,
std::string &  value 
)
static

Definition at line 23 of file ListGroups.cc.

References DDfetch(), edm::hlt::Exception, query::result, DDFilteredView::specificsV(), and DDValue::strings().

Referenced by dddGetDouble(), and dddGetString().

23  {
24  std::vector<const DDsvalues_type *> result;
25  view.specificsV(result);
26  for (std::vector<const DDsvalues_type *>::iterator it = result.begin(); it != result.end(); ++it) {
28  if (DDfetch(*it, parameter)) {
29  if (parameter.strings().size() == 1) {
30  value = parameter.strings().front();
31  return true;
32  } else {
33  throw cms::Exception("Configuration")<< " ERROR: multiple " << name << " tags encountered";
34  return false;
35  }
36  }
37  }
38  return false;
39 }
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:80
tuple result
Definition: query.py:137
void specificsV(std::vector< const DDsvalues_type * > &result) const
User specific data attached to the current node.
static std::ostream& operator<< ( std::ostream &  out,
const math::XYZVector v 
)
inlinestatic

Definition at line 60 of file ListGroups.cc.

60  {
61  out << std::fixed << std::setprecision(3);
62  return out << "(" << v.rho() << ", " << v.z() << ", " << v.phi() << ")";
63 }
tuple out
Definition: dbtoconf.py:99
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< ListGroups > > s_filler__LINE__ ( "ListGroups"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< ListGroups > > s_maker__LINE__ ( "ListGroups"  )
static