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.

44 { return payload.begin(); }

References payload.

◆ end()

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

Definition at line 46 of file DTRecoUncertainties.cc.

46 { return payload.end(); }

References payload.

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

◆ 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.

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 }

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

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

◆ 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.

40  {
41  payload[wireid.superlayerId()] = values;
42 }

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

◆ setVersion()

void DTRecoUncertainties::setVersion ( int  version)
inline

Definition at line 27 of file DTRecoUncertainties.h.

27 { theVersion = version; }

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.

31 { return theVersion; }

References theVersion.

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

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

DTRecoUncertainties::const_iterator
std::map< uint32_t, std::vector< float > >::const_iterator const_iterator
Access methods to data.
Definition: DTRecoUncertainties.h:40
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DTRecoUncertainties::payload
std::map< uint32_t, std::vector< float > > payload
Definition: DTRecoUncertainties.h:47
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
DTRecoUncertainties::theVersion
int theVersion
Definition: DTRecoUncertainties.h:49
DTRecoUncertainties::version
int version() const
Definition: DTRecoUncertainties.h:31
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
DTLayerId::superlayerId
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:45
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46