CMS 3D CMS Logo

Namespaces | Classes | Functions | Variables
cms Namespace Reference

Namespace of DDCMS conversion namespace. More...

Namespaces

 concurrency
 
 detail
 
 xerces
 

Classes

class  Analyzer_minbias
 
class  BHFilter
 
class  CaloMETProducer
 
class  CATopJetProducer
 
class  CkfDebugTrackCandidateMaker
 
class  CkfTrackCandidateMaker
 
class  CkfTrackCandidateMakerBase
 
class  CkfTrajectoryMaker
 
class  ClusterizerFP420
 
class  ClusterMTCCFilter
 
class  CompareTrajChi
 
class  CompareTrajLay
 
class  CompoundJetProducer
 
class  CosmicTIFTrigFilter
 
class  CosmicTrackFinder
 
class  CRC32Calculator
 
class  CSJetProducer
 
class  DDAlgoArguments
 
class  DDCMSDetElementCreator
 
class  DDNamespace
 
class  DDParsingContext
 
class  DDSingleton
 
class  Digest
 
class  DigitizerFP420
 
class  ElseMETProducer
 
class  Exception
 
class  FastSimDataFilter
 
class  GenMETProducer
 
class  HitReCalibrator
 
class  HTTTopJetProducer
 
class  JetCorrectionProducer
 
class  JetVertexAssociation
 
struct  MD5Result
 
class  METSignificanceProducer
 
class  MinBias
 
class  MTCCHLTrigger
 
class  MuonMET
 
class  MuonMETValueMapProducer
 
class  MuonTCMETValueMapProducer
 
class  PFClusterMETProducer
 
class  PFMETProducer
 
class  Phase2TrackerDigitizer
 
class  PileupJPTJetIdAlgo
 
class  PileupVertexAccumulator
 
class  ProducerAnalyzer
 
class  ReconstructerFP420
 
class  SiPixelDigitizer
 
class  SiPixelRecHitConverter
 
class  SubEventGenJetProducer
 
class  SubJetProducer
 
class  TCMETProducer
 
class  TECClusterFilter
 
class  TrackerizerFP420
 
class  TrackMTCCFilter
 

Functions

void Adler32 (char const *data, size_t len, uint32_t &a, uint32_t &b)
 
uint32_t Adler32 (char const *data, size_t len)
 
def cms_error ()
 
def config (tmpl, pkg_help, tmpl_dir)
 
def config_with_parser (tmpl, args, tmpl_dir)
 
std::string detElementName (dd4hep::PlacedVolume volume)
 
def generate (kwds)
 
constexpr unsigned int hash (const char *str, int h=0)
 
unsigned int hash (const std::string &str)
 
