#include <EmcDynamicData.h>
=============================================================================== | The purpose of EmcDynamicData class is: | | 1. to Parse script file describing EMCalchannels and references connections | | to FEMs; | | 2. to create storage arrays for only active channels and references data; | | 3. to create routers that explain Event Iterating routines/classes what | | channels should be read out and where these data should be stored. | | Actually router creates "connections" between electronics channels and | | elements of data arrays. | | | | To make your own EmcDynamicData object, just do: | |_____________________________________________________________________________| | int status; | | EmcDynamicData myobject(status,ConfigFileName);//constructor does all | | if(status) exit(1); //non-zero status means there were script errors | | int* dataMap=myobject.getEmcMap(); // get list of detector cells | | int nchannel=myobject.getEmcSize(); // get size of data arrays | | float* myHighGain=myobject.getEmcHG();//access to EMCal HighGain pre-post | |// the same for getEmcLG, getEmcTAC. | |_____________________________________________________________________________| | Boolean 'false' as a 2-nd parameter to constructor means that data from FEM | | 6x32=192 instead of 6x24=144. It means that you will get data not from | | towers only, but also from channels that are connected to different ASIC | | bias voltage levels. If you care about tower signals only, use 'true' | | instead of 'false' | |_____________________________________________________________________________| | 3-d parameter in the constructor determins if in addition to amplitudes | | you would like to get array with just raw data: tac, hipost,lopost, hipre, | | lopre. If you set 'true' then get pointer to 2D raw data aray[5][datasize] | | using float** EmcDynamicData::getEmcRaw() | |_____________________________________________________________________________| | Last parameter in the constructor determins data mapping style. 'True" | | means that DataMap array will store absolute FEM addresses: | | address=absFEM*192+ch, where absFEM - FEM# (0-171), ch -channel# (0-191). | |'False' means EMCal towers mapping style: address=tower# (0-24767). | |_____________________________________________________________________________| | Slang in this program: | | abs position-means position in the EMCal detector. For towers it is 0-24767,| | for FEM or reference - this is a position of the supermodule (12x12 | | towers) in EMCal : 0-171. EMCal is treated as 8 sectors, PbSc1, ...,PbSc6, | | PgGl1,PbGl2. In this program names of corresponding sectors are: W0,W1,W2, | | W3,E2,E3,E0,E1. Reason - Edouard asked to push PbGl as far as possible :) | =============================================================================
Definition at line 138 of file EmcDynamicData.h.
Public Member Functions | |
EmcDynamicData (int &status, char *fileName, bool GetRaw=false, bool Asic24ch=true, bool EmcMapStyle=true) | |
Class constructor: parses configuration file and creates all arrays for data and addresses storage. | |
EmcDynamicData (int &status, emcConfigurationFile &configFile, bool GetRaw=false, bool Asic24ch=true, bool EmcMapStyle=true) | |
Same as above, but input is an object (already filled) instead of a filename. | |
void | ParseConfigurationFile (int &status, emcConfigurationFile &configFile, bool GetRaw=false, bool Asic24ch=true, bool EmcMapStyle=true) |
Leading routine for parsing of configuration file. | |
const SuperModule * | getSmMap () |
Returns pointer to an array of SuperModule structures. | |
bool | getMapStyle () |
Returns mapping style: true means EMCal style (towers number),. | |
bool | getASICStyle () |
Returns output style: true means only those channels that are connected to towers are readout, false means that all 32 channels of each ASIC board will be readout. | |
int | getnSM () |
Returns number of SuperModules. | |
const SuperModule * | getSMMap () |
Returns pointer to FEM configuration MAP. | |
int * | getEmcMap () |
Returns pointer to Data map. | |
float * | getEmcHG () |
Returns pointer to High Gain EMCal data. | |
float * | getEmcLG () |
Returns pointer to Low Gain EMCal data. | |
float * | getEmcTAC () |
Returns pointer to EMCal Timing data. | |
int | getEmcSize () |
Returns data arrays size. | |
float ** | getEmcRaw () |
Gives pointer to raw data structure array. If GetRaw=false then returns NULL. | |
EmcData * | getEmcData () |
Returns EmcData structure that contains all pointers to data arrays. | |
const Reference * | getRefMap () |
Returns pointer to array of Reference structures. | |
int | getRefSize () |
Returns the size of Reference structures array. | |
float * | getRefHG () |
Returns pointer to references High Gain data. | |
float * | getRefLG () |
Returns pointer to references Low Gain data. | |
float * | getRefTAC () |
Returns pointer to references Timing data. | |
float ** | getRefRaw () |
Returns pointer to references raw data. | |
EmcData * | getRefData () |
Returns references data structure that contains all pointers to references data arrays. | |
virtual | ~EmcDynamicData () |
Destructor frees all memory allocated for data and addresses. | |
Static Public Member Functions | |
static void | MBCleanStr (char *String) |
static int | MBControl (char *String, char *&RestString) |
static int | MBControl (char *String, char *&RestString, const char **names, int n) |
static char * | strupr (char *s) |
Converts string to upper register. | |
Protected Member Functions | |
virtual int | FindSector (char *String) |
virtual int | ParseFEM (char *String) |
virtual int | ParseCHAN (char *String) |
virtual int | ParseREF (char *String) |
virtual int | ParseDELAY (char *String) |
virtual int | ParseDATA (char *String) |
virtual int | ParseMAP (char *String) |
virtual void | setSMad () |
virtual void | setREFtoSM () |
Static Protected Member Functions | |
static int | cmpSM (const void *s1, const void *s2) |
static int | cmpRef (const void *r1, const void *r2) |
static int | cmpCh (const void *c1, const void *c2) |
Protected Attributes | |
int | line |
char * | fLine |
EmcData | Data |
EmcData | Refs |
int * | DataMap |
Reference * | refMap |
bool | Style |
bool | outputRaw |
bool | channelMap |
int | curSM |
SuperModule * | smMap |
int | nSM |
int | Position |
int | Sector |
int | tacDelay |
int | postDelay |
Static Protected Attributes | |
static bool | FEMchErr = false |
static int | ScriptErrors = 0 |
|
Class constructor: parses configuration file and creates all arrays for data and addresses storage. int& status - gives result of object creation. status!=0 means there were error(s) found in configuration file. char* fileName - name of a configuration file. bool GetRaw - if true array for raw data storage is created and you can get a pointer to this data. bool Asic24ch - if true only FEM channels connected to EMC towers will be read out (24 for each ASIC card), if false all FEM channels (32 for each ASIC card) will be read out. Default is true. bool EmcMapStyle - if true the data map address corresponds to PHENIX tower numeration schematic, if false then it is FEM channel number. Definition at line 694 of file EmcDynamicData.C. References emcConfigurationFile::IsValid(). |
|
Same as above, but input is an object (already filled) instead of a filename.
Definition at line 708 of file EmcDynamicData.C. References emcConfigurationFile::IsValid(), and ParseConfigurationFile(). |
|
Destructor frees all memory allocated for data and addresses.
Definition at line 1008 of file EmcDynamicData.C. References Data, DataMap, EmcData::hg, EmcData::lg, Refs, smMap, and EmcData::tac. |
|
Definition at line 192 of file EmcDynamicData.C. References FEMchErr, and ScriptErrors. |
|
Definition at line 171 of file EmcDynamicData.C. References Reference::absPosition, ScriptErrors, and Reference::type. |
|
Definition at line 159 of file EmcDynamicData.C. References SuperModule::absPosition, SuperModule::femPin, and ScriptErrors. |
|
Definition at line 269 of file EmcDynamicData.C. References sectors. Referenced by ParseFEM(), and ParseREF(). |
|
Returns output style: true means only those channels that are connected to towers are readout, false means that all 32 channels of each ASIC board will be readout.
Definition at line 231 of file EmcDynamicData.h. References Style. |
|
Returns EmcData structure that contains all pointers to data arrays.
Definition at line 249 of file EmcDynamicData.h. References Data. |
|
Returns pointer to High Gain EMCal data.
Definition at line 239 of file EmcDynamicData.h. References Data, and EmcData::hg. Referenced by EMCalFEE::processEvent(). |
|
Returns pointer to Low Gain EMCal data.
Definition at line 241 of file EmcDynamicData.h. References Data, and EmcData::lg. Referenced by EMCalFEE::processEvent(). |
|
Returns pointer to Data map.
Definition at line 237 of file EmcDynamicData.h. References DataMap. Referenced by mEmcCalibratorModule::Config(), mEmcToolsModule::EmcGetDataMap(), and emcRawDataAccessor::GetRawDataObject(). |
|
Gives pointer to raw data structure array. If GetRaw=false then returns NULL.
Definition at line 247 of file EmcDynamicData.h. References Data, and EmcData::rawdata. Referenced by emcRawDataAccessor::GetRawDataObject(), and EMCalFEE::processEvent(). |
|
Returns data arrays size.
Definition at line 245 of file EmcDynamicData.h. References Data, and EmcData::size. Referenced by mEmcCalibratorModule::Config(), EMCalFEE::EMCalFEE(), mEmcToolsModule::EmcGetDataMap(), and emcRawDataAccessor::GetRawDataObject(). |
|
Returns pointer to EMCal Timing data.
Definition at line 243 of file EmcDynamicData.h. References Data, and EmcData::tac. Referenced by EMCalFEE::processEvent(). |
|
Returns mapping style: true means EMCal style (towers number),.
Definition at line 227 of file EmcDynamicData.h. References channelMap. Referenced by mEmcToolsModule::EmcGetDataMap(), emcRawDataCalibratorV2::SelectSource(), emcRawDataCalibratorV1::SelectSource(), and emcRawDataCalibrator::SelectSource(). |
|
Returns number of SuperModules.
Definition at line 233 of file EmcDynamicData.h. References nSM. Referenced by EMCalFEE::EMCalFEE(), emcDataFormatter::fillRDO(), and EMCalFEE::processEvent(). |
|
Returns references data structure that contains all pointers to references data arrays.
Definition at line 264 of file EmcDynamicData.h. References Refs. |
|
Returns pointer to references High Gain data.
Definition at line 256 of file EmcDynamicData.h. References EmcData::hg, and Refs. |
|
Returns pointer to references Low Gain data.
Definition at line 258 of file EmcDynamicData.h. References EmcData::lg, and Refs. |
|
Returns pointer to array of Reference structures.
Definition at line 252 of file EmcDynamicData.h. References refMap. |
|
Returns pointer to references raw data.
Definition at line 262 of file EmcDynamicData.h. References EmcData::rawdata, and Refs. Referenced by EMCalFEE::processEvent(). |
|
Returns the size of Reference structures array.
Definition at line 254 of file EmcDynamicData.h. References Refs, and EmcData::size. Referenced by EMCalFEE::EMCalFEE(). |
|
Returns pointer to references Timing data.
Definition at line 260 of file EmcDynamicData.h. References Refs, and EmcData::tac. |
|
Returns pointer to FEM configuration MAP.
Definition at line 235 of file EmcDynamicData.h. References smMap. Referenced by emcDataFormatter::fillRDO(). |
|
Returns pointer to an array of SuperModule structures.
Definition at line 224 of file EmcDynamicData.h. References smMap. Referenced by EMCalFEE::processEvent(). |
|
Definition at line 219 of file EmcDynamicData.C. References strupr(). Referenced by ParseConfigurationFile(). |
|
Definition at line 251 of file EmcDynamicData.C. |
|
Definition at line 235 of file EmcDynamicData.C. References dev. Referenced by ParseConfigurationFile(). |
|
Definition at line 440 of file EmcDynamicData.C. Referenced by ParseConfigurationFile(). |
|
Leading routine for parsing of configuration file.
Definition at line 722 of file EmcDynamicData.C. References CHAN, channelMap, curSM, DATA, Data, DataMap, DELAY, FEM, FEMchErr, fLine, emcConfigurationFile::GetLine(), EmcData::hg, EmcData::lg, line, MAP, MBCleanStr(), MBControl(), nSM, outputRaw, ParseCHAN(), ParseDATA(), ParseDELAY(), ParseFEM(), ParseMAP(), ParseREF(), EmcData::rawdata, REF, refMap, Refs, emcConfigurationFile::Rewind(), ScriptErrors, EmcData::size, smMap, Style, and EmcData::tac. Referenced by EmcDynamicData(). |
|
Definition at line 331 of file EmcDynamicData.C. References DATAkeywords, fLine, line, ScriptErrors, and Style. Referenced by ParseConfigurationFile(). |
|
Definition at line 279 of file EmcDynamicData.C. References curSM, DELAYkeywords, fLine, line, SuperModule::post_pre, postDelay, ScriptErrors, smMap, SuperModule::tac_pre, and tacDelay. Referenced by ParseConfigurationFile(). |
|
Definition at line 344 of file EmcDynamicData.C. References SuperModule::absPosition, SuperModule::adRef, curSM, EMCcode, SuperModule::femCh, FEMkeywords, SuperModule::femPin, FindSector(), fLine, line, SuperModule::nch, SuperModule::nref, SuperModule::nrefCh, nSM, SuperModule::packet, Position, SuperModule::post_pre, postDelay, SuperModule::refCh, ScriptErrors, SectorFEM, smMap, SuperModule::startRad, SuperModule::startTad, SuperModule::tac_pre, and tacDelay. Referenced by ParseConfigurationFile(). |
|
Definition at line 318 of file EmcDynamicData.C. References channelMap, fLine, line, MAPkeywords, and ScriptErrors. Referenced by ParseConfigurationFile(). |
|
Definition at line 602 of file EmcDynamicData.C. References Reference::absFEM, SuperModule::absPosition, Reference::absPosition, Reference::chan, curSM, FindSector(), fLine, line, SuperModule::nrefCh, Reference::nSMch, SuperModule::refCh, REFkeywords, refMap, Refs, ScriptErrors, SectorFEM, EmcData::size, smMap, Reference::startSMad, Style, and Reference::type. Referenced by ParseConfigurationFile(). |
|
Definition at line 964 of file EmcDynamicData.C. References SuperModule::adRef, r, refMap, Refs, EmcData::size, smMap, Reference::startSMad, and SuperModule::startTad. |
|
Definition at line 952 of file EmcDynamicData.C. References SuperModule::nch, SuperModule::nrefCh, smMap, and SuperModule::startRad. |
|
Converts string to upper register.
Definition at line 207 of file EmcDynamicData.C. Referenced by MBCleanStr(). |
|
Definition at line 153 of file EmcDynamicData.h. Referenced by getMapStyle(), ParseConfigurationFile(), and ParseMAP(). |
|
Definition at line 155 of file EmcDynamicData.h. Referenced by ParseConfigurationFile(), ParseDELAY(), ParseFEM(), and ParseREF(). |
|
Definition at line 143 of file EmcDynamicData.h. Referenced by getEmcData(), getEmcHG(), getEmcLG(), getEmcRaw(), getEmcSize(), getEmcTAC(), ParseConfigurationFile(), and ~EmcDynamicData(). |
|
Definition at line 145 of file EmcDynamicData.h. Referenced by getEmcMap(), ParseConfigurationFile(), and ~EmcDynamicData(). |
|
Definition at line 154 of file EmcDynamicData.h. Referenced by cmpCh(), and ParseConfigurationFile(). |
|
Definition at line 142 of file EmcDynamicData.h. Referenced by ParseConfigurationFile(), ParseDATA(), ParseDELAY(), ParseFEM(), ParseMAP(), and ParseREF(). |
|
Definition at line 141 of file EmcDynamicData.h. Referenced by ParseConfigurationFile(), ParseDATA(), ParseDELAY(), ParseFEM(), ParseMAP(), and ParseREF(). |
|
Definition at line 158 of file EmcDynamicData.h. Referenced by getnSM(), ParseConfigurationFile(), and ParseFEM(). |
|
Definition at line 152 of file EmcDynamicData.h. Referenced by ParseConfigurationFile(). |
|
Definition at line 160 of file EmcDynamicData.h. Referenced by ParseFEM(). |
|
Definition at line 166 of file EmcDynamicData.h. Referenced by ParseDELAY(), and ParseFEM(). |
|
Definition at line 146 of file EmcDynamicData.h. Referenced by getRefMap(), ParseConfigurationFile(), ParseREF(), and setREFtoSM(). |
|
Definition at line 144 of file EmcDynamicData.h. Referenced by getRefData(), getRefHG(), getRefLG(), getRefRaw(), getRefSize(), getRefTAC(), ParseConfigurationFile(), ParseREF(), setREFtoSM(), and ~EmcDynamicData(). |
|
Definition at line 169 of file EmcDynamicData.h. Referenced by cmpCh(), cmpRef(), cmpSM(), ParseConfigurationFile(), ParseDATA(), ParseDELAY(), ParseFEM(), ParseMAP(), and ParseREF(). |
|
Definition at line 161 of file EmcDynamicData.h. |
|
Definition at line 157 of file EmcDynamicData.h. Referenced by getSMMap(), getSmMap(), ParseConfigurationFile(), ParseDELAY(), ParseFEM(), ParseREF(), setREFtoSM(), setSMad(), and ~EmcDynamicData(). |
|
Definition at line 148 of file EmcDynamicData.h. Referenced by getASICStyle(), ParseConfigurationFile(), ParseDATA(), and ParseREF(). |
|
Definition at line 165 of file EmcDynamicData.h. Referenced by ParseDELAY(), and ParseFEM(). |