CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Attributes

DCCTBDataMapper Class Reference

#include <DCCDataMapper.h>

List of all members.

Public Types

enum  DCCFIELDS {
  H_WPOSITION = 0, H_BPOSITION = 3, H_MASK = 0x1, FOV_WPOSITION = 0,
  FOV_BPOSITION = 4, FOV_MASK = 0xF, DCCID_WPOSITION = 0, DCCID_BPOSITION = 8,
  DCCID_MASK = 0xFFF, DCCBX_WPOSITION = 0, DCCBX_BPOSITION = 20, DCCBX_MASK = 0xFFF,
  DCCL1_WPOSITION = 1, DCCL1_BPOSITION = 0, DCCL1_MASK = 0xFFFFFF, TRIGGERTYPE_WPOSITION = 1,
  TRIGGERTYPE_BPOSITION = 24, TRIGGERTYPE_MASK = 0xF, BOE_WPOSITION = 1, BOE_BPOSITION = 28,
  BOE_MASK = 0xF, EVENTLENGTH_WPOSITION = 2, EVENTLENGTH_BPOSITION = 0, EVENTLENGTH_MASK = 0xFFFFFF,
  DCCERRORS_WPOSITION = 2, DCCERRORS_BPOSITION = 24, DCCERRORS_MASK = 0xFF, RNUMB_WPOSITION = 3,
  RNUMB_BPOSITION = 0, RNUMB_MASK = 0xFFFFFF, HD_WPOSITION = 3, HD_BPOSITION = 24,
  HD_MASK = 0xFF, RUNTYPE_WPOSITION = 4, RUNTYPE_BPOSITION = 0, RUNTYPE_MASK = 0xFFFFFFFF,
  DETAILEDTT_WPOSITION = 5, DETAILEDTT_BPOSITION = 0, DETAILEDTT_MASK = 0xFFFF, ORBITCOUNTER_WPOSITION = 6,
  ORBITCOUNTER_BPOSITION = 0, ORBITCOUNTER_MASK = 0xFFFFFFFF, SR_WPOSITION = 7, SR_BPOSITION = 0,
  SR_MASK = 0x1, ZS_WPOSITION = 7, ZS_BPOSITION = 1, ZS_MASK = 0x1,
  TZS_WPOSITION = 7, TZS_BPOSITION = 2, TZS_MASK = 0x1, SR_CHSTATUS_WPOSITION = 7,
  SR_CHSTATUS_BPOSITION = 4, SR_CHSTATUS_MASK = 0xF, TCC_CHSTATUS_WPOSITION = 7, TCC_CHSTATUS_BPOSITION = 8,
  TCC_CHSTATUS_MASK = 0xF, FE_CHSTATUS_WPOSITION = 8, CHSTATUS_BPOSITION = 0, FE_CHSTATUS_MASK = 0xF
}
enum  SRPFIELDS {
  SRPID_WPOSITION = 0, SRPID_BPOSITION = 0, SRPID_MASK = 0xFF, SRPBX_WPOSITION = 0,
  SRPBX_BPOSITION = 16, SRPBX_MASK = 0xFFF, SRPE0_WPOSITION = 0, SRPE0_BPOSITION = 28,
  SRPE0_MASK = 0x1, SRPL1_WPOSITION = 1, SRPL1_BPOSITION = 0, SRPL1_MASK = 0xFFF,
  SRPE1_WPOSITION = 1, SRPE1_BPOSITION = 12, SRPE1_MASK = 0x1, NSRF_WPOSITION = 1,
  NSRF_BPOSITION = 16, NSRF_MASK = 0x7F, SRPLE0_WPOSITION = 1, SRPLE0_BPOSITION = 27,
  SRPLE0_MASK = 0x1, SRPLE1_WPOSITION = 1, SRPLE1_BPOSITION = 28, SRPLE1_MASK = 0x1,
  SRF_WPOSITION = 2, SRF_BPOSITION = 0, SRF_MASK = 0x3, SRPBOFFSET = 16
}
enum  TCCFIELDS {
  TCCID_WPOSITION = 0, TCCID_BPOSITION = 0, TCCID_MASK = 0xFF, TCCBX_WPOSITION = 0,
  TCCBX_BPOSITION = 16, TCCBX_MASK = 0xFFF, TCCE0_WPOSITION = 0, TCCE0_BPOSITION = 28,
  TCCE0_MASK = 0x1, TCCL1_WPOSITION = 1, TCCL1_BPOSITION = 0, TCCL1_MASK = 0xFFF,
  TCCE1_WPOSITION = 1, TCCE1_BPOSITION = 12, TCCE1_MASK = 0x1, NTT_WPOSITION = 1,
  NTT_BPOSITION = 16, NTT_MASK = 0x7F, TCCTSAMP_WPOSITION = 1, TCCTSAMP_BPOSITION = 23,
  TCCTSAMP_MASK = 0xF, TCCLE0_WPOSITION = 1, TCCLE0_BPOSITION = 27, TCCLE0_MASK = 0x1,
  TCCLE1_WPOSITION = 1, TCCLE1_BPOSITION = 28, TCCLE1_MASK = 0x1, TPG_WPOSITION = 2,
  TPG_BPOSITION = 0, TPG_MASK = 0x1FF, TTF_WPOSITION = 2, TTF_BPOSITION = 9,
  TTF_MASK = 0x7
}
enum  TOWERFIELDS {
  TOWERID_WPOSITION = 0, TOWERID_BPOSITION = 0, TOWERID_MASK = 0x7F, XSAMP_WPOSITION = 0,
  XSAMP_BPOSITION = 8, XSAMP_MASK = 0x7F, TOWERBX_WPOSITION = 0, TOWERBX_BPOSITION = 16,
  TOWERBX_MASK = 0xFFF, TOWERE0_WPOSITION = 0, TOWERE0_BPOSITION = 28, TOWERE0_MASK = 0x1,
  TOWERL1_WPOSITION = 1, TOWERL1_BPOSITION = 0, TOWERL1_MASK = 0xFFF, TOWERE1_WPOSITION = 1,
  TOWERE1_BPOSITION = 12, TOWERE1_MASK = 0x1, TOWERLENGTH_WPOSITION = 1, TOWERLENGTH_BPOSITION = 16,
  TOWERLENGTH_MASK = 0x1FF
}
enum  TRAILERFIELDS {
  T_WPOSITION = 0, T_BPOSITION = 3, T_MASK = 0x1, ESTAT_WPOSITION = 0,
  ESTAT_BPOSITION = 8, ESTAT_MASK = 0xF, TTS_WPOSITION = 0, TTS_BPOSITION = 4,
  TTS_MASK = 0xF, CRC_WPOSITION = 0, CRC_BPOSITION = 16, CRC_MASK = 0xFFFF,
  TLENGTH_WPOSITION = 1, TLENGTH_BPOSITION = 0, TLENGTH_MASK = 0xFFFFFF, EOE_WPOSITION = 1,
  EOE_BPOSITION = 28, EOE_MASK = 0xF
}
enum  XTALFIELDS {
  STRIPID_WPOSITION = 0, STRIPID_BPOSITION = 0, STRIPID_MASK = 0x7, XTALID_WPOSITION = 0,
  XTALID_BPOSITION = 4, XTALID_MASK = 0x7, M_WPOSITION = 0, M_BPOSITION = 8,
  M_MASK = 0x1, SMF_WPOSITION = 0, SMF_BPOSITION = 9, SMF_MASK = 0x1,
  GMF_WPOSITION = 0, GMF_BPOSITION = 10, GMF_MASK = 0x1, XTAL_TZS_WPOSITION = 0,
  XTAL_TZS_BPOSITION = 16, XTAL_TZS_MASK = 0x1, XTAL_GDECISION_WPOSITION = 0, XTAL_GDECISION_BPOSITION = 17,
  XTAL_GDECISION_MASK = 0x1, ADC_WPOSITION = 0, ADC_BPOSITION = 0, ADC_MASK = 0x3FFF,
  ADCBOFFSET = 16
}

