CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AuxiliaryMakers.cc
Go to the documentation of this file.
1 #include <sys/time.h>
2 
4 
5 namespace evf{
6  namespace evtn{
7 
9  unsigned int runNumber,
10  unsigned int lumiSection,
11  std::string const &processGUID){
12  edm::EventID eventId(runNumber, // check that runnumber from record is consistent
13  //record->getHeader().getData().header.lumiSection,//+1
14  lumiSection,
15  record->getHeader().getData().header.eventNumber);
16 
17  uint64_t gpsh = record->getBST().getBST().gpstimehigh;
18  uint32_t gpsl = record->getBST().getBST().gpstimelow;
19  edm::TimeValue_t time = static_cast<edm::TimeValue_t> ((gpsh << 32) + gpsl);
20  if (time == 0) {
21  timeval stv;
22  gettimeofday(&stv,0);
23  time = stv.tv_sec;
24  time = (time << 32) + stv.tv_usec;
25  }
26  int64_t orbitnr = (((uint64_t)record->getHeader().getData().header.orbitHigh) << 16) + record->getHeader().getData().header.orbitLow;
27  return edm::EventAuxiliary(eventId,
28  processGUID,
29  edm::Timestamp(time),
30  true,
32  (int)record->getHeader().getData().header.bcid,
34  (int)(orbitnr&0x7fffffffU));//framework supports only 32-bit signed
35  }
36  }
37 }
TCDSBST & getBST()
Definition: FED1024.h:152
TCDSHeader & getHeader()
Definition: FED1024.h:150
struct evf::evtn::TCDSFEDHeader::tcdsfedheader::@314 header
JetCorrectorParameters::Record record
Definition: classes.h:7
edm::EventAuxiliary makeEventAuxiliary(TCDSRecord *record, unsigned int runNumber, unsigned int lumiSection, std::string const &processGUID)
TCDSFEDHeader & getFEDHeader()
Definition: FED1024.h:149
#define FED_EVTY_EXTRACT(a)
Definition: fed_header.h:38
const tcdsheader & getData()
Definition: FED1024.h:84
struct evf::evtn::TCDSHeader::tcdsheader::@315 header
unsigned long long TimeValue_t
Definition: Timestamp.h:28
unsigned long long uint64_t
Definition: Time.h:15
const tcdsfedheader & getData()
Definition: FED1024.h:41
const bst & getBST()
Definition: FED1024.h:133
static int const invalidStoreNumber