-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5433 from smorovic/tcds-readout-71X
TCDS readout for 7_1_X
- Loading branch information
Showing
11 changed files
with
384 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<export> | ||
<use name="DataFormats/FEDRawData"/> | ||
<lib name="1"/> | ||
</export> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
#ifndef EVF_FEDINTERFACE_FED1024_H | ||
#define EVF_FEDINTERFACE_FED1024_H | ||
|
||
|
||
#include <stddef.h> | ||
#include "EventFilter/FEDInterface/interface/fed_header.h" | ||
#include "EventFilter/FEDInterface/interface/FEDConstants.h" | ||
|
||
namespace evf{ | ||
namespace evtn{ | ||
|
||
union sizes{ | ||
uint64_t sizeword; | ||
struct{ | ||
const unsigned char headerSize; | ||
const unsigned char summarySize; | ||
const unsigned char L1AhistSize; | ||
const unsigned char BSTSize; | ||
const unsigned char reserved0; | ||
const unsigned char reserved1; | ||
const unsigned char reserved2; | ||
const unsigned char BGOSize; | ||
} size; | ||
}; | ||
|
||
class TCDSHeader{ | ||
public: | ||
|
||
union tcdsheader{ | ||
uint64_t words[11]; | ||
struct { | ||
uint64_t macAddress; | ||
uint32_t sw; | ||
uint32_t fw; | ||
uint32_t reserved0; | ||
uint32_t format; | ||
uint32_t runNumber; | ||
uint32_t reserved1; | ||
uint32_t activePartitions2; | ||
uint32_t reserved2; | ||
uint32_t activePartitions0; | ||
uint32_t activePartitions1; | ||
uint32_t nibble; | ||
uint32_t lumiSection; | ||
uint16_t reserved3; | ||
uint16_t reserved4; | ||
uint16_t reserved5; | ||
uint16_t inputs; | ||
uint16_t bcid; | ||
uint16_t orbitLow; | ||
uint32_t orbitHigh; | ||
uint64_t triggerCount; | ||
uint64_t eventNumber; | ||
} header; | ||
}; | ||
|
||
TCDSHeader(const unsigned char *p) : | ||
s((sizes*)p), | ||
h((tcdsheader*)(p+sizeof(uint64_t))) | ||
{ | ||
|
||
} | ||
const sizes &getSizes(){return *s;} | ||
const tcdsheader &getData(){return *h;} | ||
private: | ||
sizes *s; | ||
tcdsheader *h; | ||
}; | ||
class TCDSL1AHistory{ | ||
public: | ||
struct l1a{ | ||
uint16_t bxid; | ||
uint16_t dummy0; | ||
uint16_t dummy1; | ||
unsigned char ind0; | ||
uint32_t orbitlow; | ||
uint16_t orbithigh; | ||
unsigned char eventtype; | ||
unsigned char ind1; | ||
}; | ||
union l1h{ | ||
uint64_t words[32]; | ||
l1a hist[32]; | ||
}; | ||
TCDSL1AHistory(const unsigned char *p) : hist((l1h*)p){ | ||
} | ||
const l1h &history(){return *hist;} | ||
private: | ||
l1h *hist; | ||
}; | ||
|
||
class TCDSBST{ | ||
public: | ||
struct bst{ | ||
uint32_t gpstimelow; | ||
uint32_t gpstimehigh; | ||
uint32_t low0; | ||
uint32_t high0; | ||
uint32_t low1; | ||
uint32_t high1; | ||
uint32_t low2; | ||
uint32_t high2; | ||
uint32_t low3; | ||
uint32_t high3; | ||
uint32_t low4; | ||
uint32_t high4; | ||
uint32_t low5; | ||
uint32_t status; | ||
}; | ||
TCDSBST(const unsigned char *p) : b((bst*)p){ | ||
} | ||
const bst &getBST(){return *b;} | ||
private: | ||
bst *b; | ||
}; | ||
|
||
class TCDSRecord{ | ||
public: | ||
TCDSRecord(const unsigned char *p) : | ||
h(p+sizeof(fedh_t)), | ||
l1h(p+sizeof(fedh_t)+(h.getSizes().size.headerSize+1)*8), | ||
b(p+sizeof(fedh_t)+(h.getSizes().size.headerSize+1)*8+ | ||
(h.getSizes().size.L1AhistSize)*8) | ||
{ | ||
|
||
} | ||
TCDSHeader &getHeader(){return h;} | ||
TCDSL1AHistory &getHistory(){return l1h;} | ||
TCDSBST &getBST(){return b;} | ||
private: | ||
TCDSHeader h; | ||
TCDSL1AHistory l1h; | ||
TCDSBST b; | ||
}; | ||
|
||
|
||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#ifndef EVF_UTILITIES_AUXILIARYMAKERS_H | ||
#define EVF_UTILITIES_AUXILIARYMAKERS_H | ||
|
||
#include "DataFormats/Provenance/interface/EventAuxiliary.h" | ||
#include "EventFilter/FEDInterface/interface/FED1024.h" | ||
|
||
namespace evf{ | ||
namespace evtn{ | ||
edm::EventAuxiliary makeEventAuxiliary(TCDSRecord *record, | ||
unsigned int runNumber, | ||
unsigned int lumiSection, | ||
std::string const &processGUID); | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.