Public Member Functions

void buildDCCFields ()
void buildSRPFields ()
void buildTCCFields ()
void buildTowerFields ()
void buildTrailerFields ()
void buildXtalFields ()
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
dccFields ()
 DCCTBDataMapper (DCCTBDataParser *myParser)
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
emptyEventFields ()
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
srp16Fields ()
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
srp32Fields ()
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
srp68Fields ()
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
tcc16Fields ()
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
tcc32Fields ()
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
tcc68Fields ()
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
towerFields ()
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
trailerFields ()
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
xtalFields ()
 ~DCCTBDataMapper ()

Protected Attributes

std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
dccFields_
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
emptyEventFields_
DCCTBDataParserparser_
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
srp16Fields_
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
srp32Fields_
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
srp68Fields_
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
tcc16Fields_
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
tcc32Fields_
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
tcc68Fields_
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
towerFields_
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
trailerFields_
std::set< DCCTBDataField
*, DCCTBDataFieldComparator > * 
xtalFields_

Detailed Description

Definition at line 89 of file DCCDataMapper.h.


Member Enumeration Documentation

Enumerator:
H_WPOSITION 
H_BPOSITION 
H_MASK 
FOV_WPOSITION 
FOV_BPOSITION 
FOV_MASK 
DCCID_WPOSITION 
DCCID_BPOSITION 
DCCID_MASK 
DCCBX_WPOSITION 
DCCBX_BPOSITION 
DCCBX_MASK 
DCCL1_WPOSITION 
DCCL1_BPOSITION 
DCCL1_MASK 
TRIGGERTYPE_WPOSITION 
TRIGGERTYPE_BPOSITION 
TRIGGERTYPE_MASK 
BOE_WPOSITION 
BOE_BPOSITION 
BOE_MASK 
EVENTLENGTH_WPOSITION 
EVENTLENGTH_BPOSITION 
EVENTLENGTH_MASK 
DCCERRORS_WPOSITION 
DCCERRORS_BPOSITION 
DCCERRORS_MASK 
RNUMB_WPOSITION 
RNUMB_BPOSITION 
RNUMB_MASK 
HD_WPOSITION 
HD_BPOSITION 
HD_MASK 
RUNTYPE_WPOSITION 
RUNTYPE_BPOSITION 
RUNTYPE_MASK 
DETAILEDTT_WPOSITION 
DETAILEDTT_BPOSITION 
DETAILEDTT_MASK 
ORBITCOUNTER_WPOSITION 
ORBITCOUNTER_BPOSITION 
ORBITCOUNTER_MASK 
SR_WPOSITION 
SR_BPOSITION 
SR_MASK 
ZS_WPOSITION 
ZS_BPOSITION 
ZS_MASK 
TZS_WPOSITION 
TZS_BPOSITION 
TZS_MASK 
SR_CHSTATUS_WPOSITION 
SR_CHSTATUS_BPOSITION 
SR_CHSTATUS_MASK 
TCC_CHSTATUS_WPOSITION 
TCC_CHSTATUS_BPOSITION 
TCC_CHSTATUS_MASK 
FE_CHSTATUS_WPOSITION 
CHSTATUS_BPOSITION 
FE_CHSTATUS_MASK 

Definition at line 139 of file DCCDataMapper.h.

Enumerator:
SRPID_WPOSITION 
SRPID_BPOSITION 
SRPID_MASK 
SRPBX_WPOSITION 
SRPBX_BPOSITION 
SRPBX_MASK 
SRPE0_WPOSITION 
SRPE0_BPOSITION 
SRPE0_MASK 
SRPL1_WPOSITION 
SRPL1_BPOSITION 
SRPL1_MASK 
SRPE1_WPOSITION 
SRPE1_BPOSITION 
SRPE1_MASK 
NSRF_WPOSITION 
NSRF_BPOSITION 
NSRF_MASK 
SRPLE0_WPOSITION 
SRPLE0_BPOSITION 
SRPLE0_MASK 
SRPLE1_WPOSITION 
SRPLE1_BPOSITION 
SRPLE1_MASK 
SRF_WPOSITION 
SRF_BPOSITION 
SRF_MASK 
SRPBOFFSET 

