47 : m_textFileName(iConfig.getParameter<
std::
string>(
"TextFileName")),
48 m_fileEventOffset(iConfig.getParameter<
int>(
"FileEventOffset")),
51 produces<L1CaloEmCollection>();
52 produces<L1CaloRegionCollection>();
56 std::stringstream fileStream;
64 LogDebug(
"RctTextToRctDigi") <<
"RctTextToRctDigi::RctTextToRctDigi : " 65 <<
" couldn't open the file " <<
fileName 66 <<
"...skipping!" << std::endl;
83 for (
unsigned j = 0; j < 4; j++) {
87 for (
unsigned j = 0; j < 14; j++)
89 L1CaloRegion(0,
false,
false,
false,
false,
i, j / 2, j % 2));
90 for (
unsigned j = 0; j < 8; j++)
102 for (
int j = 0; j < 6; j++) {
103 getline(
m_file[crate], tmp);
105 m_file[crate] >> tmp >> bx;
106 if (tmp !=
"Crossing")
108 <<
"RctTextToRctDigi::bxSynchro : " 109 <<
" something screwy happened Crossing!=" << tmp << std::endl;
143 <<
"RctTextToRctDigi::produce : " 145 <<
" adding empty collection for event !" << std::endl;
153 if (tmp !=
"Crossing") {
155 <<
"RctTextToRctDigi::produce : " 156 <<
" something screwy happened Crossing!=" << tmp << std::endl;
169 <<
"RctTextToRctDigi::produce : " 170 <<
" something screwy happened " 171 <<
"evt:" <<
m_nevt <<
" != bx:" << BXNum <<
" + " 175 unsigned long int uLongBuffer;
176 bool mipBitBuffer[14], qBitBuffer[14];
182 for (
unsigned j = 0; j < 4; j++) {
184 em->push_back(
L1CaloEmCand(uLongBuffer, i,
true, j, BXNum,
false));
188 for (
unsigned j = 0; j < 4; j++) {
190 em->push_back(
L1CaloEmCand(uLongBuffer, i,
false, j, BXNum,
false));
194 for (
unsigned j = 0; j < 14; j++) {
199 for (
unsigned j = 0; j < 14; j++) {
204 for (
unsigned j = 0; j < 14; j++) {
212 bool overFlow = ((uLongBuffer & 0x1) != 0);
213 bool tauVeto = (((uLongBuffer & 0x2) >> 1) != 0);
215 rgn->push_back(
L1CaloRegion(et, overFlow, tauVeto, mipBitBuffer[j],
216 qBitBuffer[j], i, j / 2, j % 2));
220 for (
unsigned j = 0; j < 8; j++) {
223 unsigned et = uLongBuffer & 0xff;
std::vector< L1CaloEmCand > L1CaloEmCollection
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void bxSynchro(int &, int)
Synchronize bunch crossing.
Level-1 Region Calorimeter Trigger EM candidate.
void putEmptyDigi(edm::Event &)
Create empty digi collection.
std::string m_textFileName
Name out input file.
RctTextToRctDigi(const edm::ParameterSet &)
static const unsigned NUM_RCT_CRATES
~RctTextToRctDigi() override
int m_fileEventOffset
Number of events to be offset wrt input.
et
define resolution functions of each parameter
std::vector< std::vector< double > > tmp
A calorimeter trigger region (sum of 4x4 trigger towers)
void produce(edm::Event &, const edm::EventSetup &) override
std::vector< L1CaloRegion > L1CaloRegionCollection
std::ifstream m_file[18]
file handle