CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
SiStripLatencyGenerator Class Reference

#include <SiStripLatencyGenerator.h>

Inheritance diagram for SiStripLatencyGenerator:
SiStripCondObjBuilderBase< SiStripLatency >

Public Member Functions

void getObj (SiStripLatency *&obj)
 
 SiStripLatencyGenerator (const edm::ParameterSet &, const edm::ActivityRegistry &)
 
 ~SiStripLatencyGenerator ()
 
- Public Member Functions inherited from SiStripCondObjBuilderBase< SiStripLatency >
virtual bool checkForCompatibility (std::string ss)
 
virtual void getMetaDataString (std::stringstream &ss)
 
virtual void initialize ()
 
 SiStripCondObjBuilderBase (const edm::ParameterSet &pset)
 
virtual ~SiStripCondObjBuilderBase ()
 

Private Member Functions

void createObject ()
 

Additional Inherited Members

- Protected Attributes inherited from SiStripCondObjBuilderBase< SiStripLatency >
edm::ParameterSet _pset
 
SiStripLatencyobj_
 

Detailed Description

Fake generator for latency and mode values stored in the SiStripLatency object.

Definition at line 14 of file SiStripLatencyGenerator.h.

Constructor & Destructor Documentation

SiStripLatencyGenerator::SiStripLatencyGenerator ( const edm::ParameterSet iConfig,
const edm::ActivityRegistry aReg 
)
explicit

Definition at line 10 of file SiStripLatencyGenerator.cc.

10  :
12 {
13  edm::LogInfo("SiStripLatencyGenerator") << "[SiStripLatencyGenerator::SiStripLatencyGenerator]";
14 }
SiStripCondObjBuilderBase(const edm::ParameterSet &pset)
SiStripLatencyGenerator::~SiStripLatencyGenerator ( )

Definition at line 16 of file SiStripLatencyGenerator.cc.

17 {
18  edm::LogInfo("SiStripLatencyGenerator") << "[SiStripLatencyGenerator::~SiStripLatencyGenerator]";
19 }

Member Function Documentation

void SiStripLatencyGenerator::createObject ( )
private

Definition at line 21 of file SiStripLatencyGenerator.cc.

References SiStripCondObjBuilderBase< SiStripLatency >::_pset, SiStripLatency::compress(), edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), SiStripCondObjBuilderBase< SiStripLatency >::obj_, SiStripLatency::put(), and matplotRender::reader.

Referenced by Vispa.Views.LineDecayView.LineDecayContainer::dropEvent(), and getObj().

22 {
23  obj_ = new SiStripLatency();
24 
25  // Read the full list of detIds
28  const std::map<uint32_t, SiStripDetInfoFileReader::DetInfo > detInfos = reader.getAllData();
29  // Take the last detId. Since the map is sorted it will be the biggest value
30  if( !detInfos.empty() ) {
31  // Set the apv number as 6, the highest possible
32  edm::LogInfo("SiStripLatencyGenerator") << "detId = " << detInfos.rbegin()->first << " apv = " << 6
33  << " latency = " << _pset.getParameter<uint32_t>("latency")
34  << " mode = " << _pset.getParameter<uint32_t>("mode") << std::endl;
35  obj_->put(detInfos.rbegin()->first, 6, _pset.getParameter<uint32_t>("latency"), _pset.getParameter<uint32_t>("mode") );
36 
37  // Call this method to collapse all consecutive detIdAndApvs with the same latency and mode to a single entry
38  obj_->compress();
39  }
40  else {
41  edm::LogError("SiStripLatencyGenerator") << "Error: detInfo map is empty. Cannot get the last detId." << std::endl;
42  }
43 }
T getParameter(std::string const &) const
bool put(const uint32_t detId, const uint16_t apv, const uint16_t latency, const uint16_t mode)
std::string fullPath() const
Definition: FileInPath.cc:171
void SiStripLatencyGenerator::getObj ( SiStripLatency *&  obj)
inlinevirtual