Definition at line 189 of file DCCDataMapper.h.

Enumerator:
TCCID_WPOSITION 
TCCID_BPOSITION 
TCCID_MASK 
TCCBX_WPOSITION 
TCCBX_BPOSITION 
TCCBX_MASK 
TCCE0_WPOSITION 
TCCE0_BPOSITION 
TCCE0_MASK 
TCCL1_WPOSITION 
TCCL1_BPOSITION 
TCCL1_MASK 
TCCE1_WPOSITION 
TCCE1_BPOSITION 
TCCE1_MASK 
NTT_WPOSITION 
NTT_BPOSITION 
NTT_MASK 
TCCTSAMP_WPOSITION 
TCCTSAMP_BPOSITION 
TCCTSAMP_MASK 
TCCLE0_WPOSITION 
TCCLE0_BPOSITION 
TCCLE0_MASK 
TCCLE1_WPOSITION 
TCCLE1_BPOSITION 
TCCLE1_MASK 
TPG_WPOSITION 
TPG_BPOSITION 
TPG_MASK 
TTF_WPOSITION 
TTF_BPOSITION 
TTF_MASK 

Definition at line 172 of file DCCDataMapper.h.

Enumerator:
TOWERID_WPOSITION 
TOWERID_BPOSITION 
TOWERID_MASK 
XSAMP_WPOSITION 
XSAMP_BPOSITION 
XSAMP_MASK 
TOWERBX_WPOSITION 
TOWERBX_BPOSITION 
TOWERBX_MASK 
TOWERE0_WPOSITION 
TOWERE0_BPOSITION 
TOWERE0_MASK 
TOWERL1_WPOSITION 
TOWERL1_BPOSITION 
TOWERL1_MASK 
TOWERE1_WPOSITION 
TOWERE1_BPOSITION 
TOWERE1_MASK 
TOWERLENGTH_WPOSITION 
TOWERLENGTH_BPOSITION 
TOWERLENGTH_MASK 

Definition at line 205 of file DCCDataMapper.h.

Enumerator:
T_WPOSITION 
T_BPOSITION 
T_MASK 
ESTAT_WPOSITION 
ESTAT_BPOSITION 
ESTAT_MASK 
TTS_WPOSITION 
TTS_BPOSITION 
TTS_MASK 
CRC_WPOSITION 
CRC_BPOSITION 
CRC_MASK 
TLENGTH_WPOSITION 
TLENGTH_BPOSITION 
TLENGTH_MASK 
EOE_WPOSITION 
EOE_BPOSITION 
EOE_MASK 

Definition at line 230 of file DCCDataMapper.h.

Enumerator:
STRIPID_WPOSITION 
STRIPID_BPOSITION 
STRIPID_MASK 
XTALID_WPOSITION 
XTALID_BPOSITION 
XTALID_MASK 
M_WPOSITION 
M_BPOSITION 
M_MASK 
SMF_WPOSITION 
SMF_BPOSITION 
SMF_MASK 
GMF_WPOSITION 
GMF_BPOSITION 
GMF_MASK 
XTAL_TZS_WPOSITION 
XTAL_TZS_BPOSITION 
XTAL_TZS_MASK 
XTAL_GDECISION_WPOSITION 
XTAL_GDECISION_BPOSITION 
XTAL_GDECISION_MASK 
ADC_WPOSITION 
ADC_BPOSITION 
ADC_MASK 
ADCBOFFSET 

Definition at line 217 of file DCCDataMapper.h.


Constructor & Destructor Documentation

DCCTBDataMapper::DCCTBDataMapper ( DCCTBDataParser myParser)

Definition at line 7 of file DCCDataMapper.cc.

References buildDCCFields(), buildSRPFields(), buildTCCFields(), buildTowerFields(), buildTrailerFields(), buildXtalFields(), dccFields_, emptyEventFields_, srp16Fields_, srp32Fields_, srp68Fields_, tcc16Fields_, tcc32Fields_, tcc68Fields_, towerFields_, trailerFields_, and xtalFields_.

: parser_(myParser){
  
  dccFields_        = new std::set<DCCTBDataField  * , DCCTBDataFieldComparator>;
  emptyEventFields_ = new std::set<DCCTBDataField  * , DCCTBDataFieldComparator>;
  
  tcc68Fields_    = new std::set<DCCTBDataField  * , DCCTBDataFieldComparator>; 
  tcc32Fields_    = new std::set<DCCTBDataField  * , DCCTBDataFieldComparator>;
  tcc16Fields_    = new std::set<DCCTBDataField  * , DCCTBDataFieldComparator>;

  srp68Fields_    = new std::set<DCCTBDataField  * , DCCTBDataFieldComparator>;
  srp32Fields_    = new std::set<DCCTBDataField  * , DCCTBDataFieldComparator>;
  srp16Fields_    = new std::set<DCCTBDataField  * , DCCTBDataFieldComparator>;
  
  towerFields_  = new std::set<DCCTBDataField  * , DCCTBDataFieldComparator>;   
  xtalFields_   = new std::set<DCCTBDataField  * , DCCTBDataFieldComparator>;
  trailerFields_= new std::set<DCCTBDataField  * , DCCTBDataFieldComparator>;
        
  buildDCCFields();
  buildTCCFields(); 
  buildSRPFields(); 
  buildTowerFields();
  buildXtalFields();
  buildTrailerFields(); 
}
DCCTBDataMapper::~DCCTBDataMapper ( )

Definition at line 37 of file DCCDataMapper.cc.

