CMSSW Classes, methods and header files

CMSSW Code layout

  • CMSSW-programme-layout.pptx
  • Code declarations for classes, functions and methods within the class, often be found via the header file, through 'interface'
  • Code specifications for classes, functions and methods within the class, through 'src' to the .cc file

EcalRecHit

Step through CVS to
EcalRecHit EcalRecHitClass
class and member declarations through #include "DataFormats/ EcalRecHit/ interface/ EcalRecHit.h" class, function and member specifications at CMSSW/ DataFormats/ EcalRecHit/ src/ EcalRecHit.cc
| EcalRecHit methods

 
EcalRecHit::EcalRecHit(const DetId& id, float energy, float time, uint32_t flags, uint32_t flagBits)
                 : CaloRecHit(id,energy,time,flags), flagBits_(flagBits) { }
bool EcalRecHit::isRecovered()
float EcalRecHit::chi2()
float EcalRecHit::chi2Prob()             Advised NOT to use
float EcalRecHit::outOfTimeChi2Prob()    Advised NOT to use
float EcalRecHit::outOfTimeChi2() 
float EcalRecHit::outOfTimeEnergy()
void EcalRecHit::setRecoFlag( uint32_t flag )
void EcalRecHit::setChi2Prob( float chi2Prob )    Advised NOT to use
void EcalRecHit::setChi2( float chi2 )
void EcalRecHit::setOutOfTimeEnergy( float energy )
void EcalRecHit::setOutOfTimeChi2Prob( float chi2Prob )   Advised NOT to use
void EcalRecHit::setOutOfTimeChi2( float chi2 )
void EcalRecHit::setTimeError( uint8_t timeErrBits )
float EcalRecHit::timeError()
bool EcalRecHit::isTimeValid()
bool EcalRecHit::isTimeErrorValid()
||

ECALDigiCollection

EcalDigiCollection and EBDigiCollection, and EEDigiCollection from CMSSW/ DataFormats/ EcalDigi/ interface/ EcalDigiCollections.h .h file definition only, no .cc file
| EcalDigiCollection methods

class EcalDigiCollection : public edm::DataFrameContainer {public:
         typedef edm::DataFrameContainer::size_type size_type; ..... }
class EBDigiCollection : public  EcalDigiCollection { public:
         typedef edm::DataFrameContainer::size_type size_type;
         typedef EBDataFrame Digi;
         typedef Digi::key_type DetId; .....}
class EEDigiCollection : public  EcalDigiCollection { public:  
         typedef edm::DataFrameContainer::size_type size_type;
         typedef EEDataFrame Digi;
         typedef Digi::key_type DetId; .....}
||

DetId

DetId.h from CMSSW/DataFormats/DetId/interface/DetId.h DetID.cc class from CMSSW/DataFormats/DetId/src/DetId.cc
| DetId Endcap methods

