test
CMS 3D CMS Logo

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

Namespaces

 concurrency
 
 detail
 

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  Digest
 
class  DigitizerFP420
 
class  ElseMETProducer
 
class  Exception
 
class  FastSimDataFilter
 
class  GenMETProducer
 
class  HcalConstantsASCIIWriter
 
class  HitReCalibrator
 
class  JetCorrectionProducer
 
class  JetVertexAssociation
 
struct  MD5Result
 
class  METSignificanceProducer
 
class  MinBias
 
class  MTCCHLTrigger
 
class  MuonMET
 
class  MuonMETValueMapProducer
 
class  MuonTCMETValueMapProducer
 
class  PFClusterMETProducer
 
class  PFMETProducer
 
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
 
def generate
 
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 >
::type
operator<< (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 >
::type
operator<< (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 >
::type
operator<< (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
 

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, compareJSON::const, AlCaHLTBitMon_QueryRunRegistry::data, and MOD_ADLER.

Referenced by Adler32(), edm::StreamerInputSource::deserializeEvent(), edm::StreamerInputSource::deserializeRegistry(), evf::RecoEventOutputModuleForFU< Consumer >::doOutputHeader(), evf::RecoEventOutputModuleForFU< Consumer >::endLuminosityBlock(), HLTriggerJSONMonitoring::globalEndLuminosityBlockSummary(), L1TriggerJSONMonitoring::globalEndLuminosityBlockSummary(), TriggerJSONMonitoring::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
string const
Definition: compareJSON.py:14
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
double a
Definition: hdecay.h:121
def cms.cms_error ( )

Definition at line 51 of file cms.py.

Referenced by generate().

51 
52 def cms_error():
53  "Standard CMS error message"
54  msg = "\nPackages must be created in a 'subsystem'."
55  msg += "\nPlease set your CMSSW environment and go to $CMSSW_BASE/src"
56  msg += "\nCreate or choose directory from there and then "
57  msg += "\nrun the script from that directory"
58  return msg
def cms_error
Definition: cms.py:51
def cms.config (   tmpl,
  pkg_help,
  tmpl_dir 
)

Definition at line 17 of file cms.py.

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

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 alignCSCRings::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 alignCSCRings::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 alignCSCRings::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 alignCSCRings::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 alignCSCRings::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 alignCSCRings::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().

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().

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

Referenced by cms::MD5Result::toString().