References dccFields_, emptyEventFields_, srp16Fields_, srp32Fields_, srp68Fields_, tcc16Fields_, tcc32Fields_, tcc68Fields_, towerFields_, trailerFields_, and xtalFields_.

                                 {
  
  std::set<DCCTBDataField *,DCCTBDataFieldComparator>::iterator it;
  
  for(it = dccFields_->begin()    ;it != dccFields_->end();     it++){ delete (*it);}
  for(it = emptyEventFields_->begin()    ;it != emptyEventFields_->end();     it++){ delete (*it);}
  
  for(it = tcc68Fields_->begin()  ;it != tcc68Fields_->end();     it++){ delete (*it);}         
  for(it = tcc32Fields_->begin()  ;it != tcc32Fields_->end();     it++){ delete (*it);}
  for(it = tcc16Fields_->begin()  ;it != tcc16Fields_->end();     it++){ delete (*it);}
  
  for(it = srp68Fields_->begin()  ;it != srp68Fields_->end();     it++){ delete (*it);}
  for(it = srp32Fields_->begin()  ;it != srp32Fields_->end();     it++){ delete (*it);}
  for(it = srp16Fields_->begin()  ;it != srp16Fields_->end();     it++){ delete (*it);}
        
  for(it = towerFields_->begin()  ;it != towerFields_->end();   it++){ delete (*it);}
  for(it = xtalFields_->begin()   ;it != xtalFields_->end();    it++){ delete (*it);}
  for(it = trailerFields_->begin();it != trailerFields_->end(); it++){ delete (*it);}
        
  delete dccFields_;
  delete emptyEventFields_;

  delete tcc68Fields_;
  delete tcc32Fields_;
  delete tcc16Fields_;
  
  delete srp68Fields_;
  delete srp32Fields_;
  delete srp16Fields_;
  
  delete towerFields_;
  delete xtalFields_;
  delete trailerFields_;
}

Member Function Documentation

void DCCTBDataMapper::buildDCCFields ( )

Build methods for raw data fields

Definition at line 77 of file DCCDataMapper.cc.

References BOE_BPOSITION, BOE_MASK, BOE_WPOSITION, DCCBX_BPOSITION, DCCBX_MASK, DCCBX_WPOSITION, DCCERRORS_BPOSITION, DCCERRORS_MASK, DCCERRORS_WPOSITION, dccFields_, DCCID_BPOSITION, DCCID_MASK, DCCID_WPOSITION, DCCL1_BPOSITION, DCCL1_MASK, DCCL1_WPOSITION, DETAILEDTT_BPOSITION, DETAILEDTT_MASK, DETAILEDTT_WPOSITION, emptyEventFields_, EVENTLENGTH_BPOSITION, EVENTLENGTH_MASK, EVENTLENGTH_WPOSITION, FE_CHSTATUS_MASK, FE_CHSTATUS_WPOSITION, FOV_BPOSITION, FOV_MASK, FOV_WPOSITION, DCCTBDataParser::getDecString(), H_BPOSITION, H_MASK, H_WPOSITION, HD_BPOSITION, HD_MASK, HD_WPOSITION, errorMatrix2Lands::header, i, ORBITCOUNTER_BPOSITION, ORBITCOUNTER_MASK, ORBITCOUNTER_WPOSITION, parser_, RNUMB_BPOSITION, RNUMB_MASK, RNUMB_WPOSITION, RUNTYPE_BPOSITION, RUNTYPE_MASK, RUNTYPE_WPOSITION, SR_BPOSITION, SR_CHSTATUS_BPOSITION, SR_CHSTATUS_MASK, SR_CHSTATUS_WPOSITION, SR_MASK, SR_WPOSITION, TCC_CHSTATUS_BPOSITION, TCC_CHSTATUS_MASK, TCC_CHSTATUS_WPOSITION, TRIGGERTYPE_BPOSITION, TRIGGERTYPE_MASK, TRIGGERTYPE_WPOSITION, TZS_BPOSITION, TZS_MASK, TZS_WPOSITION, ZS_BPOSITION, ZS_MASK, and ZS_WPOSITION.

