CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
DTRecoUncertainties Class Reference

#include <DTRecoUncertainties.h>

Public Types

typedef std::map< uint32_t, std::vector< float > >::const_iterator const_iterator
 Access methods to data. More...
 

Public Member Functions

const_iterator begin () const
 
 DTRecoUncertainties ()
 Constructor. More...
 
const_iterator end () const
 
float get (const DTWireId &wireid, unsigned int index) const
 get the uncertainties for the SL correspoding to the given WireId and for the correct step as defined by the algorithm More...
 
void set (const DTWireId &wireid, const std::vector< float > &values)
 fills the map More...
 
void setVersion (int version)
 
int version () const
 
virtual ~DTRecoUncertainties ()
 Destructor. More...
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::map< uint32_t, std::vector< float > > payload
 
int theVersion
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

DB object for storing DT hit uncertatinties.

Author
G. Cerminara - CERN

Definition at line 19 of file DTRecoUncertainties.h.

Member Typedef Documentation

◆ const_iterator

typedef std::map<uint32_t, std::vector<float> >::const_iterator DTRecoUncertainties::const_iterator

Access methods to data.

Definition at line 40 of file DTRecoUncertainties.h.

Constructor & Destructor Documentation

◆ DTRecoUncertainties()

DTRecoUncertainties::DTRecoUncertainties ( )

Constructor.

Definition at line 17 of file DTRecoUncertainties.cc.

17 {}

◆ ~DTRecoUncertainties()

DTRecoUncertainties::~DTRecoUncertainties ( )
virtual

Destructor.

Definition at line 19 of file DTRecoUncertainties.cc.

19 {}

Member Function Documentation

◆ begin()

DTRecoUncertainties::const_iterator DTRecoUncertainties::begin ( void  ) const

Definition at line 44 of file DTRecoUncertainties.cc.

References payload.

44 { return payload.begin(); }
std::map< uint32_t, std::vector< float > > payload

◆ end()

DTRecoUncertainties::const_iterator DTRecoUncertainties::end ( void  ) const

Definition at line 46 of file DTRecoUncertainties.cc.

References payload.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

46 { return payload.end(); }
std::map< uint32_t, std::vector< float > > payload

◆ get()

float DTRecoUncertainties::get ( const DTWireId wireid,
unsigned int  index 
) const

get the uncertainties for the SL correspoding to the given WireId and for the correct step as defined by the algorithm

Definition at line 21 of file DTRecoUncertainties.cc.

References gather_cfg::cout, payload, DetId::rawId(), and DTLayerId::superlayerId().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

21  {
22  // FIXME: what to do in case the superlayerId is not found in the map?
23  // FIXME: any check on the type?
24  map<uint32_t, vector<float> >::const_iterator slIt = payload.find(wireid.superlayerId().rawId());
25  if (slIt == payload.end()) {
26  cout << "[DTRecoUncertainties]***Error: the SLId: " << wireid.superlayerId() << " is not in the paylaod map!"
27  << endl;
28  // FIXME: what to do here???
29  return -1.;
30  } else if (vector<float>::size_type(index) >= (*slIt).second.size()) {
31  cout << "[DTRecoUncertainties]***Error: requesting parameter index: " << index << " for vector of size "
32  << (*slIt).second.size() << endl;
33  // FIXME: what to do here???
34  return -1.;
35  }
36 
37  return (*slIt).second[index];
38 }
uint16_t size_type
std::map< uint32_t, std::vector< float > >::const_iterator const_iterator
Access methods to data.
std::map< uint32_t, std::vector< float > > payload
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:45

◆ serialize()

template<class Archive >
void DTRecoUncertainties::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ set()

void DTRecoUncertainties::set ( const DTWireId wireid,
const std::vector< float > &  values 
)

fills the map

Definition at line 40 of file DTRecoUncertainties.cc.

References payload, DTLayerId::superlayerId(), and contentValuesCheck::values.

40  {
41  payload[wireid.superlayerId()] = values;
42 }
std::map< uint32_t, std::vector< float > > payload
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:45

◆ setVersion()

void DTRecoUncertainties::setVersion ( int  version)
inline

Definition at line 27 of file DTRecoUncertainties.h.

References theVersion, and version().

◆ version()

int DTRecoUncertainties::version ( ) const
inline

Label specifying the structure of the payload; currently supported: "uniformPerStep" (uniform uncertainties per SL and step; index 0-3 = uncertainties for steps 1-4 in cm)

Definition at line 31 of file DTRecoUncertainties.h.

References theVersion.

Referenced by validation.Sample::datasetpattern(), validation.Sample::filename(), and setVersion().

31 { return theVersion; }

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 51 of file DTRecoUncertainties.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 51 of file DTRecoUncertainties.h.

Member Data Documentation

◆ payload

std::map<uint32_t, std::vector<float> > DTRecoUncertainties::payload
private

Definition at line 47 of file DTRecoUncertainties.h.

Referenced by begin(), end(), get(), and set().

◆ theVersion

int DTRecoUncertainties::theVersion
private

Definition at line 49 of file DTRecoUncertainties.h.

Referenced by setVersion(), and version().