dd4hep::Rotation3D makeRotation3D (double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
 
dd4hep::Rotation3D makeRotation3D (dd4hep::Rotation3D rotation, const std::string &axis, double angle)
 
bool operator!= (MD5Result const &a, MD5Result const &b)
 
bool operator< (MD5Result const &a, MD5Result const &b)
 
std::ostream & operator<< (std::ostream &os, MD5Result const &r)
 
std::ostream & operator<< (std::ostream &ost, Exception const &e)
 
template<typename E , typename T >
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::typeoperator<< (E &e, T const &stuff)
 
template<typename E , typename T >
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::type const & operator<< (E const &e, T const &stuff)
 
template<typename E >
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::typeoperator<< (E &e, std::ostream &(*f)(std::ostream &))
 
template<typename E >
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::type const & operator<< (E const &e, std::ostream &(*f)(std::ostream &))
 
template<typename E >
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::typeoperator<< (E &e, std::ios_base &(*f)(std::ios_base &))
 
template<typename E >
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::type const & operator<< (E const &e, std::ios_base &(*f)(std::ios_base &))
 
bool operator== (MD5Result const &a, MD5Result const &b)
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< TCMETProducer > > s_filler__LINE__ ("TCMETProducer")
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< GenMETProducer > > s_filler__LINE__ ("GenMETProducer")
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< PFClusterMETProducer > > s_filler__LINE__ ("PFClusterMETProducer")
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< ElseMETProducer > > s_filler__LINE__ ("ElseMETProducer")
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< MuonMET > > s_filler__LINE__ ("MuonMET")
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< CaloMETProducer > > s_filler__LINE__ ("CaloMETProducer")
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< METSignificanceProducer > > s_filler__LINE__ ("METSignificanceProducer")
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< PFMETProducer > > s_filler__LINE__ ("PFMETProducer")
 
static const edm::MakerPluginFactory::PMaker< edm::WorkerMaker< TCMETProducer > > s_maker__LINE__ ("TCMETProducer")
 
static const edm::MakerPluginFactory::PMaker< edm::WorkerMaker< GenMETProducer > > s_maker__LINE__ ("GenMETProducer")
 
static const edm::MakerPluginFactory::PMaker< edm::WorkerMaker< PFClusterMETProducer > > s_maker__LINE__ ("PFClusterMETProducer")
 
static const edm::MakerPluginFactory::PMaker< edm::WorkerMaker< ElseMETProducer > > s_maker__LINE__ ("ElseMETProducer")
 
static const edm::MakerPluginFactory::PMaker< edm::WorkerMaker< MuonMET > > s_maker__LINE__ ("MuonMET")
 
static const edm::MakerPluginFactory::PMaker< edm::WorkerMaker< CaloMETProducer > > s_maker__LINE__ ("CaloMETProducer")
 
static const edm::MakerPluginFactory::PMaker< edm::WorkerMaker< METSignificanceProducer > > s_maker__LINE__ ("METSignificanceProducer")
 
static const edm::MakerPluginFactory::PMaker< edm::WorkerMaker< PFMETProducer > > s_maker__LINE__ ("PFMETProducer")
 
void set_to_default (MD5Result &val)
 
def test_cms_environment (tmpl)
 

Variables

static const char * s_hexValues
 
const ::dd4hep::xml::Tag_t Unicode_Algorithm
 
const ::dd4hep::xml::Tag_t Unicode_alp1
 
const ::dd4hep::xml::Tag_t Unicode_alp2
 
const ::dd4hep::xml::Tag_t Unicode_atMinusZ
 
const ::dd4hep::xml::Tag_t Unicode_atomicNumber
 
const ::dd4hep::xml::Tag_t Unicode_atomicWeight
 
const ::dd4hep::xml::Tag_t Unicode_axis
 
const ::dd4hep::xml::Tag_t Unicode_bl1
 
const ::dd4hep::xml::Tag_t Unicode_bl2
 
const ::dd4hep::xml::Tag_t Unicode_Box
 
const ::dd4hep::xml::Tag_t Unicode_ChildName
 
const ::dd4hep::xml::Tag_t Unicode_close_geometry
 
const ::dd4hep::xml::Tag_t Unicode_CompositeMaterial
 
const ::dd4hep::xml::Tag_t Unicode_Cone
 
const ::dd4hep::xml::Tag_t Unicode_Constant
 
const ::dd4hep::xml::Tag_t Unicode_ConstantsSection
 
const ::dd4hep::xml::Tag_t Unicode_copyNumber
 
const ::dd4hep::xml::Tag_t Unicode_cutAtDelta
 
const ::dd4hep::xml::Tag_t Unicode_cutAtStart
 
const ::dd4hep::xml::Tag_t Unicode_cutInside
 
const ::dd4hep::xml::Tag_t Unicode_CutTubs
 
const ::dd4hep::xml::Tag_t Unicode_DDCMS
 
const ::dd4hep::xml::Tag_t Unicode_DDDefinition
 
const ::dd4hep::xml::Tag_t Unicode_debug_algorithms
 
const ::dd4hep::xml::Tag_t Unicode_debug_constants
 
const ::dd4hep::xml::Tag_t Unicode_debug_includes
 
const ::dd4hep::xml::Tag_t Unicode_debug_materials
 
const ::dd4hep::xml::Tag_t Unicode_debug_namespaces
 
const ::dd4hep::xml::Tag_t Unicode_debug_placements
 
const ::dd4hep::xml::Tag_t Unicode_debug_rotations
 
const ::dd4hep::xml::Tag_t Unicode_debug_shapes
 
const ::dd4hep::xml::Tag_t Unicode_debug_visattr
 
const ::dd4hep::xml::Tag_t Unicode_debug_volumes
 
const ::dd4hep::xml::Tag_t Unicode_deltaPhi
 
const ::dd4hep::xml::Tag_t Unicode_deltaTheta
 
const ::dd4hep::xml::Tag_t Unicode_density
 
const ::dd4hep::xml::Tag_t Unicode_DisabledAlgo
 
const ::dd4hep::xml::Tag_t Unicode_dx
 
const ::dd4hep::xml::Tag_t Unicode_dx1
 
const ::dd4hep::xml::Tag_t Unicode_dx2
 
const ::dd4hep::xml::Tag_t Unicode_dy
 
const ::dd4hep::xml::Tag_t Unicode_dy1
 
const ::dd4hep::xml::Tag_t Unicode_dy2
 
const ::dd4hep::xml::Tag_t Unicode_dz
 
const ::dd4hep::xml::Tag_t Unicode_ElementaryMaterial
 
const ::dd4hep::xml::Tag_t Unicode_Ellipsoid
 
const ::dd4hep::xml::Tag_t Unicode_EllipticalTube
 
const ::dd4hep::xml::Tag_t Unicode_firstSolid
 
const ::dd4hep::xml::Tag_t Unicode_h1
 
const ::dd4hep::xml::Tag_t Unicode_h2
 
const ::dd4hep::xml::Tag_t Unicode_Include
 
const ::dd4hep::xml::Tag_t Unicode_IncludeSection
 
const ::dd4hep::xml::Tag_t Unicode_innerRadius
 
const ::dd4hep::xml::Tag_t Unicode_LogicalPart
 
const ::dd4hep::xml::Tag_t Unicode_LogicalPartSection
 
const ::dd4hep::xml::Tag_t Unicode_lx
 
const ::dd4hep::xml::Tag_t Unicode_ly
 
const ::dd4hep::xml::Tag_t Unicode_lz
 
const ::dd4hep::xml::Tag_t Unicode_MaterialFraction
 
const ::dd4hep::xml::Tag_t Unicode_MaterialSection
 
const ::dd4hep::xml::Tag_t Unicode_nEntries
 
const ::dd4hep::xml::Tag_t Unicode_Numeric
 
const ::dd4hep::xml::Tag_t Unicode_numSide
 
const ::dd4hep::xml::Tag_t Unicode_open_geometry
 DD4hep specific. More...
 
const ::dd4hep::xml::Tag_t Unicode_outerRadius
 
const ::dd4hep::xml::Tag_t Unicode_phiX
 
const ::dd4hep::xml::Tag_t Unicode_phiY
 
const ::dd4hep::xml::Tag_t Unicode_phiZ
 
const ::dd4hep::xml::Tag_t Unicode_Polycone
 
const ::dd4hep::xml::Tag_t Unicode_Polyhedra
 
const ::dd4hep::xml::Tag_t Unicode_PosPart
 
const ::dd4hep::xml::Tag_t Unicode_PosPartSection
 
const ::dd4hep::xml::Tag_t Unicode_PseudoTrap
 
const ::dd4hep::xml::Tag_t Unicode_rChild
 
const ::dd4hep::xml::Tag_t Unicode_rMaterial
 
const ::dd4hep::xml::Tag_t Unicode_rMax
 
const ::dd4hep::xml::Tag_t Unicode_rMax1
 
const ::dd4hep::xml::Tag_t Unicode_rMax2
 
const ::dd4hep::xml::Tag_t Unicode_rMin
 
const ::dd4hep::xml::Tag_t Unicode_rMin1
 
const ::dd4hep::xml::Tag_t Unicode_rMin2
 
const ::dd4hep::xml::Tag_t Unicode_Rotation
 
const ::dd4hep::xml::Tag_t Unicode_RotationByAxis
 
const ::dd4hep::xml::Tag_t Unicode_RotationSection
 
const ::dd4hep::xml::Tag_t Unicode_RotationSequence
 
const ::dd4hep::xml::Tag_t Unicode_rParent
 
const ::dd4hep::xml::Tag_t Unicode_rRotation
 
const ::dd4hep::xml::Tag_t Unicode_rSolid
 
const ::dd4hep::xml::Tag_t Unicode_RZPoint
 
const ::dd4hep::xml::Tag_t Unicode_scale
 
const ::dd4hep::xml::Tag_t Unicode_secondSolid
 
const ::dd4hep::xml::Tag_t Unicode_SolidSection
 
const ::dd4hep::xml::Tag_t Unicode_Sphere
 
const ::dd4hep::xml::Tag_t Unicode_startPhi
 
const ::dd4hep::xml::Tag_t Unicode_startTheta
 
const ::dd4hep::xml::Tag_t Unicode_String
 
const ::dd4hep::xml::Tag_t Unicode_SubtractionSolid
 
const ::dd4hep::xml::Tag_t Unicode_symbol
 
const ::dd4hep::xml::Tag_t Unicode_thetaX
 
const ::dd4hep::xml::Tag_t Unicode_thetaY
 
const ::dd4hep::xml::Tag_t Unicode_thetaZ
 
const ::dd4hep::xml::Tag_t Unicode_tl1
 
const ::dd4hep::xml::Tag_t Unicode_tl2
 
const ::dd4hep::xml::Tag_t Unicode_Torus
 
const ::dd4hep::xml::Tag_t Unicode_torusRadius
 
const ::dd4hep::xml::Tag_t Unicode_Transformation
 
const ::dd4hep::xml::Tag_t Unicode_TransformationSection
 
const ::dd4hep::xml::Tag_t Unicode_Translation
 
const ::dd4hep::xml::Tag_t Unicode_Trapezoid
 
const ::dd4hep::xml::Tag_t Unicode_TruncTubs
 
const ::dd4hep::xml::Tag_t Unicode_Tubs
 
const ::dd4hep::xml::Tag_t Unicode_tx
 
const ::dd4hep::xml::Tag_t Unicode_ty
 
const ::dd4hep::xml::Tag_t Unicode_tz
 
const ::dd4hep::xml::Tag_t Unicode_Vector
 
const ::dd4hep::xml::Tag_t Unicode_vis
 
const ::dd4hep::xml::Tag_t Unicode_vismaterial
 
const ::dd4hep::xml::Tag_t Unicode_VisSection
 
const ::dd4hep::xml::Tag_t Unicode_xSemiAxis
 
const ::dd4hep::xml::Tag_t Unicode_XYPoint
 
const ::dd4hep::xml::Tag_t Unicode_ySemiAxis
 
const ::dd4hep::xml::Tag_t Unicode_zBottomCut
 
const ::dd4hep::xml::Tag_t Unicode_zHalf
 
const ::dd4hep::xml::Tag_t Unicode_zHeight
 
const ::dd4hep::xml::Tag_t Unicode_ZSection
 
const ::dd4hep::xml::Tag_t Unicode_zSemiAxis
 
const ::dd4hep::xml::Tag_t Unicode_zTopCut
 
const ::dd4hep::xml::Tag_t Unicode_ZXYSection
 

Detailed Description

Namespace of DDCMS conversion namespace.

How ParameterSets are nested inside ParameterSets The main feature is that they're made persistent using a ParameterSetID, and only reconstituted as needed, when the value_ptr = 0;

This a basic exception type expected to be thrown by developer-written code. We recommend that you use it directly. It can also be used as a base class if needed.

Each Exception is identified by a category string. This category is a short word or phrase (no spaces) that described the problem that was encountered.

Information can be added to the Exception using the stream insertion operator (as one uses cout). We recommend using it in the following manner:

Example: if ((rc=func()) < 0) { throw cms::Exception("DataCorrupt") << "I died with rc = " << rc << std::endl; }

Derived types are expected to fix the category, either by 1) passing a string literal to the base class constructor, or 2) ensuring the developer gives a category name.