Referenced by DCCTBDataMapper().

                                    {

  //32 Bit word numb 0
  dccFields_->insert( new DCCTBDataField("H",H_WPOSITION,H_BPOSITION,H_MASK));
  emptyEventFields_->insert( new DCCTBDataField("H",H_WPOSITION,H_BPOSITION,H_MASK));
  
  dccFields_->insert( new DCCTBDataField("FOV",FOV_WPOSITION,FOV_BPOSITION,FOV_MASK));
  emptyEventFields_->insert( new DCCTBDataField("FOV",FOV_WPOSITION,FOV_BPOSITION,FOV_MASK));
  
  dccFields_->insert( new DCCTBDataField("FED/DCC ID",DCCID_WPOSITION,DCCID_BPOSITION,DCCID_MASK));
  emptyEventFields_->insert( new DCCTBDataField("FED/DCC ID",DCCID_WPOSITION,DCCID_BPOSITION,DCCID_MASK));
        
  dccFields_->insert( new DCCTBDataField("BX",DCCBX_WPOSITION,DCCBX_BPOSITION,DCCBX_MASK));
  emptyEventFields_->insert( new DCCTBDataField("BX",DCCBX_WPOSITION,DCCBX_BPOSITION,DCCBX_MASK));

  //32Bit word numb 1
  dccFields_->insert( new DCCTBDataField("LV1",DCCL1_WPOSITION ,DCCL1_BPOSITION,DCCL1_MASK));
  emptyEventFields_->insert( new DCCTBDataField("LV1",DCCL1_WPOSITION ,DCCL1_BPOSITION,DCCL1_MASK));
        
  dccFields_->insert( new DCCTBDataField("TRIGGER TYPE",TRIGGERTYPE_WPOSITION,TRIGGERTYPE_BPOSITION,TRIGGERTYPE_MASK));
  emptyEventFields_->insert( new DCCTBDataField("TRIGGER TYPE",TRIGGERTYPE_WPOSITION,TRIGGERTYPE_BPOSITION,TRIGGERTYPE_MASK));
        
  dccFields_->insert( new DCCTBDataField("BOE",BOE_WPOSITION,BOE_BPOSITION,BOE_MASK));
  emptyEventFields_->insert( new DCCTBDataField("BOE",BOE_WPOSITION,BOE_BPOSITION,BOE_MASK));

  //32Bit word numb 2
  dccFields_->insert( new DCCTBDataField("EVENT LENGTH",EVENTLENGTH_WPOSITION,EVENTLENGTH_BPOSITION,EVENTLENGTH_MASK));
  emptyEventFields_->insert( new DCCTBDataField("EVENT LENGTH",EVENTLENGTH_WPOSITION,EVENTLENGTH_BPOSITION,EVENTLENGTH_MASK));
  
  dccFields_->insert( new DCCTBDataField("DCC ERRORS",DCCERRORS_WPOSITION  ,DCCERRORS_BPOSITION,DCCERRORS_MASK));
  emptyEventFields_->insert( new DCCTBDataField("DCC ERRORS",DCCERRORS_WPOSITION  ,DCCERRORS_BPOSITION,DCCERRORS_MASK));
  
  //32Bit word numb 3 
  dccFields_->insert( new DCCTBDataField("RUN NUMBER",RNUMB_WPOSITION,RNUMB_BPOSITION,RNUMB_MASK));
  emptyEventFields_->insert( new DCCTBDataField("RUN NUMBER",RNUMB_WPOSITION,RNUMB_BPOSITION,RNUMB_MASK));
        
  //32 Bit word numb 4
  dccFields_->insert( new DCCTBDataField("RUN TYPE",RUNTYPE_WPOSITION,RUNTYPE_BPOSITION,RUNTYPE_MASK)); 
  emptyEventFields_->insert( new DCCTBDataField("RUN TYPE",RUNTYPE_WPOSITION,RUNTYPE_BPOSITION,RUNTYPE_MASK));  
  
  //32Bit word numb 5 
  dccFields_->insert( new DCCTBDataField("DETAILED TRIGGER TYPE",DETAILEDTT_WPOSITION,DETAILEDTT_BPOSITION,DETAILEDTT_MASK));
  emptyEventFields_->insert( new DCCTBDataField("DETAILED TRIGGER TYPE",DETAILEDTT_WPOSITION,DETAILEDTT_BPOSITION,DETAILEDTT_MASK));

  //32 Bit word numb 6
  dccFields_->insert( new DCCTBDataField("ORBIT COUNTER",ORBITCOUNTER_WPOSITION,ORBITCOUNTER_BPOSITION,ORBITCOUNTER_MASK));

  //32 Bit word numb 7
  dccFields_->insert( new DCCTBDataField("SR",SR_WPOSITION,SR_BPOSITION,SR_MASK));
  dccFields_->insert( new DCCTBDataField("ZS",ZS_WPOSITION,ZS_BPOSITION,ZS_MASK));
  dccFields_->insert( new DCCTBDataField("TZS",TZS_WPOSITION,TZS_BPOSITION,TZS_MASK));
        
  dccFields_->insert( new DCCTBDataField("SR_CHSTATUS",SR_CHSTATUS_WPOSITION,SR_CHSTATUS_BPOSITION,SR_CHSTATUS_MASK));  
  dccFields_->insert( new DCCTBDataField("TCC_CHSTATUS#1",TCC_CHSTATUS_WPOSITION,TCC_CHSTATUS_BPOSITION,TCC_CHSTATUS_MASK));    
  dccFields_->insert( new DCCTBDataField("TCC_CHSTATUS#2",TCC_CHSTATUS_WPOSITION,TCC_CHSTATUS_BPOSITION+4,TCC_CHSTATUS_MASK));
  dccFields_->insert( new DCCTBDataField("TCC_CHSTATUS#3",TCC_CHSTATUS_WPOSITION,TCC_CHSTATUS_BPOSITION+8,TCC_CHSTATUS_MASK));  
  dccFields_->insert( new DCCTBDataField("TCC_CHSTATUS#4",TCC_CHSTATUS_WPOSITION,TCC_CHSTATUS_BPOSITION+12,TCC_CHSTATUS_MASK));
  

  //add Headers Qualifiers: 8 words with 6 bits each written on the 2nd 32bit words
  for(uint32_t i=1;i<=8;i++){
    std::string header = std::string("H") + parser_->getDecString(i);
    dccFields_->insert( new DCCTBDataField(header,HD_WPOSITION + (i-1)*2 ,HD_BPOSITION,HD_MASK));               

    //fill only for empty events
    if(i<3){ emptyEventFields_->insert( new DCCTBDataField(header,HD_WPOSITION + (i-1)*2 ,HD_BPOSITION,HD_MASK));       }       
  }


  //add FE_CHSTATUS: 5 words each having 14 FE_CHSTATUS
  for(uint32_t wcount = 1; wcount<=5; wcount++){

    //1st word 32 bit
    for(uint32_t i=1;i<=8;i++){
      std::string chStatus = std::string("FE_CHSTATUS#") + parser_->getDecString( (wcount-1)*14 + i );
      dccFields_->insert( new DCCTBDataField(chStatus, FE_CHSTATUS_WPOSITION +(wcount-1)*2, 4*(i-1),FE_CHSTATUS_MASK)); 
    }

    //2nd word 32 bit
    for(uint32_t i=9;i<=14;i++){
      std::string chStatus = std::string("FE_CHSTATUS#") + parser_->getDecString((wcount-1)*14 + i);
      dccFields_->insert( new DCCTBDataField(chStatus, FE_CHSTATUS_WPOSITION + (wcount-1)*2 + 1,4*(i-9),FE_CHSTATUS_MASK));     
    }
    
  }

}
void DCCTBDataMapper::buildSRPFields ( )

