SetName(namst.Data());
SetTitle(namst.Data());
Reset();
- for(Int_t i=0; i<48; i++){
+ int const kNModules = 10;
+ int const kNChannels = 48;
+ int const kNScChannels = 32;
+ for(Int_t i=0; i<kNModules; i++){
+ for(Int_t j=0; j<3; j++) fModuleMap[i][j] = 0;
+ }
+ for(Int_t i=0; i<kNChannels; i++){
fADCModule[i] = -1;
fADCChannel[i] = -1;
fDetector[i] = -1;
fSector[i] = -1;
}
- for(Int_t i=0; i<32; i++){
+ for(Int_t i=0; i<kNScChannels; i++){
fScalerChannel[i] = -1;
fScDetector[i] = -1;
fScSector[i] = -1;
SetName(calibda.GetName());
SetTitle(calibda.GetName());
Reset();
- for(int t=0; t<48; t++){
+ int const kNModules = 10;
+ int const kNChannels = 48;
+ int const kNScChannels = 32;
+ for(Int_t i=0; i<kNModules; i++){
+ for(Int_t j=0; j<3; j++) fModuleMap[i][j] = calibda.GetModuleMap(i,j);
+ }
+ for(int t=0; t<kNChannels; t++){
fADCModule[t] = calibda.GetADCModule(t);
fADCChannel[t] = calibda.GetADCChannel(t);
fDetector[t] = calibda.GetDetector(t);
fSector[t] = calibda.GetSector(t);
- if(t<32){
+ if(t<kNScChannels){
fScalerChannel[t] = calibda.GetScChannel(t);
fScDetector[t] = calibda.GetScDetector(t);
fScSector[t] = calibda.GetScSector(t);
SetName(calibda.GetName());
SetTitle(calibda.GetName());
Reset();
- for(int t=0; t<48; t++){
+ int const kNModules = 10;
+ int const kNChannels = 48;
+ int const kNScChannels = 32;
+ for(Int_t i=0; i<kNModules; i++){
+ for(Int_t j=0; j<3; j++) fModuleMap[i][j] = calibda.GetModuleMap(i,j);
+ }
+ for(int t=0; t<kNChannels; t++){
fADCModule[t] = calibda.GetADCModule(t);
fADCChannel[t] = calibda.GetADCChannel(t);
fDetector[t] = calibda.GetDetector(t);
fSector[t] = calibda.GetSector(t);
- if(t<32){
+ if(t<kNScChannels){
fScalerChannel[t] = calibda.GetScChannel(t);
fScDetector[t] = calibda.GetScDetector(t);
fScSector[t] = calibda.GetScSector(t);
{
// Printing of calibration object
printf("\n\n\t ******************* AliZDCChMap object *******************\n\n");
+ for(Int_t i=0; i<9; i++){
+ printf(" ******** GEO %d mod. type %d #ch. %d\n",
+ fModuleMap[i][0],fModuleMap[i][1],fModuleMap[i][2]);
+ }
for(Int_t i=0; i<48; i++)
printf(" ADC - mod. %d ch. %d -> detector %d sector %d\n",
fADCModule[i], fADCChannel[i],fDetector[i], fSector[i]);
void Reset();
virtual void Print(Option_t *) const;
//
+ Int_t* GetModuleMap() const {return (int*)fModuleMap;}
+ Int_t GetModuleMap(Int_t iModType, Int_t iMapEntry) const {return fModuleMap[iModType][iMapEntry];}
+ //
Int_t GetADCModule(Int_t i) const {return fADCModule[i];}
Int_t GetADCChannel(Int_t i) const {return fADCChannel[i];}
Int_t GetDetector(Int_t i) const {return fDetector[i];}
Int_t GetScChannel(Int_t i) const {return fScalerChannel[i];}
Int_t GetScDetector(Int_t i) const {return fScDetector[i];}
Int_t GetScSector(Int_t i) const {return fScSector[i];}
-
+
+ void SetModuleMap(Int_t iEntry, Int_t iGeoAdd, Int_t iModType, Int_t iNCh)
+ {fModuleMap[iEntry][0] = iGeoAdd;
+ fModuleMap[iEntry][1] = iModType;
+ fModuleMap[iEntry][2] = iNCh;}
+
void SetADCModule(Int_t i, Int_t mod) {fADCModule[i] = mod;}
void SetADCChannel(Int_t i, Int_t ich) {fADCChannel[i] = ich;}
void SetDetector(Int_t i, Int_t ival) {fDetector[i] = ival;}
void SetScSector(Int_t i, Int_t ival) {fScSector[i] = ival;}
protected:
+ Int_t fModuleMap[10][3]; // 10 module maps: GEO, mod. type, no. ch.
// ************ ADC ************
// 22 signal ch. + 2 reference ch.
// in-time + out-of-time signals
Int_t fScDetector[32]; // detector
Int_t fScSector[32]; // sector
- ClassDef(AliZDCChMap,2) // ZDC pedestal calibration data
+ ClassDef(AliZDCChMap,3) // ZDC pedestal calibration data
};
#endif
//______________________________________________________________________________________________
UInt_t AliZDCPreprocessor::ProcessChMap()
{
- const int kNch=48, kNScch=32;
+ const int kNModules=10, kNch=48, kNScch=32;
// Reading the file for mapping from FXS
TList* daqSource = GetFileSources(kDAQ, "MAPPING");
TIter iter(daqSource);
TObjString* source = 0;
Int_t isou = 0;
- Int_t readMap[kNch][6];
+ Int_t modMap[kNModules][3], adcMap[kNch][6], scMap[kNScch][6];
//
while((source = dynamic_cast<TObjString*> (iter.Next()))){
TString fileName = GetFile(kDAQ, "MAPPING", source->GetName());
}
Log(Form("File %s connected to process data for ADC mapping", fileName.Data()));
//
- for(Int_t j=0; j<kNch; j++){
+ for(Int_t j=0; j<kNModules; j++){
+ for(Int_t k=0; k<3; k++){
+ int read = fscanf(file,"%d",&modMap[j][k]);
+ if(read == 0) AliDebug(3," Failing in reading data from mapping file");
+ }
+ }
+ for(Int_t j=kNModules; j<kNModules+kNch; j++){
+ for(Int_t k=0; k<6; k++){
+ int read = fscanf(file,"%d",&adcMap[j-kNModules][k]);
+ if(read == 0) AliDebug(3," Failing in reading data from mapping file");
+ }
+ }
+ for(Int_t j=kNModules+kNch; j<kNModules+kNch+kNScch; j++){
for(Int_t k=0; k<6; k++){
- int read = fscanf(file,"%d",&readMap[j][k]);
+ int read = fscanf(file,"%d",&scMap[j-kNModules-kNch][k]);
if(read == 0) AliDebug(3," Failing in reading data from mapping file");
}
}
// Store the currently read map ONLY IF it is different
// from the entry in the OCDB
+ Bool_t adcMapUpdated=kFALSE, scMapUpdated=kFALSE;
Bool_t updateOCDB = kFALSE;
AliCDBEntry *cdbEntry = GetFromOCDB("Calib","ChMap");
else{
AliZDCChMap *chMap = (AliZDCChMap*) cdbEntry->GetObject();
for(Int_t i=0; i<kNch; i++){
- if( (readMap[i][1] == chMap->GetADCModule(i))
- && (readMap[i][2] == chMap->GetADCChannel(i))
- && (readMap[i][4] == chMap->GetDetector(i))
- && (readMap[i][5] == chMap->GetSector(i))){
- updateOCDB = kFALSE;
+ if( (adcMap[i][1] == chMap->GetADCModule(i))
+ && (adcMap[i][2] == chMap->GetADCChannel(i))
+ && (adcMap[i][4] == chMap->GetDetector(i))
+ && (adcMap[i][5] == chMap->GetSector(i))){
+ adcMapUpdated = kFALSE;
}
- else updateOCDB = kTRUE;
+ else adcMapUpdated = kTRUE;
+ }
+ for(Int_t i=0; i<kNScch; i++){
+ if( (scMap[i][2] == chMap->GetScChannel(i))
+ && (scMap[i][4] == chMap->GetScDetector(i))
+ && (scMap[i][5] == chMap->GetScSector(i))){
+ scMapUpdated = kFALSE;
+ }
+ else scMapUpdated = kTRUE;
}
}
+ if(adcMapUpdated || scMapUpdated) updateOCDB = kTRUE;
//
Bool_t resChMapStore = kTRUE;
if(updateOCDB==kTRUE){
// --- Initializing mapping calibration object
AliZDCChMap *mapCalib = new AliZDCChMap("ZDC");
// Writing channel map in the OCDB
+ for(Int_t k=0; k<kNModules; k++){
+ mapCalib->SetModuleMap(k, modMap[k][0], modMap[k][1], modMap[k][2]);
+ }
for(Int_t k=0; k<kNch; k++){
- mapCalib->SetADCModule(k,readMap[k][1]);
- mapCalib->SetADCChannel(k,readMap[k][2]);
- mapCalib->SetDetector(k,readMap[k][4]);
- mapCalib->SetSector(k,readMap[k][5]);
- // TEMPORARY!!!! Until no mapping from scaler is provided!!!!!!!
- if(k<kNScch){
- mapCalib->SetScChannel(k, 0);
- mapCalib->SetScDetector(k, 0);
- mapCalib->SetScSector(k, 0);
- }
+ mapCalib->SetADCModule(k,adcMap[k][1]);
+ mapCalib->SetADCChannel(k,adcMap[k][2]);
+ mapCalib->SetDetector(k,adcMap[k][4]);
+ mapCalib->SetSector(k,adcMap[k][5]);
}
+ for(Int_t k=0; k<kNScch; k++){
+ mapCalib->SetScChannel(k, scMap[k][0]);
+ mapCalib->SetScDetector(k, scMap[k][1]);
+ mapCalib->SetScSector(k, scMap[k][2]);
+ }
+ //
mapCalib->Print("");
//
AliCDBMetaData metaData;
metaData.SetBeamPeriod(0);
- //metaData.SetResponsible("Chiara Oppedisano");
+ metaData.SetResponsible("Chiara Oppedisano");
metaData.SetComment("Filling AliZDCChMap object");
//
resChMapStore = Store("Calib","ChMap",mapCalib, &metaData, 0, kTRUE);
fCurrScCh(-1),
fIsADCEventGood(kTRUE),
fIsL0BitSet(kTRUE),
- fIsPileUpEvent(kFALSE)
+ fIsPileUpEvent(kFALSE),
+ fIsZDCTDCHeader(kFALSE),
+ fIsTDCHeaderRead(kFALSE),
+ fTDCStartCounter(0),
+ fIsADDChannel(kFALSE),
+ fIsADDTDCHeader(kFALSE),
+ fIsADDTDCdatum(kFALSE)
{
// Create an object to read ZDC raw digits
fRawReader->Reset();
fCurrScCh(stream.fCurrScCh),
fIsADCEventGood(stream.fIsADCEventGood),
fIsL0BitSet(stream.fIsL0BitSet),
- fIsPileUpEvent(stream.fIsPileUpEvent)
+ fIsPileUpEvent(stream.fIsPileUpEvent),
+ fIsZDCTDCHeader(stream.fIsZDCTDCHeader),
+ fIsTDCHeaderRead(stream.fIsTDCHeaderRead),
+ fTDCStartCounter(stream.fTDCStartCounter),
+ fIsADDChannel(stream.fIsADDChannel),
+ fIsADDTDCHeader(stream.fIsADDTDCHeader),
+ fIsADDTDCdatum(stream.fIsADDTDCdatum)
{
// Copy constructor
if((message & 0x08) == 0){ // ** DARC card
fReadOutCard = 0;
fIsDARCHeader = kTRUE;
- AliInfo("\t ZDC readout card used: DARC");
+ //AliInfo("\t ZDC readout card used: DARC");
}
else if((message & 0x08) == 0x08){ // ** ZRC card
fReadOutCard = 1;
- AliInfo("\t ZDC readout card used: ZRC");
+ //AliInfo("\t ZDC readout card used: ZRC");
}
if(header->GetL1TriggerMessage() & 0x1){ // Calibration bit set in CDH
UInt_t status = header->GetStatus();
//printf("\t AliZDCRawStream::ReadCDHHeader -> status = %d\n",status);
- if((status & 0x000f) == 0x0001){
+/* if((status & 0x000f) == 0x0001){
AliDebug(2,"CDH -> DARC trg0 overlap error");
fRawReader->AddMajorErrorLog(kDARCError);
}
AliDebug(2,"CDH -> DARC other error");
fRawReader->AddMajorErrorLog(kDARCError);
}
+ */
}
}
if(!fRawReader->ReadNextInt((UInt_t&) fBuffer)) return kFALSE;
const int kNch = 48;
- Int_t kFirstADCGeo=0, kLastADCGeo=3, kAddADCGeo=4;
- Int_t kScalerGeo=8, kPUGeo=29, kTrigScales=30, kTrigHistory=31;
+ Int_t kFirstADCGeo=0, kLastADCGeo=3;
+ Int_t kADDADCGeo=5, kADDTDCGeo=6;
+ Int_t kZDCTDCGeo=8, kScalerGeo=16;
+ Int_t kPUGeo=29, kTrigScales=30, kTrigHistory=31;
+ //
fIsHeaderMapping = kFALSE; fIsChMapping = kFALSE;
fIsADCHeader = kFALSE; fIsADCDataWord = kFALSE; fIsADCEOB = kFALSE;
+ fIsADDChannel = kFALSE; fIsADDTDCHeader= kFALSE; fIsADDTDCdatum=kFALSE;
fIsUnderflow = kFALSE; fIsOverflow = kFALSE; fIsScalerWord = kFALSE;
fSector[0] = fSector[1] = -1;
-// fTrigCountNWords = 9; fTrigHistNWords = 2;
for(Int_t kl=0; kl<4; kl++) fCPTInput[kl] = 0;
fEvType = fRawReader->GetType();
}
// Get geo address of current word
- // - ADC GEO = 0, 1, 2, 3
- // - VME scaler GEO = 8
- // - PU GEO = 29
- // - Trigger card scales GEO = 30
- // - Trigger card history GEO = 31
fADCModule = (Int_t) ((fBuffer & 0xf8000000)>>27);
+ if(fIsTDCHeaderRead)fADCModule = kZDCTDCGeo;
// ************************************ ADC MODULES ************************************
if(fADCModule>=kFirstADCGeo && fADCModule<=kLastADCGeo){
}
}//ADC module
// ********************************* ADD ADC *********************************
- else if(fADCModule == kAddADCGeo){
+ else if(fADCModule == kADDADCGeo){
// *** ADC header
if((fBuffer & 0x07000000) == 0x02000000){
fIsADCHeader = kTRUE;
fADCNChannels = ((fBuffer & 0x00003f00)>>8);
- //printf(" AliZDCRawStream -> ADC HEADER: mod.%d has %d ch. \n",fADCModule,fADCNChannels);
+ //printf(" AliZDCRawStream -> ADD ADC HEADER: mod.%d has %d ch. \n",fADCModule,fADCNChannels);
}
// *** ADC data word
else if((fBuffer & 0x07000000) == 0x00000000){
//printf(" ADD ADC DATUM -> mod. %d ch. %d gain %d value %d\n",
// fADCModule,fADCChannel,fADCGain,fADCValue);
}
+ // *** ADC EOB
+ else if((fBuffer & 0x07000000) == 0x04000000){
+ fIsADCEOB = kTRUE;
+ //printf(" AliZDCRawStream -> EOB --------------------------\n");
+ }
}
+ // ********************************* ZDC TDC *********************************
+ else if(fADCModule==kZDCTDCGeo && fIsTDCHeaderRead==kFALSE){
+ fIsZDCTDCHeader = kTRUE;
+ fIsTDCHeaderRead = kTRUE;
+ fTDCStartCounter = fPosition;
+ //Ch. debug
+ //printf(" AliZDCRawStream -> ZDC TDC: mod.%d\n",fADCModule);
+ }
+ // ********************************* ADD TDC *********************************
+ else if(fADCModule == kADDTDCGeo){
+ // *** TDC header
+ if((fBuffer & 0x07000000) == 0x02000000){
+ fIsADDTDCHeader = kTRUE;
+ fADCNChannels = ((fBuffer & 0x00003f00)>>8);
+ //printf(" AliZDCRawStream -> ADD TDC: mod.%d has %d ch. \n",fADCModule,fADCNChannels);
+ }
+ // *** TDC word
+ else if((fBuffer & 0x07000000) == 0x00000000){
+ fIsADDTDCdatum = kTRUE;
+ }
+ // *** TDC EOB
+ if((fBuffer & 0x07000000) == 0x04000000){
+ fIsADCEOB = kTRUE;
+ //printf(" AliZDCRawStream -> ADD TDC EOB\n");
+ }
+ }
// ********************************* VME SCALER HEADER *********************************
else if(fADCModule == kScalerGeo){
if(fBuffer & 0x04000000 && fIsScHeaderRead==kFALSE){ // *** Scaler header
//Ch. debug
//printf(" AliZDCRawStream -> scaler datum %d", fScEvCounter);
}
+ // ********************************** ZDC TDC DATA **********************************
+ // ZDC TDC data
+ if(fIsTDCHeaderRead && fPosition>=fTDCStartCounter+1){
+ fIsADCDataWord=kFALSE; fIsScalerWord=kFALSE;
+ //printf(" AliZDCRawStream -> ...skipping ZDC TDC datum\n");
+ // For the moment we skip the TDC data
+ if(((fBuffer & 0xf0000000) == 0x80000000) && ((fBuffer & 0x08000000) >> 27) == 0){
+ fIsTDCHeaderRead = kFALSE;
+ // Ch. debug
+ //printf(" AliZDCRawStream -> ZDC TDC trailer\n");
+ }
+ }
// ******************************** TRIGGER SCALER DATA ********************************
// Reading trigger scaler data
if(fIsTriggerScaler && fPosition>=fTrigCountStart+1){
public :
// Module type codes
- enum{kV965=1, kV830=2, kTRG=3, kTRGI=4, kPU=5};
+ enum{kV965=1, kV830=2, kTRG=3, kTRGI=4, kPU=5, KV1290=6, kV775N=7};
// Signal codes for ZDC
// Same codes used in DAQ configuration file
// To be changed ONLY IF this file is changed!!!
// **** DO NOT CHANGE THE FOLLOWING LINES!!! ****
- enum ZDCSignal{kNotConnected=0, kVoid=1,
+ enum ZDCSignal{
+ kNotConnected=0, kVoid=1,
kZNAC=2, kZNA1=3, kZNA2=4, kZNA3=5, kZNA4=6,
kZPAC=7, kZPA1=8, kZPA2=9, kZPA3=10, kZPA4=11,
kZNCC=12, kZNC1=13, kZNC2=14, kZNC3=15, kZNC4=16,
kZEM1D=81, kZEM2D=82,
kZDCAMonD=83, kZDCCMonD=84,
kZNAD=85, kZPAD=86, kZNCD=87, kZPCD=88, kZEMD=89,
- kZNA0D=90, kZPA0D=91, kZNC0D=92, kZPC0D=93, k1kHzD=94,
- kGate=95, kAD=96, kCD=97, kAorCD=98, kAandCD=99,
- kZEMORD=100, kAorCorZEMORD=101, kAorCorZEMD=102, kADD0=103, kADD1=104,
- kADD2=105, kADD3=106, kLogical17=107, kLogical18=108, kLogical19=109,
- kLogical20=110, kLogical21=111, kLogical22=112, kLogical23=113, kLogical24=114,
- kLogical25=115, kLogical26=116, kLogical27=117, kLogical28=118, kLogical29=119,
- kLogical30=120, kLogical31=121};
+ kZNA0D=90, kZPA0D=91, kZNC0D=92, kZPC0D=93, k1kHzD=94, kGate=95, kAD=96, kCD=97,
+ kAorCD=98, kAandCD=99, kZEMORD=100, kAorCorZEMORD=101, kAorCorZEMD=102, kAD0=103, kAD1=104, kAD2=105,
+ kAD3=106, kAD4=107, kAD5=108, kAD6=109, kAD7=110, kAD8=111, kAD9=112, kAD10=113,
+ kAD11=114, kAD12=115, kAD13=116, kAD14=117, kAD15=118, kAD0D=119, kAD1D=120, kAD2D=121,
+ kAD3D=122, kAD4D=123, kAD5D=124, kAD6D=125, kAD7D=126, kAD8D=127, kAD9D=128, kAD10D=129,
+ kAD11D=130, kAD12D=131, kAD13D=132, kAD14D=133, kAD15D=134
+ };
// Error codes in raw data streaming
enum EZDCRawStreamError{
virtual void ReadChMap();
virtual void ReadCDHHeader();
+
+ Bool_t IsZDCTDCHeader() const {return fIsZDCTDCHeader;}
- Bool_t IsAddChannel() const {return fIsADDChannel;}
+ Bool_t IsAddChannel() const {return fIsADDChannel;}
+ Bool_t IsAddTDCdatum() const {return fIsADDTDCdatum;}
UInt_t GetRawBuffer() const {return fBuffer;}
Int_t GetReadOutCard() const {return fReadOutCard;}
Bool_t fIsL0BitSet; // true if L0 bit in history words = 1
Bool_t fIsPileUpEvent; // true if pile up bits in history words = 0
+ // ZDC TDC
+ Bool_t fIsZDCTDCHeader; // true if datum is a ZDC TDC header
+ Bool_t fIsTDCHeaderRead; // true when streaming TDC data
+ Int_t fTDCStartCounter; // counts after TDC header
+
// ADD part
Bool_t fIsADDChannel; // true if datum is an ADD ADC channel
-
- ClassDef(AliZDCRawStream, 17) // class for reading ZDC raw data
+ Bool_t fIsADDTDCHeader; // true if datum is an ADD TDC channel
+ Bool_t fIsADDTDCdatum; // true if datum is an ADD TDC channel
+
+ ClassDef(AliZDCRawStream, 18) // class for reading ZDC raw data
};
#endif
+ 0 1 24
+ 1 1 24
+ 2 1 24
+ 3 1 24
+ 4 1 8
+ 5 6 24
+ 16 2 24
+ 30 3 9
+ 31 4 2
0 0 0 12 1 0
1 0 1 13 1 1
2 0 2 14 1 2
45 3 11 34 5 3
46 3 12 35 5 4
47 3 13 48 4 5
- 0 8 0 71 -1 -1
- 1 8 1 92 -1 -1
- 2 8 2 50 -1 -1
- 3 8 3 94 -1 -1
- 4 8 9 66 -1 -1
- 5 8 12 81 -1 -1
- 6 8 13 82 -1 -1
+ 0 16 0 92 -1 -1
+ 1 16 1 71 1 0
+ 2 16 2 93 -1 -1
+ 3 16 3 76 2 0
+ 4 16 4 90 -1 -1
+ 5 16 5 61 4 0
+ 6 16 6 91 -1 -1
+ 7 16 7 66 5 0
+ 8 16 8 81 3 1
+ 9 16 9 82 3 2
+ 10 16 10 87 -1 -1
+ 11 16 11 88 -1 -1
+ 12 16 12 85 -1 -1
+ 13 16 13 86 -1 -1
+ 14 16 14 94 -1 -1
+ 15 16 15 95 -1 -1
+ 16 16 16 97 -1 -1
+ 17 16 17 96 -1 -1
+ 18 16 18 98 -1 -1
+ 19 16 19 99 -1 -1
+ 20 16 20 100 -1 -1
+ 21 16 21 89 -1 -1
+ 22 16 22 101 -1 -1
+ 23 16 23 102 -1 -1
+ 24 0 0 0 0 0
+ 25 0 0 0 0 0
+ 26 0 0 0 0 0
+ 27 0 0 0 0 0
+ 28 0 0 0 0 0
+ 29 0 0 0 0 0
+ 30 0 0 0 0 0
+ 31 0 0 0 0 0
TVirtualFitter::SetDefaultFitter("Minuit");
int status = 0;
- // No. of ZDC cabled ch.
+ int const kNModules = 10;
int const kNChannels = 24;
int const kNScChannels = 32;
Int_t kFirstADCGeo=0, kLastADCGeo=3;
+
+ Int_t iMod=-1;
+ Int_t modGeo[kNModules], modType[kNModules],modNCh[kNModules];
+ for(Int_t kl=0; kl<kNModules; kl++){
+ modGeo[kl]=modType[kl]=modNCh[kl]=0;
+ }
+
+ Int_t ich=0;
+ Int_t adcMod[2*kNChannels], adcCh[2*kNChannels], sigCode[2*kNChannels];
+ Int_t det[2*kNChannels], sec[2*kNChannels];
+ for(Int_t y=0; y<2*kNChannels; y++){
+ adcMod[y]=adcCh[y]=sigCode[y]=det[y]=sec[y]=0;
+ }
+
+ Int_t iScCh=0;
+ Int_t scMod[kNScChannels], scCh[kNScChannels], scSigCode[kNScChannels];
+ Int_t scDet[kNScChannels], scSec[kNScChannels];
+ for(Int_t y=0; y<kNScChannels; y++){
+ scMod[y]=scCh[y]=scSigCode[y]=scDet[y]=scSec[y]=0;
+ }
/* log start of process */
printf("ZDC EMD program started\n");
/* use event - here, just write event id to result file */
eventT=event->eventType;
- Int_t ich=0;
- Int_t adcMod[2*kNChannels], adcCh[2*kNChannels], sigCode[2*kNChannels];
- Int_t det[2*kNChannels], sec[2*kNChannels];
- for(Int_t y=0; y<2*kNChannels; y++){
- adcMod[y]=adcCh[y]=sigCode[y]=det[y]=sec[y]=0;
- }
-
- Int_t iScCh=0;
- Int_t scMod[kNScChannels], scCh[kNScChannels], scSigCode[kNScChannels];
- Int_t scDet[kNScChannels], scSec[kNScChannels];
- for(Int_t y=0; y<kNScChannels; y++){
- scMod[y]=scCh[y]=scSigCode[y]=scDet[y]=scSec[y]=0;
- }
- //
- Int_t modNum=-1, modType=-1;
-
if(eventT==START_OF_DATA){
-
+
rawStreamZDC->SetSODReading(kTRUE);
// --------------------------------------------------------
else{
while((rawStreamZDC->Next())){
if(rawStreamZDC->IsHeaderMapping()){ // mapping header
- modNum = rawStreamZDC->GetADCModule();
- modType = rawStreamZDC->GetModType();
+ iMod++;
+ modGeo[iMod] = rawStreamZDC->GetADCModule();
+ modType[iMod] = rawStreamZDC->GetModType();
+ modNCh[iMod] = rawStreamZDC->GetADCNChannels();
}
if(rawStreamZDC->IsChMapping()){
- if(modType==1){ // ADC mapping ----------------------
+ if(modType[iMod]==1){ // ADC mapping ----------------------
adcMod[ich] = rawStreamZDC->GetADCModFromMap(ich);
adcCh[ich] = rawStreamZDC->GetADCChFromMap(ich);
sigCode[ich] = rawStreamZDC->GetADCSignFromMap(ich);
det[ich] = rawStreamZDC->GetDetectorFromMap(ich);
sec[ich] = rawStreamZDC->GetTowerFromMap(ich);
- //
- fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
- ich,adcMod[ich],adcCh[ich],sigCode[ich],det[ich],sec[ich]);
- //
- //printf(" Mapping in DA -> %d ADC: mod %d ch %d, code %d det %d, sec %d\n",
- // ich,adcMod[ich],adcCh[ich],sigCode[ich],det[ich],sec[ich]);
- //
ich++;
}
- else if(modType==2){ //VME scaler mapping --------------------
+ else if(modType[iMod]==2){ //VME scaler mapping --------------------
scMod[iScCh] = rawStreamZDC->GetScalerModFromMap(iScCh);
scCh[iScCh] = rawStreamZDC->GetScalerChFromMap(iScCh);
scSigCode[iScCh] = rawStreamZDC->GetScalerSignFromMap(iScCh);
scDet[iScCh] = rawStreamZDC->GetScDetectorFromMap(iScCh);
- scSec[iScCh] = rawStreamZDC->GetScTowerFromMap(iScCh);
- //
- fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
- iScCh,scMod[iScCh],scCh[iScCh],scSigCode[iScCh],scDet[iScCh],scSec[iScCh]);
- //
- //printf(" Mapping in DA -> %d Scaler: mod %d ch %d, code %d det %d, sec %d\n",
- // iScCh,scMod[iScCh],scCh[iScCh],scSigCode[iScCh],scDet[iScCh],scSec[iScCh]);
- //
+ scSec[iScCh] = rawStreamZDC->GetScTowerFromMap(iScCh);
iScCh++;
}
}
+ }
+ // Writing data on output FXS file
+ for(Int_t is=0; is<kNModules; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\n",
+ modGeo[is],modType[is],modNCh[is]);
+ //printf(" CalibMB DA -> Module mapping: geo %d type %d #ch %d\n",
+ // modGeo[is],modType[is],modNCh[is]);
}
+ for(Int_t is=0; is<2*kNChannels; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
+ is,adcMod[is],adcCh[is],sigCode[is],det[is],sec[is]);
+ //printf(" CalibMB DA -> %d ADC: mod %d ch %d, code %d det %d, sec %d\n",
+ // is,adcMod[is],adcCh[is],sigCode[is],det[is],sec[is]);
+ }
+ for(Int_t is=0; is<kNScChannels; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
+ is,scMod[is],scCh[is],scSigCode[is],scDet[is],scSec[is]);
+ //printf(" CalibMB DA -> %d Scaler: mod %d ch %d, code %d det %d, sec %d\n",
+ // is,scMod[is],scCh[is],scSigCode[is],scDet[is],scSec[is]);
+ }
+
}
fclose(mapFile4Shuttle);
}// SOD event
int status = 0;
// No. of ZDC cabled ch.
+ int const kNModules = 10;
int const kNChannels = 24;
int const kNScChannels = 32;
Int_t kFirstADCGeo=0, kLastADCGeo=3;
-
+
+ Int_t iMod=-1;
+ Int_t modGeo[kNModules], modType[kNModules],modNCh[kNModules];
+ for(Int_t kl=0; kl<kNModules; kl++){
+ modGeo[kl]=modType[kl]=modNCh[kl]=0;
+ }
+
Int_t ich=0;
Int_t adcMod[2*kNChannels], adcCh[2*kNChannels], sigCode[2*kNChannels];
Int_t det[2*kNChannels], sec[2*kNChannels];
for(Int_t y=0; y<2*kNChannels; y++){
adcMod[y]=adcCh[y]=sigCode[y]=det[y]=sec[y]=0;
}
+
+ Int_t iScCh=0;
+ Int_t scMod[kNScChannels], scCh[kNScChannels], scSigCode[kNScChannels];
+ Int_t scDet[kNScChannels], scSec[kNScChannels];
+ for(Int_t y=0; y<kNScChannels; y++){
+ scMod[y]=scCh[y]=scSigCode[y]=scDet[y]=scSec[y]=0;
+ }
/* log start of process */
printf("ZDC EMD program started\n");
/* use event - here, just write event id to result file */
eventT=event->eventType;
- Int_t iScCh=0;
- Int_t scMod[kNScChannels], scCh[kNScChannels], scSigCode[kNScChannels];
- Int_t scDet[kNScChannels], scSec[kNScChannels];
- for(Int_t y=0; y<kNScChannels; y++){
- scMod[y]=scCh[y]=scSigCode[y]=scDet[y]=scSec[y]=0;
- }
- //
- Int_t modNum=-1, modType=-1;
-
if(eventT==START_OF_DATA){
-
+
rawStreamZDC->SetSODReading(kTRUE);
// --------------------------------------------------------
else{
while((rawStreamZDC->Next())){
if(rawStreamZDC->IsHeaderMapping()){ // mapping header
- modNum = rawStreamZDC->GetADCModule();
- modType = rawStreamZDC->GetModType();
+ iMod++;
+ modGeo[iMod] = rawStreamZDC->GetADCModule();
+ modType[iMod] = rawStreamZDC->GetModType();
+ modNCh[iMod] = rawStreamZDC->GetADCNChannels();
}
if(rawStreamZDC->IsChMapping()){
- if(modType==1){ // ADC mapping ----------------------
+ if(modType[iMod]==1){ // ADC mapping ----------------------
adcMod[ich] = rawStreamZDC->GetADCModFromMap(ich);
adcCh[ich] = rawStreamZDC->GetADCChFromMap(ich);
sigCode[ich] = rawStreamZDC->GetADCSignFromMap(ich);
det[ich] = rawStreamZDC->GetDetectorFromMap(ich);
sec[ich] = rawStreamZDC->GetTowerFromMap(ich);
- //
- fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
- ich,adcMod[ich],adcCh[ich],sigCode[ich],det[ich],sec[ich]);
- //
- //printf(" Mapping in DA -> %d ADC: mod %d ch %d, code %d det %d, sec %d\n",
- // ich,adcMod[ich],adcCh[ich],sigCode[ich],det[ich],sec[ich]);
- //
ich++;
}
- else if(modType==2){ //VME scaler mapping --------------------
+ else if(modType[iMod]==2){ //VME scaler mapping --------------------
scMod[iScCh] = rawStreamZDC->GetScalerModFromMap(iScCh);
scCh[iScCh] = rawStreamZDC->GetScalerChFromMap(iScCh);
scSigCode[iScCh] = rawStreamZDC->GetScalerSignFromMap(iScCh);
scDet[iScCh] = rawStreamZDC->GetScDetectorFromMap(iScCh);
- scSec[iScCh] = rawStreamZDC->GetScTowerFromMap(iScCh);
- //
- fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
- iScCh,scMod[iScCh],scCh[iScCh],scSigCode[iScCh],scDet[iScCh],scSec[iScCh]);
- //
- //printf(" Mapping in DA -> %d Scaler: mod %d ch %d, code %d det %d, sec %d\n",
- // iScCh,scMod[iScCh],scCh[iScCh],scSigCode[iScCh],scDet[iScCh],scSec[iScCh]);
- //
+ scSec[iScCh] = rawStreamZDC->GetScTowerFromMap(iScCh);
iScCh++;
}
}
+ }
+ // Writing data on output FXS file
+ for(Int_t is=0; is<kNModules; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\n",
+ modGeo[is],modType[is],modNCh[is]);
+ //printf(" EMD DA -> Module mapping: geo %d type %d #ch %d\n",
+ // modGeo[is],modType[is],modNCh[is]);
+ }
+ for(Int_t is=0; is<2*kNChannels; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
+ is,adcMod[is],adcCh[is],sigCode[is],det[is],sec[is]);
+ //printf(" EMD DA -> %d ADC: mod %d ch %d, code %d det %d, sec %d\n",
+ // is,adcMod[is],adcCh[is],sigCode[is],det[is],sec[is]);
}
+ for(Int_t is=0; is<kNScChannels; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
+ is,scMod[is],scCh[is],scSigCode[is],scDet[is],scSec[is]);
+ //printf(" EMD DA -> %d Scaler: mod %d ch %d, code %d det %d, sec %d\n",
+ // is,scMod[is],scCh[is],scSigCode[is],scDet[is],scSec[is]);
+ }
+
}
fclose(mapFile4Shuttle);
}// SOD event
"Minuit", "TMinuitMinimizer(const char *)");
TVirtualFitter::SetDefaultFitter("Minuit");
+
int status = 0;
+ int const kNModules = 10;
int const kNChannels = 24;
int const kNScChannels = 32;
Int_t kFirstADCGeo=0, kLastADCGeo=3;
+
+ Int_t iMod=-1;
+ Int_t modGeo[kNModules], modType[kNModules],modNCh[kNModules];
+ for(Int_t kl=0; kl<kNModules; kl++){
+ modGeo[kl]=modType[kl]=modNCh[kl]=0;
+ }
Int_t ich=0;
Int_t adcMod[2*kNChannels], adcCh[2*kNChannels], sigCode[2*kNChannels];
for(Int_t y=0; y<2*kNChannels; y++){
adcMod[y]=adcCh[y]=sigCode[y]=det[y]=sec[y]=0;
}
+
+ Int_t iScCh=0;
+ Int_t scMod[kNScChannels], scCh[kNScChannels], scSigCode[kNScChannels];
+ Int_t scDet[kNScChannels], scSec[kNScChannels];
+ for(Int_t y=0; y<kNScChannels; y++){
+ scMod[y]=scCh[y]=scSigCode[y]=scDet[y]=scSec[y]=0;
+ }
/* log start of process */
printf("\n ZDC LASER program started\n");
/* use event - here, just write event id to result file */
eventT=event->eventType;
-
- Int_t iScCh=0;
- Int_t scMod[kNScChannels], scCh[kNScChannels], scSigCode[kNScChannels];
- Int_t scDet[kNScChannels], scSec[kNScChannels];
- for(Int_t y=0; y<kNScChannels; y++){
- scMod[y]=scCh[y]=scSigCode[y]=scDet[y]=scSec[y]=0;
- }
- //
- Int_t modNum=-1, modType=-1;
if(eventT==START_OF_DATA){
-
+
+ iMod=-1; ich=0; iScCh=0;
+
rawStreamZDC->SetSODReading(kTRUE);
// --------------------------------------------------------
else{
while((rawStreamZDC->Next())){
if(rawStreamZDC->IsHeaderMapping()){ // mapping header
- modNum = rawStreamZDC->GetADCModule();
- modType = rawStreamZDC->GetModType();
+ iMod++;
+ modGeo[iMod] = rawStreamZDC->GetADCModule();
+ modType[iMod] = rawStreamZDC->GetModType();
+ modNCh[iMod] = rawStreamZDC->GetADCNChannels();
}
if(rawStreamZDC->IsChMapping()){
- if(modType==1){ // ADC mapping ----------------------
+ if(modType[iMod]==1){ // ADC mapping ----------------------
adcMod[ich] = rawStreamZDC->GetADCModFromMap(ich);
adcCh[ich] = rawStreamZDC->GetADCChFromMap(ich);
sigCode[ich] = rawStreamZDC->GetADCSignFromMap(ich);
det[ich] = rawStreamZDC->GetDetectorFromMap(ich);
sec[ich] = rawStreamZDC->GetTowerFromMap(ich);
- //
- fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
- ich,adcMod[ich],adcCh[ich],sigCode[ich],det[ich],sec[ich]);
- //
- //printf(" Mapping in DA -> %d ADC: mod %d ch %d, code %d det %d, sec %d\n",
- // ich,adcMod[ich],adcCh[ich],sigCode[ich],det[ich],sec[ich]);
- //
ich++;
}
- else if(modType==2){ //VME scaler mapping --------------------
+ else if(modType[iMod]==2){ //VME scaler mapping --------------------
scMod[iScCh] = rawStreamZDC->GetScalerModFromMap(iScCh);
scCh[iScCh] = rawStreamZDC->GetScalerChFromMap(iScCh);
scSigCode[iScCh] = rawStreamZDC->GetScalerSignFromMap(iScCh);
scDet[iScCh] = rawStreamZDC->GetScDetectorFromMap(iScCh);
- scSec[iScCh] = rawStreamZDC->GetScTowerFromMap(iScCh);
- //
- fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
- iScCh,scMod[iScCh],scCh[iScCh],scSigCode[iScCh],scDet[iScCh],scSec[iScCh]);
- //
- //printf(" Mapping in DA -> %d Scaler: mod %d ch %d, code %d det %d, sec %d\n",
- // iScCh,scMod[iScCh],scCh[iScCh],scSigCode[iScCh],scDet[iScCh],scSec[iScCh]);
- //
+ scSec[iScCh] = rawStreamZDC->GetScTowerFromMap(iScCh);
iScCh++;
}
}
+ }
+ // Writing data on output FXS file
+ for(Int_t is=0; is<kNModules; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\n",
+ modGeo[is],modType[is],modNCh[is]);
+ //printf(" Laser DA -> Module mapping: geo %d type %d #ch %d\n",
+ // modGeo[is],modType[is],modNCh[is]);
}
+ for(Int_t is=0; is<2*kNChannels; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
+ is,adcMod[is],adcCh[is],sigCode[is],det[is],sec[is]);
+ //printf(" Laser DA -> %d ADC: mod %d ch %d, code %d det %d, sec %d\n",
+ // is,adcMod[is],adcCh[is],sigCode[is],det[is],sec[is]);
+ }
+ for(Int_t is=0; is<kNScChannels; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
+ is,scMod[is],scCh[is],scSigCode[is],scDet[is],scSec[is]);
+ //printf(" Laser DA -> %d Scaler: mod %d ch %d, code %d det %d, sec %d\n",
+ // is,scMod[is],scCh[is],scSigCode[is],scDet[is],scSec[is]);
+ }
+
}
fclose(mapFile4Shuttle);
}// SOD event
monitorDeclareTable(const_cast<char**>(tableSOD));
int status = 0;
+ int const kNModules = 10;
int const kNChannels = 24;
int const kNScChannels = 32;
/* log start of process */
- printf("\nZDC MAPPING program started\n");
+ printf("\n ZDC MAPPING program started\n");
/* check that we got some arguments = list of files */
if (argc<2) {
/* use event - here, just write event id to result file */
eventT=event->eventType;
+ if(eventT==START_OF_DATA){
+
+
+ Int_t iMod=-1;
+ Int_t modGeo[kNModules], modType[kNModules],modNCh[kNModules];
+ for(Int_t kl=0; kl<kNModules; kl++){
+ modGeo[kl]=modType[kl]=modNCh[kl]=0;
+ }
Int_t ich=0;
Int_t adcMod[2*kNChannels], adcCh[2*kNChannels], sigCode[2*kNChannels];
for(Int_t y=0; y<kNScChannels; y++){
scMod[y]=scCh[y]=scSigCode[y]=scDet[y]=scSec[y]=0;
}
- //
- Int_t modNum=-1, modType=-1;
-
- if(eventT==START_OF_DATA){
-
+
rawStreamZDC->SetSODReading(kTRUE);
// --------------------------------------------------------
else{
while((rawStreamZDC->Next())){
if(rawStreamZDC->IsHeaderMapping()){ // mapping header
- modNum = rawStreamZDC->GetADCModule();
- modType = rawStreamZDC->GetModType();
+ iMod++;
+ modGeo[iMod] = rawStreamZDC->GetADCModule();
+ modType[iMod] = rawStreamZDC->GetModType();
+ modNCh[iMod] = rawStreamZDC->GetADCNChannels();
}
if(rawStreamZDC->IsChMapping()){
- if(modType==1){ // ADC mapping ----------------------
+ if(modType[iMod]==1){ // ADC mapping ----------------------
adcMod[ich] = rawStreamZDC->GetADCModFromMap(ich);
adcCh[ich] = rawStreamZDC->GetADCChFromMap(ich);
sigCode[ich] = rawStreamZDC->GetADCSignFromMap(ich);
det[ich] = rawStreamZDC->GetDetectorFromMap(ich);
sec[ich] = rawStreamZDC->GetTowerFromMap(ich);
- //
- fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
- ich,adcMod[ich],adcCh[ich],sigCode[ich],det[ich],sec[ich]);
- //
- //printf(" Mapping DA -> %d ADC: mod %d ch %d, code %d det %d, sec %d\n",
- // ich,adcMod[ich],adcCh[ich],sigCode[ich],det[ich],sec[ich]);
- //
ich++;
}
- else if(modType==2){ //VME scaler mapping --------------------
+ else if(modType[iMod]==2){ //VME scaler mapping --------------------
scMod[iScCh] = rawStreamZDC->GetScalerModFromMap(iScCh);
scCh[iScCh] = rawStreamZDC->GetScalerChFromMap(iScCh);
scSigCode[iScCh] = rawStreamZDC->GetScalerSignFromMap(iScCh);
scDet[iScCh] = rawStreamZDC->GetScDetectorFromMap(iScCh);
scSec[iScCh] = rawStreamZDC->GetScTowerFromMap(iScCh);
- //
- fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
- iScCh,scMod[iScCh],scCh[iScCh],scSigCode[iScCh],scDet[iScCh],scSec[iScCh]);
- //
- //printf(" Mapping DA -> %d Scaler: mod %d ch %d, code %d det %d, sec %d\n",
- // iScCh,scMod[iScCh],scCh[iScCh],scSigCode[iScCh],scDet[iScCh],scSec[iScCh]);
- //
iScCh++;
}
}
+ }
+ // Writing data on output FXS file
+ for(Int_t is=0; is<kNModules; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\n",
+ modGeo[is],modType[is],modNCh[is]);
+ //printf(" Mapping DA -> Module mapping: geo %d type %d #ch %d\n",
+ // modGeo[is],modType[is],modNCh[is]);
+ }
+ for(Int_t is=0; is<2*kNChannels; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
+ is,adcMod[is],adcCh[is],sigCode[is],det[is],sec[is]);
+ //printf(" Mapping DA -> %d ADC: mod %d ch %d, code %d det %d, sec %d\n",
+ // is,adcMod[is],adcCh[is],sigCode[is],det[is],sec[is]);
+ }
+ for(Int_t is=0; is<kNScChannels; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
+ is,scMod[is],scCh[is],scSigCode[is],scDet[is],scSec[is]);
+ //if(scMod[is]!=0) printf(" Mapping DA -> %d Scaler: mod %d ch %d, code %d det %d, sec %d\n",
+ // is,scMod[is],scCh[is],scSigCode[is],scDet[is],scSec[is]);
}
+
}
fclose(mapFile4Shuttle);
}// SOD event
TVirtualFitter::SetDefaultFitter("Minuit");
int status = 0;
+ int const kNModules = 10;
int const kNChannels = 24;
int const kNScChannels = 32;
Int_t kFirstADCGeo=0, kLastADCGeo=3;
+
+ Int_t iMod=-1;
+ Int_t modGeo[kNModules], modType[kNModules],modNCh[kNModules];
+ for(Int_t kl=0; kl<kNModules; kl++){
+ modGeo[kl]=modType[kl]=modNCh[kl]=0;
+ }
Int_t ich=0;
Int_t adcMod[2*kNChannels], adcCh[2*kNChannels], sigCode[2*kNChannels];
for(Int_t y=0; y<2*kNChannels; y++){
adcMod[y]=adcCh[y]=sigCode[y]=det[y]=sec[y]=0;
}
+
+ Int_t iScCh=0;
+ Int_t scMod[kNScChannels], scCh[kNScChannels], scSigCode[kNScChannels];
+ Int_t scDet[kNScChannels], scSec[kNScChannels];
+ for(Int_t y=0; y<kNScChannels; y++){
+ scMod[y]=scCh[y]=scSigCode[y]=scDet[y]=scSec[y]=0;
+ }
/* log start of process */
printf("\n ZDC PEDESTAL program started\n");
/* use event - here, just write event id to result file */
eventT=event->eventType;
- Int_t iScCh=0;
- Int_t scMod[kNScChannels], scCh[kNScChannels], scSigCode[kNScChannels];
- Int_t scDet[kNScChannels], scSec[kNScChannels];
- for(Int_t y=0; y<kNScChannels; y++){
- scMod[y]=scCh[y]=scSigCode[y]=scDet[y]=scSec[y]=0;
- }
- //
- Int_t modNum=-1, modType=-1;
-
if(eventT==START_OF_DATA){
-
+
+ iMod=-1; ich=0; iScCh=0;
+
rawStreamZDC->SetSODReading(kTRUE);
// --------------------------------------------------------
else{
while((rawStreamZDC->Next())){
if(rawStreamZDC->IsHeaderMapping()){ // mapping header
- modNum = rawStreamZDC->GetADCModule();
- modType = rawStreamZDC->GetModType();
+ iMod++;
+ modGeo[iMod] = rawStreamZDC->GetADCModule();
+ modType[iMod] = rawStreamZDC->GetModType();
+ modNCh[iMod] = rawStreamZDC->GetADCNChannels();
}
if(rawStreamZDC->IsChMapping()){
- if(modType==1){ // ADC mapping ----------------------
+ if(modType[iMod]==1){ // ADC mapping ----------------------
adcMod[ich] = rawStreamZDC->GetADCModFromMap(ich);
adcCh[ich] = rawStreamZDC->GetADCChFromMap(ich);
sigCode[ich] = rawStreamZDC->GetADCSignFromMap(ich);
det[ich] = rawStreamZDC->GetDetectorFromMap(ich);
sec[ich] = rawStreamZDC->GetTowerFromMap(ich);
- //
- fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
- ich,adcMod[ich],adcCh[ich],sigCode[ich],det[ich],sec[ich]);
- //
- //printf(" Mapping in DA -> %d ADC: mod %d ch %d, code %d det %d, sec %d\n",
- // ich,adcMod[ich],adcCh[ich],sigCode[ich],det[ich],sec[ich]);
- //
ich++;
}
- else if(modType==2){ //VME scaler mapping --------------------
+ else if(modType[iMod]==2){ //VME scaler mapping --------------------
scMod[iScCh] = rawStreamZDC->GetScalerModFromMap(iScCh);
scCh[iScCh] = rawStreamZDC->GetScalerChFromMap(iScCh);
scSigCode[iScCh] = rawStreamZDC->GetScalerSignFromMap(iScCh);
scDet[iScCh] = rawStreamZDC->GetScDetectorFromMap(iScCh);
- scSec[iScCh] = rawStreamZDC->GetScTowerFromMap(iScCh);
- //
- fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
- iScCh,scMod[iScCh],scCh[iScCh],scSigCode[iScCh],scDet[iScCh],scSec[iScCh]);
- //
- //printf(" Mapping in DA -> %d Scaler: mod %d ch %d, code %d det %d, sec %d\n",
- // iScCh,scMod[iScCh],scCh[iScCh],scSigCode[iScCh],scDet[iScCh],scSec[iScCh]);
- //
+ scSec[iScCh] = rawStreamZDC->GetScTowerFromMap(iScCh);
iScCh++;
}
}
+ }
+ // Writing data on output FXS file
+ for(Int_t is=0; is<kNModules; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\n",
+ modGeo[is],modType[is],modNCh[is]);
+ //printf(" Pedestal DA -> Module mapping: geo %d type %d #ch %d\n",
+ // modGeo[is],modType[is],modNCh[is]);
+ }
+ for(Int_t is=0; is<2*kNChannels; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
+ is,adcMod[is],adcCh[is],sigCode[is],det[is],sec[is]);
+ //printf(" Pedestal DA -> %d ADC: mod %d ch %d, code %d det %d, sec %d\n",
+ // is,adcMod[is],adcCh[is],sigCode[is],det[is],sec[is]);
}
+ for(Int_t is=0; is<kNScChannels; is++){
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
+ is,scMod[is],scCh[is],scSigCode[is],scDet[is],scSec[is]);
+ //printf(" Pedestal DA -> %d Scaler: mod %d ch %d, code %d det %d, sec %d\n",
+ // is,scMod[is],scCh[is],scSigCode[is],scDet[is],scSec[is]);
+ }
+
}
fclose(mapFile4Shuttle);
}// SOD event