Example: class InfiniteLoop : public Exception { InfiniteLoop(const std::string& msg) : Exception("InfiniteLoop",msg) { } };

ExceptionCollector is a utility class that can be used to make sure that each function or functor in a sequence of calls is invoked even if a previous function throws. Each function/functor must take no arguments and return a void. std::bind can be used to convert a function taking arguments into a function taking no arguments. The exception strings are saved in a cms::Exception for optional rethrow.

Here is an example:

ExceptionCollector c("initialMessage");

c.call(std::bind(&MyClass::myFunction, myClassPtr)); c.call(std::bind(&MyClass::myOtherFunction, myClassPtr, myArgPtr)); c.call(std::bind(&myFreeFunction, myArgPtr)); if (c.hasThrown()) c.rethrow();

This insures that all three functions will be called before any exception is thrown.

Function Documentation

void cms::Adler32 ( char const *  data,
size_t  len,
uint32_t &  a,
uint32_t &  b 
)

Definition at line 11 of file Adler32Calculator.cc.

References a, data, and MOD_ADLER.

Referenced by Adler32(), edm::StreamerInputSource::deserializeEvent(), edm::StreamerInputSource::deserializeRegistry(), evf::RecoEventOutputModuleForFU< Consumer >::doOutputHeader(), L1TriggerJSONMonitoring::globalEndLuminosityBlockSummary(), HLTriggerJSONMonitoring::globalEndLuminosityBlockSummary(), edm::StreamSerializer::serializeEvent(), edm::StreamSerializer::serializeRegistry(), OutputFile::write(), and RawEventOutputModuleForBU< Consumer >::write().

