42 m_textFileName(iConfig.getParameter<std::
string>(
"TextFileName")),
43 m_fileEventOffset(iConfig.getParameter<int>(
"FileEventOffset")),
47 produces<L1CaloEmCollection>();
48 produces<L1CaloRegionCollection>();
52 std::stringstream fileStream;
53 fileStream <<
m_textFileName << std::setw(2) << std::setfill(
'0') <<
i <<
".txt";
61 <<
"RctTextToRctDigi::RctTextToRctDigi : "
62 <<
" couldn't open the file " <<
fileName <<
"...skipping!" << std::endl;
80 for (
unsigned j=0;
j<4;
j++) {
84 for (
unsigned j=0;
j<14;
j++)
86 for (
unsigned j=0;
j<8;
j++)
98 for (
int j=0;
j<6;
j++){
99 getline(
m_file[crate],tmp);
101 m_file[crate] >> tmp >> bx;
104 <<
"RctTextToRctDigi::bxSynchro : "
105 <<
" something screwy happened Crossing!=" << tmp << std::endl;
140 <<
"RctTextToRctDigi::produce : "
142 <<
" adding empty collection for event !"
154 <<
"RctTextToRctDigi::produce : "
155 <<
" something screwy happened Crossing!=" << tmp << std::endl;
168 <<
"RctTextToRctDigi::produce : "
169 <<
" something screwy happened "
174 unsigned long int uLongBuffer;
175 bool mipBitBuffer[14],qBitBuffer[14];
181 for (
unsigned j=0;
j<4;
j++){
183 em->push_back(
L1CaloEmCand(uLongBuffer, i,
true,
j,BXNum,0));
187 for (
unsigned j=0;
j<4;
j++){
189 em->push_back(
L1CaloEmCand(uLongBuffer, i,
false,
j,BXNum,0));
193 for (
unsigned j=0;
j<14;
j++){
198 for (
unsigned j=0;
j<14;
j++){
203 for (
unsigned j=0;
j<14;
j++){
206 unsigned et = uLongBuffer & 0x3ff;
209 bool overFlow = ((uLongBuffer & 0x1) != 0);
210 bool tauVeto = (((uLongBuffer & 0x2) >> 1) != 0);
212 rgn->push_back(
L1CaloRegion(et,overFlow,tauVeto,mipBitBuffer[
j],qBitBuffer[j],i,j/2,j%2));
216 for (
unsigned j=0;
j<8;
j++){
219 unsigned et = uLongBuffer & 0xff;
std::vector< L1CaloEmCand > L1CaloEmCollection
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
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
int m_fileEventOffset
Number of events to be offset wrt input.
std::vector< std::vector< double > > tmp
virtual void produce(edm::Event &, const edm::EventSetup &)
A calorimeter trigger region (sum of 4x4 trigger towers)
std::vector< L1CaloRegion > L1CaloRegionCollection
std::ifstream m_file[18]
file handle