Definition at line 219 of file DCCDataMapper.cc.

References DCCTBDataParser::getDecString(), i, edm::eventsetup::heterocontainer::insert(), NSRF_BPOSITION, NSRF_MASK, NSRF_WPOSITION, parser_, SRF_BPOSITION, SRF_MASK, SRF_WPOSITION, srp16Fields_, srp32Fields_, srp68Fields_, SRPBOFFSET, SRPBX_BPOSITION, SRPBX_MASK, SRPBX_WPOSITION, SRPE0_BPOSITION, SRPE0_MASK, SRPE0_WPOSITION, SRPE1_BPOSITION, SRPE1_MASK, SRPE1_WPOSITION, SRPID_BPOSITION, SRPID_MASK, SRPID_WPOSITION, SRPL1_BPOSITION, SRPL1_MASK, SRPL1_WPOSITION, SRPLE0_BPOSITION, SRPLE0_MASK, SRPLE0_WPOSITION, SRPLE1_BPOSITION, SRPLE1_MASK, and SRPLE1_WPOSITION.

Referenced by DCCTBDataMapper().

                                    {
  std::vector<std::set<DCCTBDataField *, DCCTBDataFieldComparator> * > pVector;
  pVector.push_back(srp68Fields_);
  pVector.push_back(srp32Fields_);
  pVector.push_back(srp16Fields_);
  
  for(int i=0; i< ((int)(pVector.size())) ;i++){
    // This method must be modified to take into account the different SRP blocks : 68 SRF in the barrel, 34 ,35 or 36 in the EE
    (pVector[i])->insert( new DCCTBDataField("SRP ID",SRPID_WPOSITION ,SRPID_BPOSITION,SRPID_MASK));
    (pVector[i])->insert( new DCCTBDataField("BX",SRPBX_WPOSITION ,SRPBX_BPOSITION,SRPBX_MASK));        
    (pVector[i])->insert( new DCCTBDataField("E0",SRPE0_WPOSITION ,SRPE0_BPOSITION,SRPE0_MASK));
    
    (pVector[i])->insert( new DCCTBDataField("LV1",SRPL1_WPOSITION ,SRPL1_BPOSITION,SRPL1_MASK));
    (pVector[i])->insert( new DCCTBDataField("E1", SRPE1_WPOSITION, SRPE1_BPOSITION, SRPE1_MASK));      
    (pVector[i])->insert( new DCCTBDataField("#SR FLAGS",NSRF_WPOSITION, NSRF_BPOSITION,NSRF_MASK));
    (pVector[i])->insert( new DCCTBDataField("LE0",SRPLE0_WPOSITION, SRPLE0_BPOSITION, SRPLE0_MASK));   
    (pVector[i])->insert( new DCCTBDataField("LE1",SRPLE1_WPOSITION, SRPLE1_BPOSITION, SRPLE1_MASK));   
  }
  
  uint32_t srpFlags(68); 
  
  uint32_t count1(1), count2(1), srSize(3), factor(0), wcount(0);
  for(uint32_t nsr =1; nsr<=srpFlags; nsr++){
    
    std::string sr = std::string("SR#") + parser_->getDecString(nsr);
    
    srp68Fields_->insert( new DCCTBDataField(sr,SRF_WPOSITION + wcount, SRF_BPOSITION + SRPBOFFSET*factor + (count2-1)*srSize,SRF_MASK));
    if( nsr<=32 ){ srp32Fields_->insert( new DCCTBDataField(sr,SRF_WPOSITION + wcount, SRF_BPOSITION + SRPBOFFSET*factor + (count2-1)*srSize,SRF_MASK));}
    if( nsr<=16 ){ srp16Fields_->insert( new DCCTBDataField(sr,SRF_WPOSITION + wcount, SRF_BPOSITION + SRPBOFFSET*factor + (count2-1)*srSize,SRF_MASK));}
    
    count1++; count2++; 
    
    //update word count
    if( count1 > 8){ wcount++; count1=1;}       
    
    //update bit offset
    if(count1 > 4){ factor = 1;}
    else{factor = 0;}
    
    //update bit shift
    if( count2 > 4){ count2 = 1;}
    
  }
}
void DCCTBDataMapper::buildTCCFields ( )

Definition at line 169 of file DCCDataMapper.cc.

References prof2calltree::count, DCCTBDataParser::getDecString(), i, edm::eventsetup::heterocontainer::insert(), NTT_BPOSITION, NTT_MASK, NTT_WPOSITION, DCCTBDataParser::numbTriggerSamples(), parser_, tcc16Fields_, tcc32Fields_, tcc68Fields_, TCCBX_BPOSITION, TCCBX_MASK, TCCBX_WPOSITION, TCCE0_BPOSITION, TCCE0_MASK, TCCE0_WPOSITION, TCCE1_BPOSITION, TCCE1_MASK, TCCE1_WPOSITION, TCCID_BPOSITION, TCCID_MASK, TCCID_WPOSITION, TCCL1_BPOSITION, TCCL1_MASK, TCCL1_WPOSITION, TCCLE0_BPOSITION, TCCLE0_MASK, TCCLE0_WPOSITION, TCCLE1_BPOSITION, TCCLE1_MASK, TCCLE1_WPOSITION, TCCTSAMP_BPOSITION, TCCTSAMP_MASK, TCCTSAMP_WPOSITION, TPG_BPOSITION, TPG_MASK, TPG_WPOSITION, groupFilesInBlocks::tt, TTF_BPOSITION, TTF_MASK, and TTF_WPOSITION.