11  {
12  /* data: Pointer to the data to be summed; len is in bytes */
13 
14  #define MOD_ADLER 65521
15 
16  unsigned char const* ptr = static_cast<unsigned char const*>(static_cast<void const*>(data));
17  while (len > 0) {
18  size_t tlen = (len > 5552 ? 5552 : len);
19  len -= tlen;
20  do {
21  a += *ptr++;
22  b += a;
23  } while (--tlen);
24 
25  a %= MOD_ADLER;
26  b %= MOD_ADLER;
27  }
28 
29  #undef MOD_ADLER
30  }
double b
Definition: hdecay.h:120
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
double a
Definition: hdecay.h:121
#define MOD_ADLER
uint32_t cms::Adler32 ( char const *  data,
size_t  len 
)

Definition at line 33 of file Adler32Calculator.cc.

References a, Adler32(), and b.

33  {
34  /* data: Pointer to the data to be summed; len is in bytes */
35  uint32_t a = 1, b = 0;
36  Adler32(data, len, a, b);
37  return (b << 16) | a;
38  }
void Adler32(char const *data, size_t len, uint32_t &a, uint32_t &b)
double b
Definition: hdecay.h:120
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
double a
Definition: hdecay.h:121
def cms.cms_error ( )

Definition at line 69 of file cms.py.

Referenced by generate().

69 def cms_error():
70  "Standard CMS error message"
71  msg = "\nPackages must be created in a 'subsystem'."
72  msg += "\nPlease set your CMSSW environment and go to $CMSSW_BASE/src"
73  msg += "\nCreate or choose directory from there and then "
74  msg += "\nrun the script from that directory"
75  return msg
76 
def cms_error()
Definition: cms.py:69
def cms.config (   tmpl,
  pkg_help,
  tmpl_dir 
)

Definition at line 17 of file cms.py.

17 def config(tmpl, pkg_help, tmpl_dir):
18  "Parse input arguments to mk-script"
19  kwds = {'author': '', 'tmpl': tmpl,
20  'args': {}, 'debug': False,
21  'tmpl_dir': tmpl_dir, 'working_dir': ''}
22  etags = []
23  if len(sys.argv) >= 2: # user give us arguments
24  if sys.argv[1] in ['-h', '--help', '-help']:
25  print pkg_help
26  sys.exit(0)
27  kwds['pname'] = sys.argv[1]
28  for idx in xrange(2, len(sys.argv)):
29  opt = sys.argv[idx]
30  if opt == '-author':
31  kwds['author'] = sys.argv[idx+1]
32  continue
33  if opt.find('example') != -1:
34  etags.append('@%s' % opt)
35  continue
36  if opt in ['-h', '--help', '-help']:
37  print pkg_help
38  sys.exit(0)
39  if opt == '-debug':
40  kwds['debug'] = True
41  continue
42  elif len(sys.argv) == 1:
43  # need to walk
44  msg = 'Please enter %s name: ' % tmpl.lower()
45  kwds['pname'] = raw_input(msg)
46  else:
47  print pkg_help
48  sys.exit(0)
49  kwds['tmpl_etags'] = etags
50  return kwds
51 
def config(tmpl, pkg_help, tmpl_dir)
Definition: cms.py:17
def cms.config_with_parser (   tmpl,
  args,
  tmpl_dir 
)
Inject arguments parsed upstream into mk-scripts.
The arguments are parsed by the different front-ends(binaries)
and passed here via the args object.

Definition at line 52 of file cms.py.

52 def config_with_parser(tmpl, args, tmpl_dir):
53  """
54  Inject arguments parsed upstream into mk-scripts.
55  The arguments are parsed by the different front-ends(binaries)
56  and passed here via the args object.
57  """
58 
59  kwds = {'author': '', 'tmpl': tmpl,
60  'args': {}, 'debug': False, 'tmpl_dir': tmpl_dir}
61  etags = []
62  kwds['pname'] = args.subpackage_name
63  if args.author: kwds['author'] = args.author
64  if args.debug: kwds['debug'] = True
65  if args.example: etags.append('@%s' % args.example)
66  kwds['tmpl_etags'] = etags
67  return kwds
68 
def config_with_parser(tmpl, args, tmpl_dir)
Definition: cms.py:52
std::string cms::detElementName ( dd4hep::PlacedVolume  volume)

Definition at line 85 of file DDCMSDetElementCreator.cc.

References dataset::name, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by cms::DDCMSDetElementCreator::createElement(), and cms::DDCMSDetElementCreator::createTopLevelDetectors().

85  {
86  if( volume.isValid()) {
87  std::string name = volume.name();
88  std::string nnam = name.substr( name.find('_') + 1 );
89  return nnam;
90  }
91  except("MyDDCMS","++ Cannot deduce name from invalid PlacedVolume handle!");
92  return std::string();
93 }
def cms.generate (   kwds)

Definition at line 105 of file cms.py.

References cms_error(), utils.code_generator(), cmsPerfStripChart.dict, and test_cms_environment().

