![]() |
![]() |
Namespaces | |
namespace | detail |
Classes | |
class | AlCaDiJetsProducer |
class | Analyzer_minbias |
class | BHFilter |
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 | DiJetAnalyzer |
class | Exception |
class | FastSimDataFilter |
class | GammaJetAnalysis |
class | HcalConstantsASCIIWriter |
class | HitReCalibrator |
class | JetCorrectionProducer |
class | JetVertexAssociation |
struct | MD5Result |
class | METProducer |
class | MinBias |
class | MTCCHLTrigger |
class | MuonMET |
class | MuonMETValueMapProducer |
class | MuonTCMETValueMapProducer |
class | ProducerAnalyzer |
class | ReconstructerFP420 |
class | SimpleTrackListMerger |
class | SiPixelClusterProducer |
class | SiPixelDigitizer |
class | SiPixelRecHitConverter |
class | SubEventGenJetProducer |
class | SubJetProducer |
class | TECClusterFilter |
class | TrackerizerFP420 |
class | TrackListMerger |
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) |
edm::ProductID | clusterProduct (const TrackingRecHit *hit) |
edm::ProductID | clusterProductB (const TrackingRecHit *hit) |
def | cms_error |
def | config |
def | generate |
bool | operator!= (MD5Result const &a, MD5Result const &b) |
bool | operator< (MD5Result const &a, MD5Result const &b) |
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) |
std::ostream & | operator<< (std::ostream &ost, Exception const &e) |
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 &)) |
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::ostream &(*f)(std::ostream &)) |
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 , typename T > | |
detail::Desired< E, detail::is_derived_or_same < Exception, E >::value > ::type & | operator<< (E &e, T const &stuff) |
std::ostream & | operator<< (std::ostream &os, MD5Result const &r) |
bool | operator== (MD5Result const &a, MD5Result const &b) |
void | set_to_default (MD5Result &val) |
def | test_cms_environment |
Variables | |
static const char * | s_hexValues = "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff" |
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. boost::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(boost_bind(&MyClass::myFunction, myClassPtr)); c.call(boost_bind(&MyClass::myOtherFunction, myClassPtr, myArgPtr)); c.call(boost_bind(&myFreeFunction, myArgPtr)); if (c.hasThrown()) c.rethrow();
This insures that all three functions will be called before any exception is thrown.
SiPixelClusterProducer.cc --------------------------------------------------------------- Description: see SiPixelClusterProducer.h Author: P. Maksimovic (porting from original ORCA version) History: Oct 14, 2005, initial version Get rid of the noiseVector. d.k. 28/3/06 Implementation of the DetSetVector container. V.Chiochia, May 06 SiPixelClusterCollection typedef of DetSetVector V.Chiochia, June 06 Introduce the DetSet local container (cache) for speed. d.k. 05/07
---------------------------------------------------------------
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, data, and MOD_ADLER.
Referenced by Adler32(), stor::FileHandler::checkAdler32(), edm::StreamDQMDeserializer::deserializeDQMEvent(), edm::StreamerInputSource::deserializeEvent(), edm::StreamerInputSource::deserializeRegistry(), FRDEventFileWriter::doOutputEvent(), FRDEventFileWriter::doOutputEventFragment(), edm::StreamDQMSerializer::serializeDQMEvent(), edm::StreamSerializer::serializeEvent(), edm::StreamSerializer::serializeRegistry(), and OutputFile::write().
{ /* data: Pointer to the data to be summed; len is in bytes */ #define MOD_ADLER 65521 unsigned char const* ptr = static_cast<unsigned char const*>(static_cast<void const*>(data)); while (len > 0) { size_t tlen = (len > 5552 ? 5552 : len); len -= tlen; do { a += *ptr++; b += a; } while (--tlen); a %= MOD_ADLER; b %= MOD_ADLER; } #undef MOD_ADLER }
uint32_t cms::Adler32 | ( | char const * | data, |
size_t | len | ||
) |
edm::ProductID cms::clusterProduct | ( | const TrackingRecHit * | hit | ) |
Definition at line 46 of file SimpleTrackListMerger.cc.
References cond::rpcobgas::detid, Exception, TrackingRecHit::geographicalId(), edm::ProductID::id(), ProjectedSiStripRecHit2D::originalHit(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, and DetId::subdetId().
Referenced by cms::SimpleTrackListMerger::produce().
{ edm::ProductID pID; //cast it into the proper class and find productID DetId detid = hit->geographicalId(); uint32_t subdet = detid.subdetId(); if ((subdet == PixelSubdetector::PixelBarrel) || (subdet == PixelSubdetector::PixelEndcap)) { pID=reinterpret_cast<const SiPixelRecHit *>(hit)->cluster().id(); } else { const std::type_info &type = typeid(*hit); if (type == typeid(SiStripRecHit2D)) { pID=reinterpret_cast<const SiStripRecHit2D *>(hit)->cluster().id(); } else if (type == typeid(SiStripRecHit1D)) { pID=reinterpret_cast<const SiStripRecHit1D *>(hit)->cluster().id(); } else if (type == typeid(SiStripMatchedRecHit2D)) { const SiStripMatchedRecHit2D *mhit = reinterpret_cast<const SiStripMatchedRecHit2D *>(hit); pID=mhit->monoClusterRef().id(); } else if (type == typeid(ProjectedSiStripRecHit2D)) { const ProjectedSiStripRecHit2D *phit = reinterpret_cast<const ProjectedSiStripRecHit2D *>(hit); pID=(&phit->originalHit())->cluster().id(); } else throw cms::Exception("Unknown RecHit Type") << "RecHit of type " << type.name() << " not supported. (use c++filt to demangle the name)"; } return pID;}
edm::ProductID cms::clusterProductB | ( | const TrackingRecHit * | hit | ) |
Definition at line 104 of file TrackListMerger.cc.
Referenced by cms::TrackListMerger::produce().
{ return reinterpret_cast<const BaseTrackerRecHit *>(hit)->firstClusterRef().id(); }
def cms::cms_error | ( | ) |
Definition at line 51 of file cms.py.
00052 : 00053 "Standard CMS error message" 00054 msg = "\nPackages must be created in a 'subsystem'." 00055 msg += "\nPlease set your CMSSW environment and go to $CMSSW_BASE/src" 00056 msg += "\nCreate or choose directory from there and then " 00057 msg += "\nrun the script from that directory" 00058 return msg
def cms::config | ( | tmpl, | |
pkg_help, | |||
tmpl_dir | |||
) |
Definition at line 17 of file cms.py.
00018 : 00019 "Parse input arguments to mk-script" 00020 kwds = {'author': '', 'tmpl': tmpl, 00021 'args': {}, 'debug': False, 'tmpl_dir': tmpl_dir} 00022 etags = [] 00023 if len(sys.argv) >= 2: # user give us arguments 00024 if sys.argv[1] in ['-h', '--help', '-help']: 00025 print pkg_help 00026 sys.exit(0) 00027 kwds['pname'] = sys.argv[1] 00028 for idx in xrange(2, len(sys.argv)): 00029 opt = sys.argv[idx] 00030 if opt == '-author': 00031 kwds['author'] = sys.argv[idx+1] 00032 continue 00033 if opt.find('example') != -1: 00034 etags.append('@%s' % opt) 00035 continue 00036 if opt in ['-h', '--help', '-help']: 00037 print pkg_help 00038 sys.exit(0) 00039 if opt == '-debug': 00040 kwds['debug'] = True 00041 continue 00042 elif len(sys.argv) == 1: 00043 # need to walk 00044 msg = 'Please enter %s name: ' % tmpl.lower() 00045 kwds['pname'] = raw_input(msg) 00046 else: 00047 print pkg_help 00048 sys.exit(0) 00049 kwds['tmpl_etags'] = etags 00050 return kwds
def cms::generate | ( | kwds | ) |
Definition at line 87 of file cms.py.
00088 : 00089 "Run generator code based on provided set of arguments" 00090 config = dict(kwds) 00091 tmpl = kwds.get('tmpl') 00092 stand_alone_group = ['Record', 'Skeleton'] 00093 config.update({'not_in_dir': stand_alone_group}) 00094 if tmpl in stand_alone_group: 00095 whereami, ldir = test_cms_environment(tmpl) 00096 dirs = ldir.split('/') 00097 config.update({'pkgname': kwds.get('pname')}) 00098 config.update({'subsystem': 'Subsystem'}) 00099 config.update({'pkgname': 'Package'}) 00100 if whereami: 00101 if len(dirs) >= 3: 00102 config.update({'subsystem': dirs[1]}) 00103 config.update({'pkgname': dirs[2]}) 00104 elif len(dirs) >= 2: 00105 config.update({'subsystem': dirs[1]}) 00106 config.update({'pkgname': dirs[1]}) 00107 else: 00108 whereami, ldir = test_cms_environment(tmpl) 00109 dirs = ldir.split('/') 00110 if not dirs or not whereami: 00111 print cms_error() 00112 sys.exit(1) 00113 config.update({'subsystem': dirs[1]}) 00114 config.update({'pkgname': kwds.get('pname')}) 00115 if whereami in ['src', 'plugins']: 00116 config.update({'tmpl_files': '.cc'}) 00117 config.update({'pkgname': dirs[2]}) 00118 elif whereami == 'subsystem': 00119 config.update({'tmpl_files': 'all'}) 00120 else: 00121 print cms_error() 00122 sys.exit(1) 00123 obj = code_generator(config) 00124 obj.generate()
bool cms::operator!= | ( | MD5Result const & | a, |
MD5Result const & | b | ||
) | [inline] |
bool cms::operator< | ( | MD5Result const & | a, |
MD5Result const & | b | ||
) |
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.
std::ostream& cms::operator<< | ( | std::ostream & | ost, |
Exception const & | e | ||
) | [inline] |
Definition at line 218 of file Exception.h.
References cms::Exception::explainSelf().
{ ost << e.explainSelf(); return ost; }
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.
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.
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.
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.
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.
std::ostream& cms::operator<< | ( | std::ostream & | os, |
MD5Result const & | r | ||
) | [inline] |
Definition at line 46 of file Digest.h.
References cms::MD5Result::toString().
{ os << r.toString(); return os; }
bool cms::operator== | ( | MD5Result const & | a, |
MD5Result const & | b | ||
) |
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().
{ val.bytes[0] = 0xd4; val.bytes[1] = 0x1d; val.bytes[2] = 0x8c; val.bytes[3] = 0xd9; val.bytes[4] = 0x8f; val.bytes[5] = 0x00; val.bytes[6] = 0xb2; val.bytes[7] = 0x04; val.bytes[8] = 0xe9; val.bytes[9] = 0x80; val.bytes[10] = 0x09; val.bytes[11] = 0x98; val.bytes[12] = 0xec; val.bytes[13] = 0xf8; val.bytes[14] = 0x42; val.bytes[15] = 0x7e; }
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.
00060 : 00061 """ 00062 Test CMS environment and requirements to run within CMSSW_BASE. 00063 Return True if we fullfill requirements and False otherwise. 00064 """ 00065 base = os.environ.get('CMSSW_BASE', None) 00066 if not base: 00067 return False, [] 00068 cdir = os.getcwd() 00069 ldir = cdir.replace(os.path.join(base, 'src'), '') 00070 dirs = ldir.split('/') 00071 # test if we're within CMSSW_BASE/src/SubSystem area 00072 if ldir and ldir[0] == '/' and len(dirs) == 2: 00073 return 'subsystem', ldir 00074 # test if we're within CMSSW_BASE/src/SubSystem/Pkg area 00075 if ldir and ldir[0] == '/' and len(dirs) == 3: 00076 return 'package', ldir 00077 # test if we're within CMSSW_BASE/src/SubSystem/Pkg/src area 00078 # if ldir and ldir[0] == '/' and len(dirs) == 4 and dirs[-1] == 'src': 00079 # return 'src', ldir 00080 # test if we're within CMSSW_BASE/src/SubSystem/Pkg/plugin area 00081 # if ldir and ldir[0] == '/' and len(dirs) == 4 and dirs[-1] == 'plugins': 00082 # return 'plugins', ldir 00083 # test if we're within CMSSW_BASE/src/SubSystem/Pkg/dir area 00084 if ldir and ldir[0] == '/' and len(dirs) == 4: 00085 return dirs[-1], ldir 00086 return False, ldir
const char* cms::s_hexValues = "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff" [static] |
Definition at line 69 of file Digest.cc.
Referenced by cms::MD5Result::toString().