CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 20 of file DTRecoUncertainties.h.

Member Typedef Documentation

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

Access methods to data.

Definition at line 47 of file DTRecoUncertainties.h.

Constructor & Destructor Documentation

DTRecoUncertainties::DTRecoUncertainties ( )

Constructor.

Definition at line 18 of file DTRecoUncertainties.cc.

18 {}
DTRecoUncertainties::~DTRecoUncertainties ( )
virtual

Destructor.

Definition at line 20 of file DTRecoUncertainties.cc.

20 {}

Member Function Documentation

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

Definition at line 47 of file DTRecoUncertainties.cc.

References payload.

47  {
48  return payload.begin();
49 }
std::map< uint32_t, std::vector< float > > payload
DTRecoUncertainties::const_iterator DTRecoUncertainties::end ( void  ) const

Definition at line 51 of file DTRecoUncertainties.cc.

References payload.

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

51  {
52  return payload.end();
53 }
std::map< uint32_t, std::vector< float > > payload
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 23 of file DTRecoUncertainties.cc.

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

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

23  {
24  // FIXME: what to do in case the superlayerId is not found in the map?
25  // FIXME: any check on the type?
26  map<uint32_t, vector<float> >::const_iterator slIt = payload.find(wireid.superlayerId().rawId());
27  if(slIt == payload.end()) {
28  cout << "[DTRecoUncertainties]***Error: the SLId: " << wireid.superlayerId() << " is not in the paylaod map!" << endl;
29  // FIXME: what to do here???
30  return -1.;
31  } else if(vector<float>::size_type(index) >= (*slIt).second.size()) {
32  cout << "[DTRecoUncertainties]***Error: requesting parameter index: " << index << " for vector of size " << (*slIt).second.size() << endl;
33  // FIXME: what to do here???
34  return -1.;
35  }
36 
37 
38  return (*slIt).second[index];
39 }
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:59
uint16_t size_type
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
std::map< uint32_t, std::vector< float > >::const_iterator const_iterator
Access methods to data.
std::map< uint32_t, std::vector< float > > payload
tuple cout
Definition: gather_cfg.py:145
template<class Archive >
void DTRecoUncertainties::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void DTRecoUncertainties::set ( const DTWireId wireid,
const std::vector< float > &  values 
)

fills the map

Definition at line 42 of file DTRecoUncertainties.cc.

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

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

42  {
43  payload[wireid.superlayerId()] = values;
44 }
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:59
std::map< uint32_t, std::vector< float > > payload
void DTRecoUncertainties::setVersion ( int  version)
inline

Definition at line 28 of file DTRecoUncertainties.h.

References theVersion, and version().

28  {
30  }
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 34 of file DTRecoUncertainties.h.

References theVersion.

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

34  {
35  return theVersion;
36  }

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 59 of file DTRecoUncertainties.h.

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

Definition at line 59 of file DTRecoUncertainties.h.

Member Data Documentation

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

Definition at line 55 of file DTRecoUncertainties.h.

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

int DTRecoUncertainties::theVersion
private

Definition at line 57 of file DTRecoUncertainties.h.

Referenced by setVersion(), and version().