105 def generate(kwds):
106  "Run generator code based on provided set of arguments"
107  config = dict(kwds)
108  tmpl = kwds.get('tmpl')
109  stand_alone_group = ['Record', 'Skeleton']
110  config.update({'not_in_dir': stand_alone_group})
111  if tmpl in stand_alone_group:
112  whereami, ldir = test_cms_environment(tmpl)
113  dirs = ldir.split('/')
114  config.update({'pkgname': kwds.get('pname')})
115  config.update({'subsystem': 'Subsystem'})
116  config.update({'pkgname': 'Package'})
117  if whereami:
118  if len(dirs) >= 3:
119  config.update({'subsystem': dirs[1]})
120  config.update({'pkgname': dirs[2]})
121  elif len(dirs) >= 2:
122  config.update({'subsystem': dirs[1]})
123  config.update({'pkgname': dirs[1]})
124  else:
125  whereami, ldir = test_cms_environment(tmpl)
126  dirs = ldir.split('/')
127  if not dirs or not whereami:
128  print cms_error()
129  sys.exit(1)
130  config.update({'subsystem': dirs[1]})
131  config.update({'pkgname': kwds.get('pname')})
132  if whereami in ['src', 'plugins']:
133  config.update({'working_dir': whereami})
134  config.update({'tmpl_files': '.cc'})
135  config.update({'pkgname': dirs[2]})
136  elif whereami == 'test':
137  config.update({'working_dir': whereami})
138  config.update({'tmpl_files':'.cc'})
139  config.update({'pkgname': dirs[2]})
140  elif whereami == 'subsystem':
141  config.update({'tmpl_files': 'all'})
142  else:
143  print cms_error()
144  sys.exit(1)
145  obj = code_generator(config)
146  obj.generate()
147 
def test_cms_environment(tmpl)
Definition: cms.py:77
def cms_error()
Definition: cms.py:69
def code_generator(kwds)
Definition: utils.py:106
def generate(kwds)
Definition: cms.py:105
constexpr unsigned int cms::hash ( const char *  str,
int  h = 0 
)

Definition at line 15 of file DDAlgoArguments.h.

References h.

Referenced by hash().

16  {
17  return !str[h] ? 5381 : ( hash( str, h+1 )*33 ) ^ str[h];
18  }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
unsigned int hash(const std::string &str)
#define str(s)
unsigned int cms::hash ( const std::string &  str)
inline

Definition at line 20 of file DDAlgoArguments.h.

References angle(), hash(), makeRotation3D(), idealTransformation::rotation, AlCaHLTBitMon_QueryRunRegistry::string, DOFs::thetaX, DOFs::thetaY, and DOFs::thetaZ.

21  {
22  return hash( str.c_str());
23  }
unsigned int hash(const std::string &str)
#define str(s)
dd4hep::Rotation3D cms::makeRotation3D ( double  thetaX,
double  phiX,
double  thetaY,
double  phiY,
double  thetaZ,
double  phiZ 
)

Definition at line 19 of file DDAlgoArguments.cc.

References funct::cos(), RecoTauValidation_cfi::posX, RecoTauValidation_cfi::posY, idealTransformation::rotation, and funct::sin().

Referenced by algorithm(), and hash().