Referenced by DCCTBDataMapper().

                                    {
        
  std::vector<std::set<DCCTBDataField *, DCCTBDataFieldComparator> *> pVector;
  pVector.push_back(tcc16Fields_);
  pVector.push_back(tcc32Fields_);
  pVector.push_back(tcc68Fields_);
        
  for(int i=0; i< ((int)(pVector.size())) ;i++){
    (pVector[i])->insert( new DCCTBDataField("TCC ID",TCCID_WPOSITION ,TCCID_BPOSITION,TCCID_MASK));
    (pVector[i])->insert( new DCCTBDataField("BX",TCCBX_WPOSITION ,TCCBX_BPOSITION,TCCBX_MASK));        
    (pVector[i])->insert( new DCCTBDataField("E0",TCCE0_WPOSITION ,TCCE0_BPOSITION,TCCE0_MASK));
    (pVector[i])->insert( new DCCTBDataField("LV1",TCCL1_WPOSITION ,TCCL1_BPOSITION,TCCL1_MASK));
    (pVector[i])->insert( new DCCTBDataField("E1", TCCE1_WPOSITION, TCCE1_BPOSITION, TCCE1_MASK));      
    (pVector[i])->insert( new DCCTBDataField("#TT", NTT_WPOSITION, NTT_BPOSITION, NTT_MASK));
    (pVector[i])->insert( new DCCTBDataField("#TIME SAMPLES",TCCTSAMP_WPOSITION, TCCTSAMP_BPOSITION,TCCTSAMP_MASK));    
    (pVector[i])->insert( new DCCTBDataField("LE0",TCCLE0_WPOSITION, TCCLE0_BPOSITION, TCCLE0_MASK));   
    (pVector[i])->insert( new DCCTBDataField("LE1",TCCLE1_WPOSITION, TCCLE1_BPOSITION, TCCLE1_MASK));   
  }
  
  uint32_t nTSamples = parser_->numbTriggerSamples();
        
  uint32_t totalTT   = 68*nTSamples; 
  
  uint32_t filter1 = 16*nTSamples;
  uint32_t filter2 = 32*nTSamples;
        
  uint32_t count(2) ;
        
  // Fill block with TT definition 
  for(uint32_t tt=1; tt<=totalTT; tt++){
    std::string tpg    = std::string("TPG#") + parser_->getDecString(tt);
    std::string ttFlag = std::string("TTF#") + parser_->getDecString(tt);

    if(tt<=filter1){ 
      tcc16Fields_->insert( new DCCTBDataField(tpg, TPG_WPOSITION -1 + count/2, TPG_BPOSITION + 16*( (count+2)%2 ),TPG_MASK));
      tcc16Fields_->insert( new DCCTBDataField(ttFlag, TTF_WPOSITION -1 + count/2, TTF_BPOSITION + 16*( (count+2)%2 ),TTF_MASK));
    }
    if(tt<=filter2){
      tcc32Fields_->insert( new DCCTBDataField(tpg, TPG_WPOSITION -1 + count/2, TPG_BPOSITION + 16*( (count+2)%2 ),TPG_MASK));
      tcc32Fields_->insert( new DCCTBDataField(ttFlag, TTF_WPOSITION -1 + count/2, TTF_BPOSITION + 16*( (count+2)%2 ),TTF_MASK));
    }
    
    tcc68Fields_->insert( new DCCTBDataField(tpg, TPG_WPOSITION -1 + count/2, TPG_BPOSITION + 16*( (count+2)%2 ),TPG_MASK));
    tcc68Fields_->insert( new DCCTBDataField(ttFlag, TTF_WPOSITION -1 + count/2, TTF_BPOSITION + 16*( (count+2)%2 ),TTF_MASK));
    count++;
  }
                
}
void DCCTBDataMapper::buildTowerFields ( )
void DCCTBDataMapper::buildTrailerFields ( )
void DCCTBDataMapper::buildXtalFields ( )

Definition at line 287 of file DCCDataMapper.cc.

References ecalMGPA::adc(), ADC_MASK, ADC_WPOSITION, ADCBOFFSET, DCCTBDataParser::getDecString(), GMF_BPOSITION, GMF_MASK, GMF_WPOSITION, i, M_BPOSITION, M_MASK, M_WPOSITION, DCCTBDataParser::numbXtalSamples(), parser_, SMF_BPOSITION, SMF_MASK, SMF_WPOSITION, STRIPID_BPOSITION, STRIPID_MASK, STRIPID_WPOSITION, XTAL_GDECISION_BPOSITION, XTAL_GDECISION_MASK, XTAL_GDECISION_WPOSITION, XTAL_TZS_BPOSITION, XTAL_TZS_MASK, XTAL_TZS_WPOSITION, xtalFields_, XTALID_BPOSITION, XTALID_MASK, and XTALID_WPOSITION.

Referenced by DCCTBDataMapper().

                                     {
        
  //32bit word numb 1   
  xtalFields_->insert(new DCCTBDataField("STRIP ID",STRIPID_WPOSITION,STRIPID_BPOSITION,STRIPID_MASK));
  xtalFields_->insert(new DCCTBDataField("XTAL ID",XTALID_WPOSITION,XTALID_BPOSITION,XTALID_MASK));
  xtalFields_->insert(new DCCTBDataField("M",M_WPOSITION,M_BPOSITION,M_MASK));
  xtalFields_->insert(new DCCTBDataField("SMF",SMF_WPOSITION,SMF_BPOSITION,SMF_MASK));
  xtalFields_->insert(new DCCTBDataField("GMF",GMF_WPOSITION,GMF_BPOSITION,GMF_MASK));

  //first ADC is still on 1st word
  xtalFields_->insert(new DCCTBDataField("ADC#1",ADC_WPOSITION,ADCBOFFSET,ADC_MASK));
        
  //add the rest of the ADCs 
  for(uint32_t i=2; i <= parser_->numbXtalSamples();i++){
    std::string adc = std::string("ADC#") + parser_->getDecString(i);
    if(i%2){ xtalFields_->insert(new DCCTBDataField(adc,ADC_WPOSITION + i/2, ADCBOFFSET,ADC_MASK)); }
    else   { xtalFields_->insert(new DCCTBDataField(adc,ADC_WPOSITION + i/2, 0,ADC_MASK)); }
  }

  //the last word has written the test zero suppression flag and the gain decision bit
  uint32_t tzsOffset_ = parser_->numbXtalSamples()/2;
  xtalFields_->insert(new DCCTBDataField("TZS",XTAL_TZS_WPOSITION+tzsOffset_,XTAL_TZS_BPOSITION,XTAL_TZS_MASK));
  xtalFields_->insert(new DCCTBDataField("GDECISION",XTAL_GDECISION_WPOSITION+tzsOffset_,XTAL_GDECISION_BPOSITION,XTAL_GDECISION_MASK));
}
std::set<DCCTBDataField *, DCCTBDataFieldComparator>* DCCTBDataMapper::dccFields ( ) [inline]

