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 Attributes
evf::EvFRecordInserter Class Reference

#include <EvFRecordInserter.h>

Inheritance diagram for evf::EvFRecordInserter:
edm::EDAnalyzer

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
 EvFRecordInserter (const edm::ParameterSet &)
 
 ~EvFRecordInserter ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

EvffedFillerEP ef_
 
uint64_t ehi_
 
uint32_t evc_
 
edm::InputTag label_
 
uint32_t last_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 12 of file EvFRecordInserter.h.

Constructor & Destructor Documentation

evf::EvFRecordInserter::EvFRecordInserter ( const edm::ParameterSet pset)
explicit

Definition at line 10 of file EvFRecordInserter.cc.

11  : evc_(0)
12  , ehi_(0LL)
13  , last_(0)
14  , label_(pset.getParameter<edm::InputTag>("inputTag"))
15  {}
T getParameter(std::string const &) const
evf::EvFRecordInserter::~EvFRecordInserter ( )
inline

Definition at line 17 of file EvFRecordInserter.h.

17 {};

Member Function Documentation

void evf::EvFRecordInserter::analyze ( const edm::Event e,
const edm::EventSetup c 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 16 of file EvFRecordInserter.cc.

References FEDRawData::data(), data, ef_, ehi_, evc_, edm::EventID::event(), evf::fedinterface::EVFFED_ID, edm::Event::getByLabel(), edm::EventBase::id(), label_, last_, cmsPerfSuiteHarvest::now, lumiPlot::rawdata, evf::EvffedFillerEP::setEPEventCount(), evf::EvffedFillerEP::setEPEventHisto(), evf::EvffedFillerEP::setEPEventId(), evf::EvffedFillerEP::setEPProcessId(), evf::EvffedFillerEP::setEPTimeStamp(), FEDRawData::size(), and findQualityFiles::size.

17  {
19  e.getByLabel(label_,rawdata);
20  unsigned int id = fedinterface::EVFFED_ID;
21  const FEDRawData& data = rawdata->FEDData(id);
22  size_t size=data.size();
23  unsigned char * cdata = const_cast<unsigned char*>(data.data());
24  timeval now;
25  gettimeofday(&now,0);
26  evc_++;
27  uint32_t ldiff = 0;
28  if(e.id().event()-last_ < 0xff)
29  ldiff = e.id().event()-last_;
30  else
31  ldiff = 0xff;
32  ehi_ = (ehi_<<8)+(uint64_t)ldiff;
33  last_ = e.id().event();
34  if(size>0){
35  ef_.setEPTimeStamp(((uint64_t)(now.tv_sec) << 32)
36  + (uint64_t)(now.tv_usec),cdata);
37 
38  ef_.setEPProcessId(getpid(),cdata);
39  ef_.setEPEventId(e.id().event(), cdata);
40  ef_.setEPEventCount(evc_, cdata);
41  ef_.setEPEventHisto(ehi_, cdata);
42  }
43  }
EventNumber_t event() const
Definition: EventID.h:44
void setEPEventId(uint32_t eid, unsigned char *payload)
const unsigned int EVFFED_ID
Definition: FED1023.h:28
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:49
void setEPProcessId(pid_t pid, unsigned char *payload)
void setEPTimeStamp(uint64_t ts, unsigned char *payload)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
void setEPEventCount(uint32_t evc, unsigned char *payload)
unsigned long long uint64_t
Definition: Time.h:15
edm::EventID id() const
Definition: EventBase.h:56
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void setEPEventHisto(uint64_t ehi, unsigned char *payload)
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:29
dictionary rawdata
Definition: lumiPlot.py:393
tuple size
Write out results.

Member Data Documentation

EvffedFillerEP evf::EvFRecordInserter::ef_
private

Definition at line 22 of file EvFRecordInserter.h.

Referenced by analyze().

uint64_t evf::EvFRecordInserter::ehi_
private

Definition at line 24 of file EvFRecordInserter.h.

Referenced by analyze().

uint32_t evf::EvFRecordInserter::evc_
private

Definition at line 23 of file EvFRecordInserter.h.

Referenced by analyze().

edm::InputTag evf::EvFRecordInserter::label_
private
uint32_t evf::EvFRecordInserter::last_
private

Definition at line 25 of file EvFRecordInserter.h.

Referenced by analyze().