21  {
22  dd4hep::Position posX( sin( thetaX ) * cos( phiX ),
23  sin( thetaX ) * sin( phiX ),
24  cos( thetaX ));
25  dd4hep::Position posY( sin( thetaY ) * cos( phiY ),
26  sin( thetaY ) * sin( phiY ),
27  cos( thetaY ));
28  dd4hep::Position posZ( sin( thetaZ ) * cos( phiZ ),
29  sin( thetaZ ) * sin( phiZ ),
30  cos( thetaZ ));
31  dd4hep::Rotation3D rotation( posX, posY, posZ );
32 
33  return rotation;
34 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
dd4hep::Rotation3D cms::makeRotation3D ( dd4hep::Rotation3D  rotation,
const std::string &  axis,
double  angle 
)

Definition at line 37 of file DDAlgoArguments.cc.

References cond::hash, and idealTransformation::rotation.

38 {
39  switch( hash( axis ))
40  {
41  case hash("x"):
42  rotation = dd4hep::RotationX( angle );
43  break;
44  case hash("y"):
45  rotation = dd4hep::RotationY( angle );
46  break;
47  case hash("z"):
48  rotation = dd4hep::RotationZ( angle );
49  break;
50  default:
51  throw std::runtime_error( "Axis is not valid." );
52  }
53  return rotation;
54 }
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
bool cms::operator!= ( MD5Result const &  a,
MD5Result const &  b 
)
inline

Definition at line 40 of file Digest.h.

References b.

41  {
42  return !(a==b);
43  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
bool cms::operator< ( MD5Result const &  a,
MD5Result const &  b 
)

Definition at line 154 of file Digest.cc.

References cms::MD5Result::bytes.

155  {
156  return std::lexicographical_compare(a.bytes,
157  a.bytes+sizeof(a.bytes),
158  b.bytes,
159  b.bytes+sizeof(b.bytes));
160  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
std::ostream& cms::operator<< ( std::ostream &  os,
MD5Result const &  r 
)
inline

Definition at line 46 of file Digest.h.

References cms::MD5Result::toString().

Referenced by edm::ParameterSet::empty(), edm::ParameterSetEntry::id(), cms::Exception::raise(), and edm::Entry::typeCode().

47  {
48  os << r.toString();
49  return os;
50  }
std::ostream& cms::operator<< ( std::ostream &  ost,
Exception const &  e 
)
inline

Definition at line 217 of file Exception.h.

References cms::Exception::explainSelf().

218  {
219  ost << e.explainSelf();
220  return ost;
221  }
template<typename E , typename T >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type& cms::operator<< ( E &  e,
T const &  stuff 
)
inline

Definition at line 228 of file Exception.h.

References MillePedeFileConverter_cfg::e.

229  {
230  e.ost_ << stuff;
231  return e;
232  }
template<typename E , typename T >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type const& cms::operator<< ( E const &  e,
T const &  stuff 
)
inline

Definition at line 237 of file Exception.h.

References MillePedeFileConverter_cfg::e.

238  {
239  E& ref = const_cast<E&>(e);
240  ref.ost_ << stuff;
241  return e;
242  }
template<typename E >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type& cms::operator<< ( E &  e,
std::ostream &(*)(std::ostream &)  f 
)
inline

Definition at line 247 of file Exception.h.

References MillePedeFileConverter_cfg::e, and f.

248  {
249  f(e.ost_);
250  return e;
251  }
double f[11][100]
template<typename E >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type const& cms::operator<< ( E const &  e,
std::ostream &(*)(std::ostream &)  f 
)
inline

Definition at line 256 of file Exception.h.

References MillePedeFileConverter_cfg::e, and f.

257  {
258  E& ref = const_cast<E&>(e);
259  f(ref.ost_);
260  return e;
261  }
double f[11][100]
template<typename E >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type& cms::operator<< ( E &  e,
std::ios_base &(*)(std::ios_base &)  f 
)
inline

Definition at line 266 of file Exception.h.

References MillePedeFileConverter_cfg::e, and f.

267  {
268  f(e.ost_);
269  return e;
270  }
double f[11][100]
template<typename E >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type const& cms::operator<< ( E const &  e,
std::ios_base &(*)(std::ios_base &)  f 
)
inline

Definition at line 276 of file Exception.h.

References MillePedeFileConverter_cfg::e, and f.

277  {
278  E& ref = const_cast<E&>(e);
279  f(ref.ost_);
280  return e;
281  }
double f[11][100]
bool cms::operator== ( MD5Result const &  a,
MD5Result const &  b 
)

Definition at line 148 of file Digest.cc.

References cms::MD5Result::bytes, and cond::serialization::equal().

Referenced by edm::swap().

149  {
150  return std::equal(a.bytes, a.bytes+sizeof(a.bytes), b.bytes);
151  }
bool equal(const T &first, const T &second)
Definition: Equal.h:34
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< TCMETProducer > > cms::s_filler__LINE__ ( "TCMETProducer"  )
static
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< GenMETProducer > > cms::s_filler__LINE__ ( "GenMETProducer"  )
static
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< PFClusterMETProducer > > cms::s_filler__LINE__ ( "PFClusterMETProducer"  )
static
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< ElseMETProducer > > cms::s_filler__LINE__ ( "ElseMETProducer"  )
static
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< MuonMET > > cms::s_filler__LINE__ ( "MuonMET"  )
static
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< CaloMETProducer > > cms::s_filler__LINE__ ( "CaloMETProducer"  )
static
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< METSignificanceProducer > > cms::s_filler__LINE__ ( "METSignificanceProducer"  )
static
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< PFMETProducer > > cms::s_filler__LINE__ ( "PFMETProducer"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< TCMETProducer > > cms::s_maker__LINE__ ( "TCMETProducer"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< GenMETProducer > > cms::s_maker__LINE__ ( "GenMETProducer"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< PFClusterMETProducer > > cms::s_maker__LINE__ ( "PFClusterMETProducer"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< ElseMETProducer > > cms::s_maker__LINE__ ( "ElseMETProducer"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< MuonMET > > cms::s_maker__LINE__ ( "MuonMET"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< CaloMETProducer > > cms::s_maker__LINE__ ( "CaloMETProducer"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< METSignificanceProducer > > cms::s_maker__LINE__ ( "METSignificanceProducer"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< PFMETProducer > > cms::s_maker__LINE__ ( "PFMETProducer"  )
static
void cms::set_to_default ( MD5Result val)

Definition at line 44 of file Digest.cc.

References cms::MD5Result::bytes.

Referenced by cms::MD5Result::fromHexifiedString(), and cms::MD5Result::MD5Result().

45  {
46  val.bytes[0] = 0xd4;
47  val.bytes[1] = 0x1d;
48  val.bytes[2] = 0x8c;
49  val.bytes[3] = 0xd9;
50  val.bytes[4] = 0x8f;
51  val.bytes[5] = 0x00;
52  val.bytes[6] = 0xb2;
53  val.bytes[7] = 0x04;
54  val.bytes[8] = 0xe9;
55  val.bytes[9] = 0x80;
56  val.bytes[10] = 0x09;
57  val.bytes[11] = 0x98;
58  val.bytes[12] = 0xec;
59  val.bytes[13] = 0xf8;
60  val.bytes[14] = 0x42;
61  val.bytes[15] = 0x7e;
62  }
def cms.test_cms_environment (   tmpl)
Test CMS environment and requirements to run within CMSSW_BASE.
Return True if we fullfill requirements and False otherwise.

Definition at line 77 of file cms.py.

Referenced by generate().

78  """
79  Test CMS environment and requirements to run within CMSSW_BASE.
80  Return True if we fullfill requirements and False otherwise.
81  """
82  base = os.environ.get('CMSSW_BASE', None)
83  if not base:
84  return False, []
85  cdir = os.getcwd()
86  ldir = cdir.replace(os.path.join(base, 'src'), '')
87  dirs = ldir.split('/')
88  # test if we're within CMSSW_BASE/src/SubSystem area
89  if ldir and ldir[0] == '/' and len(dirs) == 2:
90  return 'subsystem', ldir
91  # test if we're within CMSSW_BASE/src/SubSystem/Pkg area
92  if ldir and ldir[0] == '/' and len(dirs) == 3:
93  return 'package', ldir
94  # test if we're within CMSSW_BASE/src/SubSystem/Pkg/src area
95 # if ldir and ldir[0] == '/' and len(dirs) == 4 and dirs[-1] == 'src':
96 # return 'src', ldir
97  # test if we're within CMSSW_BASE/src/SubSystem/Pkg/plugin area
98 # if ldir and ldir[0] == '/' and len(dirs) == 4 and dirs[-1] == 'plugins':
99 # return 'plugins', ldir
100  # test if we're within CMSSW_BASE/src/SubSystem/Pkg/dir area
101  if ldir and ldir[0] == '/' and len(dirs) == 4:
102  return dirs[-1], ldir
103  return False, ldir
104 
def test_cms_environment(tmpl)
Definition: cms.py:77

Variable Documentation

const char* cms::s_hexValues
static
Initial value:
=
"000102030405060708090a0b0c0d0e0f"
"101112131415161718191a1b1c1d1e1f"
"202122232425262728292a2b2c2d2e2f"
"303132333435363738393a3b3c3d3e3f"
"404142434445464748494a4b4c4d4e4f"
"505152535455565758595a5b5c5d5e5f"
"606162636465666768696a6b6c6d6e6f"
"707172737475767778797a7b7c7d7e7f"
"808182838485868788898a8b8c8d8e8f"
"909192939495969798999a9b9c9d9e9f"
"a0a1a2a3a4a5a6a7a8a9aaabacadaeaf"
"b0b1b2b3b4b5b6b7b8b9babbbcbdbebf"
"c0c1c2c3c4c5c6c7c8c9cacbcccdcecf"
"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf"
"e0e1e2e3e4e5e6e7e8e9eaebecedeeef"
"f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff"

Definition at line 69 of file Digest.cc.

const ::dd4hep::xml::Tag_t cms::Unicode_Algorithm
const ::dd4hep::xml::Tag_t cms::Unicode_alp1
const ::dd4hep::xml::Tag_t cms::Unicode_alp2
const ::dd4hep::xml::Tag_t cms::Unicode_atMinusZ
const ::dd4hep::xml::Tag_t cms::Unicode_atomicNumber
const ::dd4hep::xml::Tag_t cms::Unicode_atomicWeight
const ::dd4hep::xml::Tag_t cms::Unicode_axis
const ::dd4hep::xml::Tag_t cms::Unicode_bl1
const ::dd4hep::xml::Tag_t cms::Unicode_bl2
const ::dd4hep::xml::Tag_t cms::Unicode_Box
const ::dd4hep::xml::Tag_t cms::Unicode_ChildName
const ::dd4hep::xml::Tag_t cms::Unicode_close_geometry
const ::dd4hep::xml::Tag_t cms::Unicode_CompositeMaterial
const ::dd4hep::xml::Tag_t cms::Unicode_Cone
const ::dd4hep::xml::Tag_t cms::Unicode_Constant
const ::dd4hep::xml::Tag_t cms::Unicode_ConstantsSection
const ::dd4hep::xml::Tag_t cms::Unicode_copyNumber
const ::dd4hep::xml::Tag_t cms::Unicode_cutAtDelta
const ::dd4hep::xml::Tag_t cms::Unicode_cutAtStart
const ::dd4hep::xml::Tag_t cms::Unicode_cutInside
const ::dd4hep::xml::Tag_t cms::Unicode_CutTubs
const ::dd4hep::xml::Tag_t cms::Unicode_DDCMS
const ::dd4hep::xml::Tag_t cms::Unicode_DDDefinition
const ::dd4hep::xml::Tag_t cms::Unicode_debug_algorithms
const ::dd4hep::xml::Tag_t cms::Unicode_debug_constants
const ::dd4hep::xml::Tag_t cms::Unicode_debug_includes
const ::dd4hep::xml::Tag_t cms::Unicode_debug_materials
const ::dd4hep::xml::Tag_t cms::Unicode_debug_namespaces
const ::dd4hep::xml::Tag_t cms::Unicode_debug_placements
const ::dd4hep::xml::Tag_t cms::Unicode_debug_rotations
const ::dd4hep::xml::Tag_t cms::Unicode_debug_shapes
const ::dd4hep::xml::Tag_t cms::Unicode_debug_visattr
const ::dd4hep::xml::Tag_t cms::Unicode_debug_volumes
const ::dd4hep::xml::Tag_t cms::Unicode_deltaPhi
const ::dd4hep::xml::Tag_t cms::Unicode_deltaTheta
const ::dd4hep::xml::Tag_t cms::Unicode_density
const ::dd4hep::xml::Tag_t cms::Unicode_DisabledAlgo
const ::dd4hep::xml::Tag_t cms::Unicode_dx
const ::dd4hep::xml::Tag_t cms::Unicode_dx1
const ::dd4hep::xml::Tag_t cms::Unicode_dx2
const ::dd4hep::xml::Tag_t cms::Unicode_dy
const ::dd4hep::xml::Tag_t cms::Unicode_dy1
const ::dd4hep::xml::Tag_t cms::Unicode_dy2
const ::dd4hep::xml::Tag_t cms::Unicode_dz
const ::dd4hep::xml::Tag_t cms::Unicode_ElementaryMaterial
const ::dd4hep::xml::Tag_t cms::Unicode_Ellipsoid
const ::dd4hep::xml::Tag_t cms::Unicode_EllipticalTube
const ::dd4hep::xml::Tag_t cms::Unicode_firstSolid
const ::dd4hep::xml::Tag_t cms::Unicode_h1
const ::dd4hep::xml::Tag_t cms::Unicode_h2
const ::dd4hep::xml::Tag_t cms::Unicode_Include
const ::dd4hep::xml::Tag_t cms::Unicode_IncludeSection
const ::dd4hep::xml::Tag_t cms::Unicode_innerRadius
const ::dd4hep::xml::Tag_t cms::Unicode_LogicalPart
const ::dd4hep::xml::Tag_t cms::Unicode_LogicalPartSection
const ::dd4hep::xml::Tag_t cms::Unicode_lx
const ::dd4hep::xml::Tag_t cms::Unicode_ly
const ::dd4hep::xml::Tag_t cms::Unicode_lz
const ::dd4hep::xml::Tag_t cms::Unicode_MaterialFraction
const ::dd4hep::xml::Tag_t cms::Unicode_MaterialSection
const ::dd4hep::xml::Tag_t cms::Unicode_nEntries
const ::dd4hep::xml::Tag_t cms::Unicode_Numeric
const ::dd4hep::xml::Tag_t cms::Unicode_numSide
const ::dd4hep::xml::Tag_t cms::Unicode_open_geometry

DD4hep specific.

const ::dd4hep::xml::Tag_t cms::Unicode_outerRadius
const ::dd4hep::xml::Tag_t cms::Unicode_phiX
const ::dd4hep::xml::Tag_t cms::Unicode_phiY
const ::dd4hep::xml::Tag_t cms::Unicode_phiZ
const ::dd4hep::xml::Tag_t cms::Unicode_Polycone
const ::dd4hep::xml::Tag_t cms::Unicode_Polyhedra
const ::dd4hep::xml::Tag_t cms::Unicode_PosPart
const ::dd4hep::xml::Tag_t cms::Unicode_PosPartSection
const ::dd4hep::xml::Tag_t cms::Unicode_PseudoTrap
const ::dd4hep::xml::Tag_t cms::Unicode_rChild
const ::dd4hep::xml::Tag_t cms::Unicode_rMaterial
const ::dd4hep::xml::Tag_t cms::Unicode_rMax
const ::dd4hep::xml::Tag_t cms::Unicode_rMax1
const ::dd4hep::xml::Tag_t cms::Unicode_rMax2
const ::dd4hep::xml::Tag_t cms::Unicode_rMin
const ::dd4hep::xml::Tag_t cms::Unicode_rMin1
const ::dd4hep::xml::Tag_t cms::Unicode_rMin2
const ::dd4hep::xml::Tag_t cms::Unicode_Rotation
const ::dd4hep::xml::Tag_t cms::Unicode_RotationByAxis
const ::dd4hep::xml::Tag_t cms::Unicode_RotationSection
const ::dd4hep::xml::Tag_t cms::Unicode_RotationSequence
const ::dd4hep::xml::Tag_t cms::Unicode_rParent
const ::dd4hep::xml::Tag_t cms::Unicode_rRotation
const ::dd4hep::xml::Tag_t cms::Unicode_rSolid
const ::dd4hep::xml::Tag_t cms::Unicode_RZPoint
const ::dd4hep::xml::Tag_t cms::Unicode_scale
const ::dd4hep::xml::Tag_t cms::Unicode_secondSolid
const ::dd4hep::xml::Tag_t cms::Unicode_SolidSection
const ::dd4hep::xml::Tag_t cms::Unicode_Sphere
const ::dd4hep::xml::Tag_t cms::Unicode_startPhi
const ::dd4hep::xml::Tag_t cms::Unicode_startTheta
const ::dd4hep::xml::Tag_t cms::Unicode_String
const ::dd4hep::xml::Tag_t cms::Unicode_SubtractionSolid
const ::dd4hep::xml::Tag_t cms::Unicode_symbol
const ::dd4hep::xml::Tag_t cms::Unicode_thetaX
const ::dd4hep::xml::Tag_t cms::Unicode_thetaY
const ::dd4hep::xml::Tag_t cms::Unicode_thetaZ
const ::dd4hep::xml::Tag_t cms::Unicode_tl1
const ::dd4hep::xml::Tag_t cms::Unicode_tl2
const ::dd4hep::xml::Tag_t cms::Unicode_Torus
const ::dd4hep::xml::Tag_t cms::Unicode_torusRadius
const ::dd4hep::xml::Tag_t cms::Unicode_Transformation
const ::dd4hep::xml::Tag_t cms::Unicode_TransformationSection
const ::dd4hep::xml::Tag_t cms::Unicode_Translation
const ::dd4hep::xml::Tag_t cms::Unicode_Trapezoid
const ::dd4hep::xml::Tag_t cms::Unicode_TruncTubs
const ::dd4hep::xml::Tag_t cms::Unicode_Tubs
const ::dd4hep::xml::Tag_t cms::Unicode_tx
const ::dd4hep::xml::Tag_t cms::Unicode_ty
const ::dd4hep::xml::Tag_t cms::Unicode_tz
const ::dd4hep::xml::Tag_t cms::Unicode_Vector
const ::dd4hep::xml::Tag_t cms::Unicode_vis
const ::dd4hep::xml::Tag_t cms::Unicode_vismaterial
const ::dd4hep::xml::Tag_t cms::Unicode_VisSection
const ::dd4hep::xml::Tag_t cms::Unicode_xSemiAxis
const ::dd4hep::xml::Tag_t cms::Unicode_XYPoint
const ::dd4hep::xml::Tag_t cms::Unicode_ySemiAxis
const ::dd4hep::xml::Tag_t cms::Unicode_zBottomCut
const ::dd4hep::xml::Tag_t cms::Unicode_zHalf
const ::dd4hep::xml::Tag_t cms::Unicode_zHeight
const ::dd4hep::xml::Tag_t cms::Unicode_ZSection
const ::dd4hep::xml::Tag_t cms::Unicode_zSemiAxis
const ::dd4hep::xml::Tag_t cms::Unicode_zTopCut
const ::dd4hep::xml::Tag_t cms::Unicode_ZXYSection