CMS 3D CMS Logo

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/ESHandle.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/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)
 DEFINE_FWK_MODULE (ListGroups)
static std::ostream & operator<< (std::ostream &out, const math::XYZVector &v)


Function Documentation

static double dddGetDouble ( const std::string &  s,
DDFilteredView const &  view 
) [inline, static]

Definition at line 42 of file ListGroups.cc.

References dddGetStringRaw(), and value.

00042                                                                       {
00043   std::string value;
00044   if (dddGetStringRaw(view, s, value))
00045     return double(::atof(value.c_str()));
00046   else
00047     return NAN;
00048 }

static std::string dddGetString ( const std::string &  s,
DDFilteredView const &  view 
) [inline, static]

Definition at line 51 of file ListGroups.cc.

References dddGetStringRaw(), and value.

Referenced by ListGroups::beginJob(), and ListIds::beginJob().

00051                                                                          {
00052   std::string value;
00053   if (dddGetStringRaw(view, s, value))
00054     return value;
00055   else
00056     return std::string();
00057 }

static bool dddGetStringRaw ( const DDFilteredView view,
const std::string &  name,
std::string &  value 
) [static]

Definition at line 23 of file ListGroups.cc.

References DDfetch(), Exception, it, parseConfig::parameter, HLT_VtxMuL3::result, DDFilteredView::specificsV(), and DDValue::strings().

Referenced by dddGetDouble(), and dddGetString().

00023                                                                                              {
00024   std::vector<const DDsvalues_type *> result;
00025   view.specificsV(result);
00026   for (std::vector<const DDsvalues_type *>::iterator it = result.begin(); it != result.end(); ++it)   {
00027     DDValue parameter(name);
00028     if (DDfetch(*it, parameter)) {
00029       if (parameter.strings().size() == 1) {
00030         value = parameter.strings().front();
00031         return true;
00032       } else {
00033         throw cms::Exception("Configuration")<< " ERROR: multiple " << name << " tags encountered";
00034         return false;
00035       }
00036     }
00037   }
00038   return false;
00039 }

DEFINE_FWK_MODULE ( ListGroups   ) 

static std::ostream& operator<< ( std::ostream &  out,
const math::XYZVector v 
) [inline, static]

Definition at line 60 of file ListGroups.cc.

00060                                                                    {
00061   out << std::fixed << std::setprecision(3);
00062   return out << "(" << v.rho() << ", " << v.z() << ", " << v.phi() << ")";
00063 }


Generated on Tue Jun 9 17:55:51 2009 for CMSSW by  doxygen 1.5.4