class DetId { public:
         static const int kDetOffset          = 28;
         static const int kSubdetOffset       = 25;
         enum Detector { Tracker=1,Muon=2,Ecal=3,Hcal=4,Calo=5 };
         DetId()  : id_(0) { }      Create an empty or null id (also for persistence)
         DetId(uint32_t id) : id_(id) { }    Create an id from a raw number
         DetId(Detector det, int subdet)  {id_=((det&0xF)<<28)|((subdet&0x7)<<25);    }    create an id, filling the detector and subdetector fields as specified
         Detector det() const { return Detector((id_>>kDetOffset)&0xF); }    get the detector field from this detid
         int subdetId() const { return ((id_>>kSubdetOffset)&0x7); }     get the contents of the subdetector field (not cast into any detector's numbering enum)
         uint32_t rawId() const { return id_; }   get the raw id 
         bool null() const { return id_==0; }     is this a null id ?
         bool operator==(DetId id) const { return id_==id.id_; }   equality
         bool operator!=(DetId id) const { return id_!=id.id_; }    inequality
         bool operator<(DetId id) const { return id_<id.id_; }   comparison
||

EEDetId

EEDetId.h from CMSSW/DataFormats/EcalDetId/interface/EEDetId.h EEDetID.cc class from CMSSW/DataFormats/EcalDetId/src/EEDetId.cc
| EEDetId Endcap methods

 
zside()
ix()
iy()
sc()                              Get the DetId of the supercrystal that the crystal belongs to
isc()                             Gets the SuperCrystal number within the endcap
ic()                              Get the crystal number inside the SuperCrystal
iquadrant()
bool positiveZ()
iPhiOuterRing()
hashedIndex()
denseIndex()
switchZSide()
bool validDetId(int crystal_ix, int crystal_iy, int iz)
int distanceX(const EEDetId& a,const EEDetId& b)    Distance along x-axis in crystal units between two EEDetId
int distanceY(const EEDetId& a,const EEDetId& b)    Distance along y-axis in crystal units between two EEDetId
int isc( int iscCol, int iscRow )     Supercrystal index from endcap *supercrystal* x and y indexes, output is 1-316
int ix( int iSC, int iCrys )          Functions from B. Kennedy to retrieve ix and iy from SC and Crystal number
int iy( int iSC, int iCrys )          Functions from B. Kennedy to retrieve ix and iy from SC and Crystal number
||

Event.h

EvenTh from CMSSW/ FWCore/ Framework/ interface/ Event.h EvenTcc class from CMSSW/ FWCore/ Framework/ src/ Event.cc

Event.h contains the Event class declaration and declarations of associated methods, 
including getByLabel !!!!

Most member functions are explicitly defined in the Event private: area
Others are defined in Event.cc.

class Event : public EventBase {                   <= Event class derived from EventBase class
   public:
     Event(EventPrincipal& ep, ModuleDescription const& md);
     ~Event();
 // AUX functions are defined in EventBase

Public method declarations
EventAuxiliary const&      eventAuxiliary()       const {return aux_;}  
LuminosityBlock const&   getLuminosityBlock()     const {return *luminosityBlock_;}
Run const&   getRun()    const;
RunNumber_t    run()     const {return id().run();}
EventSelectionIDVector const&     eventSelectionIDs()      const;
ProcessHistoryID const&               processHistoryID()        const;
Provenance     getProvenance    (BranchID const& theID) const;
Provenance     getProvenance    (ProductID const& theID) const;
void     getAllProvenance    (std::vector<Provenance const*>& provenances) const; 
bool     getProcessParameterSet    (std::string const& processName, ParameterSet& ps) const;
ProcessHistory const&     processHistory()    const;
size_t    size()    const;
virtual edm::TriggerNames const&      triggerNames        (edm::TriggerResults const& triggerResults) const;
virtual TriggerResultsByName     triggerResultsByName      (std::string const& process) const;


Public Template method declarations
bool    get       (ProductID const& oid, Handle<PROD>& result)
bool    get       (ProductID const& oid, Handle<View<ELEMENT> >& result)
bool    get       (SelectorBase const& sel, Handle<PROD>& result) const;
OrphanHandle<PROD>   put   (std::auto_ptr<PROD> product) {return put<PROD>(product, std::string());}
OrphanHandle<PROD>   put   (std::auto_ptr<PROD> product, std::string const& productInstanceName);
RefProd<PROD>     getRefBeforePut()             {return getRefBeforePut<PROD>(std::string());}
RefProd<PROD>     getRefBeforePut               (std::string const& productInstanceName);
bool     getByLabel               (InputTag const& tag,      Handle<PROD>& result) const;
bool     getByLabel               (std::string const& label,   Handle<PROD>& result) const;
bool     getByLabel               (std::string const& label,   std::string const& productInstanceName,   Handle<PROD>& result) const;
bool     getByLabel               (std::string const& label,   Handle<View<ELEMENT> >& result) const;
bool     getByLabel               (std::string const& label,   std::string const& productInstanceName,   Handle<View<ELEMENT> >& result) const;
bool     getByLabel               (InputTag const& tag,      Handle<View<ELEMENT> >& result) const;
void     getMany        (SelectorBase const& sel, std::vector<Handle<PROD> >& results) const;
bool     getByType    (Handle<PROD>& result) const;
void     getManyByType    (std::vector<Handle<PROD> >& results) const;
void     fillView_       (BasicHandle& bh,   Handle<View<ELEMENT> >& result) const;


Handle

HanDleh (Handle.h) from CMSSW/ DataFormats/ Common/ interface/ Handle.h No Handle.cc file

ParameterSet

ParameterSeth (Handle.h) from CMSSW/ FWCore/ ParameterSet/ interface/ ParameterSet.h ParameterSetcc file from CMSSW/ FWCore/ ParameterSet/ src/ ParameterSet.cc

-- DavidCockerill - 20-Aug-2010

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2012-02-19 - DavidCockerill
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback