CMS 3D CMS Logo

Namespaces | Classes | Functions | Variables
cms Namespace Reference

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  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 generate (kwds)
 
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
 

Detailed Description

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(), evf::RecoEventOutputModuleForFU< Consumer >::endLuminosityBlock(), 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 51 of file cms.py.

Referenced by generate().

51 def cms_error():
52  "Standard CMS error message"
53  msg = "\nPackages must be created in a 'subsystem'."
54  msg += "\nPlease set your CMSSW environment and go to $CMSSW_BASE/src"
55  msg += "\nCreate or choose directory from there and then "
56  msg += "\nrun the script from that directory"
57  return msg
58 
def cms_error()
Definition: cms.py:51
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, 'tmpl_dir': tmpl_dir}
21  etags = []
22  if len(sys.argv) >= 2: # user give us arguments
23  if sys.argv[1] in ['-h', '--help', '-help']:
24  print pkg_help
25  sys.exit(0)
26  kwds['pname'] = sys.argv[1]
27  for idx in xrange(2, len(sys.argv)):
28  opt = sys.argv[idx]
29  if opt == '-author':
30  kwds['author'] = sys.argv[idx+1]
31  continue
32  if opt.find('example') != -1:
33  etags.append('@%s' % opt)
34  continue
35  if opt in ['-h', '--help', '-help']:
36  print pkg_help
37  sys.exit(0)
38  if opt == '-debug':
39  kwds['debug'] = True
40  continue
41  elif len(sys.argv) == 1:
42  # need to walk
43  msg = 'Please enter %s name: ' % tmpl.lower()
44  kwds['pname'] = raw_input(msg)
45  else:
46  print pkg_help
47  sys.exit(0)
48  kwds['tmpl_etags'] = etags
49  return kwds
50 
def config(tmpl, pkg_help, tmpl_dir)
Definition: cms.py:17
def cms.generate (   kwds)

Definition at line 87 of file cms.py.

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

87 def generate(kwds):
88  "Run generator code based on provided set of arguments"
89  config = dict(kwds)
90  tmpl = kwds.get('tmpl')
91  stand_alone_group = ['Record', 'Skeleton']
92  config.update({'not_in_dir': stand_alone_group})
93  if tmpl in stand_alone_group:
94  whereami, ldir = test_cms_environment(tmpl)
95  dirs = ldir.split('/')
96  config.update({'pkgname': kwds.get('pname')})
97  config.update({'subsystem': 'Subsystem'})
98  config.update({'pkgname': 'Package'})
99  if whereami:
100  if len(dirs) >= 3:
101  config.update({'subsystem': dirs[1]})
102  config.update({'pkgname': dirs[2]})
103  elif len(dirs) >= 2:
104  config.update({'subsystem': dirs[1]})
105  config.update({'pkgname': dirs[1]})
106  else:
107  whereami, ldir = test_cms_environment(tmpl)
108  dirs = ldir.split('/')
109  if not dirs or not whereami:
110  print cms_error()
111  sys.exit(1)
112  config.update({'subsystem': dirs[1]})
113  config.update({'pkgname': kwds.get('pname')})
114  if whereami in ['src', 'plugins']:
115  config.update({'tmpl_files': '.cc'})
116  config.update({'pkgname': dirs[2]})
117  elif whereami == 'subsystem':
118  config.update({'tmpl_files': 'all'})
119  else:
120  print cms_error()
121  sys.exit(1)
122  obj = code_generator(config)
123  obj.generate()
124 
def test_cms_environment(tmpl)
Definition: cms.py:59
def cms_error()
Definition: cms.py:51
def code_generator(kwds)
Definition: utils.py:106
def generate(kwds)
Definition: cms.py:87
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 218 of file Exception.h.

References cms::Exception::explainSelf().

219  {
220  ost << e.explainSelf();
221  return ost;
222  }
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 229 of file Exception.h.

References MillePedeFileConverter_cfg::e.

230  {
231  e.ost_ << stuff;
232  return e;
233  }
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 238 of file Exception.h.

References MillePedeFileConverter_cfg::e.

239  {
240  E& ref = const_cast<E&>(e);
241  ref.ost_ << stuff;
242  return e;
243  }
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 248 of file Exception.h.

References MillePedeFileConverter_cfg::e, and f.

249  {
250  f(e.ost_);
251  return e;
252  }
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 257 of file Exception.h.

References MillePedeFileConverter_cfg::e, and f.

258  {
259  E& ref = const_cast<E&>(e);
260  f(ref.ost_);
261  return e;
262  }
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 267 of file Exception.h.

References MillePedeFileConverter_cfg::e, and f.

268  {
269  f(e.ost_);
270  return e;
271  }
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 277 of file Exception.h.

References MillePedeFileConverter_cfg::e, and f.

278  {
279  E& ref = const_cast<E&>(e);
280  f(ref.ost_);
281  return e;
282  }
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 59 of file cms.py.

Referenced by generate().

60  """
61  Test CMS environment and requirements to run within CMSSW_BASE.
62  Return True if we fullfill requirements and False otherwise.
63  """
64  base = os.environ.get('CMSSW_BASE', None)
65  if not base:
66  return False, []
67  cdir = os.getcwd()
68  ldir = cdir.replace(os.path.join(base, 'src'), '')
69  dirs = ldir.split('/')
70  # test if we're within CMSSW_BASE/src/SubSystem area
71  if ldir and ldir[0] == '/' and len(dirs) == 2:
72  return 'subsystem', ldir
73  # test if we're within CMSSW_BASE/src/SubSystem/Pkg area
74  if ldir and ldir[0] == '/' and len(dirs) == 3:
75  return 'package', ldir
76  # test if we're within CMSSW_BASE/src/SubSystem/Pkg/src area
77 # if ldir and ldir[0] == '/' and len(dirs) == 4 and dirs[-1] == 'src':
78 # return 'src', ldir
79  # test if we're within CMSSW_BASE/src/SubSystem/Pkg/plugin area
80 # if ldir and ldir[0] == '/' and len(dirs) == 4 and dirs[-1] == 'plugins':
81 # return 'plugins', ldir
82  # test if we're within CMSSW_BASE/src/SubSystem/Pkg/dir area
83  if ldir and ldir[0] == '/' and len(dirs) == 4:
84  return dirs[-1], ldir
85  return False, ldir
86 
def test_cms_environment(tmpl)
Definition: cms.py:59

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.