Return methods for raw data fields

Definition at line 108 of file DCCDataMapper.h.

References dccFields_.

Referenced by DCCTBEventBlock::DCCTBEventBlock().

{ return dccFields_;        }
std::set<DCCTBDataField *, DCCTBDataFieldComparator>* DCCTBDataMapper::emptyEventFields ( ) [inline]

Definition at line 109 of file DCCDataMapper.h.

References emptyEventFields_.

Referenced by DCCTBEventBlock::DCCTBEventBlock().

{ return emptyEventFields_; }
std::set<DCCTBDataField *, DCCTBDataFieldComparator>* DCCTBDataMapper::srp16Fields ( ) [inline]

Definition at line 115 of file DCCDataMapper.h.

References srp16Fields_.

Referenced by DCCTBSRPBlock::DCCTBSRPBlock().

{ return srp16Fields_;      }
std::set<DCCTBDataField *, DCCTBDataFieldComparator>* DCCTBDataMapper::srp32Fields ( ) [inline]

Definition at line 114 of file DCCDataMapper.h.

References srp32Fields_.

Referenced by DCCTBSRPBlock::DCCTBSRPBlock().

{ return srp32Fields_;      }
std::set<DCCTBDataField *, DCCTBDataFieldComparator>* DCCTBDataMapper::srp68Fields ( ) [inline]

Definition at line 113 of file DCCDataMapper.h.

References srp68Fields_.

Referenced by DCCTBSRPBlock::DCCTBSRPBlock().

{ return srp68Fields_;      }
std::set<DCCTBDataField *, DCCTBDataFieldComparator>* DCCTBDataMapper::tcc16Fields ( ) [inline]

Definition at line 112 of file DCCDataMapper.h.

References tcc16Fields_.

Referenced by DCCTBTCCBlock::DCCTBTCCBlock().

{ return tcc16Fields_;      }
std::set<DCCTBDataField *, DCCTBDataFieldComparator>* DCCTBDataMapper::tcc32Fields ( ) [inline]

Definition at line 111 of file DCCDataMapper.h.

References tcc32Fields_.

Referenced by DCCTBTCCBlock::DCCTBTCCBlock().

{ return tcc32Fields_;      }
std::set<DCCTBDataField *, DCCTBDataFieldComparator>* DCCTBDataMapper::tcc68Fields ( ) [inline]

Definition at line 110 of file DCCDataMapper.h.

References tcc68Fields_.

Referenced by DCCTBTCCBlock::DCCTBTCCBlock().

{ return tcc68Fields_;      }
std::set<DCCTBDataField *, DCCTBDataFieldComparator>* DCCTBDataMapper::towerFields ( ) [inline]

Definition at line 116 of file DCCDataMapper.h.

References towerFields_.

Referenced by DCCTBTowerBlock::DCCTBTowerBlock().

{ return towerFields_;      }
std::set<DCCTBDataField *, DCCTBDataFieldComparator>* DCCTBDataMapper::trailerFields ( ) [inline]

Definition at line 118 of file DCCDataMapper.h.

References trailerFields_.

Referenced by DCCTBTrailerBlock::DCCTBTrailerBlock().

{ return trailerFields_;    }
std::set<DCCTBDataField *, DCCTBDataFieldComparator>* DCCTBDataMapper::xtalFields ( ) [inline]

Definition at line 117 of file DCCDataMapper.h.

References xtalFields_.

Referenced by DCCTBXtalBlock::DCCTBXtalBlock().

{ return xtalFields_;       }

Member Data Documentation

Definition at line 122 of file DCCDataMapper.h.

Referenced by buildDCCFields(), dccFields(), DCCTBDataMapper(), and ~DCCTBDataMapper().

Definition at line 121 of file DCCDataMapper.h.

Referenced by buildDCCFields(), buildSRPFields(), buildTCCFields(), and buildXtalFields().

Definition at line 130 of file DCCDataMapper.h.

Referenced by buildSRPFields(), DCCTBDataMapper(), srp16Fields(), and ~DCCTBDataMapper().

Definition at line 129 of file DCCDataMapper.h.

Referenced by buildSRPFields(), DCCTBDataMapper(), srp32Fields(), and ~DCCTBDataMapper().

Definition at line 128 of file DCCDataMapper.h.

Referenced by buildSRPFields(), DCCTBDataMapper(), srp68Fields(), and ~DCCTBDataMapper().

Definition at line 126 of file DCCDataMapper.h.

Referenced by buildTCCFields(), DCCTBDataMapper(), tcc16Fields(), and ~DCCTBDataMapper().

Definition at line 125 of file DCCDataMapper.h.

Referenced by buildTCCFields(), DCCTBDataMapper(), tcc32Fields(), and ~DCCTBDataMapper().

Definition at line 124 of file DCCDataMapper.h.

Referenced by buildTCCFields(), DCCTBDataMapper(), tcc68Fields(), and ~DCCTBDataMapper().

Definition at line 132 of file DCCDataMapper.h.

Referenced by buildTowerFields(), DCCTBDataMapper(), towerFields(), and ~DCCTBDataMapper().

Definition at line 133 of file DCCDataMapper.h.

Referenced by buildXtalFields(), DCCTBDataMapper(), xtalFields(), and ~DCCTBDataMapper().