39 #include <Riostream.h>
43 #include "AliRawReaderDate.h"
63 #include "TStopwatch.h"
65 #include "TPluginManager.h"
68 static const TString
fileExp(
"ExportedFiles.dat");
141 for (Int_t x = 0; x < 2; x++) {
142 for (Int_t y = 0; y < 4; y++) {
485 std::ifstream in(gSystem->ExpandPathName(file.Data()));
487 printf(
"Cannot open DA configuration file %s ; use default values.\n",file.Data());
496 pos = tmp.First(
" ");
502 pos = tmp.First(
" ");
508 pos = tmp.First(
" ");
514 pos = tmp.First(
" ");
520 pos = tmp.First(
" ");
526 pos = tmp.First(
" ");
532 pos = tmp.First(
" ");
538 pos = tmp.First(
" ");
544 pos = tmp.First(
" ");
550 pos = tmp.First(
" ");
556 pos = tmp.First(
" ");
562 pos = tmp.First(
" ");
568 pos = tmp.First(
" ");
584 out.open(file.Data(), std::ofstream::out);
608 std::ifstream in(gSystem->ExpandPathName(file.Data()));
610 printf(
"Cannot open last current file %s\n",currentFile.Data());
616 sscanf(line,
"%s %d", name, &flag);
623 sscanf(line,
"%s %d", name, &flag);
631 Int_t pos = tmp.First(
" ");
632 TString tmp1 = tmp(0, pos);
635 if (!lastCurrentFlag) {
648 pos = tmp.First(
" ");
652 if (!lastCurrentFlag) {
666 pos = tmp.First(
" ");
670 if (!lastCurrentFlag) {
682 pos = tmp.First(
" ");
686 if (!lastCurrentFlag) {
698 pos = tmp.First(
" ");
735 gSystem->Setenv(
"DAQDALIB_PATH",
"$DATE_ROOT/infoLogger");
736 gSystem->Setenv(
"DAQDA_TEST_DIR",
"/users_local1/Software/ALICE/AMORE/FES");
742 Bool_t modified = kFALSE;
743 Bool_t globalExported = kFALSE;
748 out.open(
fileExp.Data(), std::ofstream::out);
756 Bool_t initFES = kFALSE;
757 if (gSystem->AccessPathName(
"MtgLastCurrent.dat"))
759 if (initFES)
printf(
"Copy all configuration files to the FES.\n");
765 status = daqDA_FES_storeFile(file.Data(),
"LOCAL");
778 status = daqDA_FES_storeFile(file.Data(),
"LUT");
791 globalExported = kTRUE;
793 status = daqDA_FES_storeFile(file.Data(),
"GLOBAL");
805 status = daqDA_FES_storeFile(file.Data(),
"REGIONAL");
814 if (!globalExported) {
817 status = daqDA_FES_storeFile(file.Data(),
"GLOBAL");
847 out.open(
fileExp.Data(), std::ofstream::app);
849 printf(
"Failed to open file in append mode: %s\n",
fileExp.Data());
856 status = daqDA_FES_storeFile(file.Data(),
"GLOBAL");
867 status = daqDA_FES_storeFile(file.Data(),
"REGIONAL");
878 status = daqDA_FES_storeFile(file.Data(),
"TRIGSCAL");
905 gSystem->Setenv(
"DAQDALIB_PATH",
"$DATE_ROOT/db");
1003 gSystem->Setenv(
"DAQDALIB_PATH",
"$DATE_ROOT/db");
1006 Float_t rateN = 0.0, rateD = 0.0;
1007 UInt_t gmask[4], omask;
1008 Bool_t noise, deadc, withEvN, withEvD, updated = kFALSE;
1021 noise = (rateN > cfg.
GetThrN());
1026 deadc = (rateD < cfg.
GetThrD());
1029 if (!withEvN && !withEvD) {
1033 printf(
"Mask not changed (just copy the old values)\n");
1035 if (!withEvN && withEvD) {
1044 gmask[ii] |= 0x0 << ib;
1046 printf(
"Found dead channel %1d:%02d (%4.2f) \n",ii,ib,rateD);
1049 if (withEvN && !withEvD) {
1058 gmask[ii] |= 0x0 << ib;
1060 printf(
"Found noisy channel %1d:%02d (%4.2f) \n",ii,ib,rateN);
1063 if (withEvN && withEvD) {
1064 if (!noise && !deadc) {
1072 gmask[ii] |= 0x0 << ib;
1075 printf(
"Found noisy channel %1d:%02d (%4.2f) \n",ii,ib,rateN);
1077 printf(
"Found dead channel %1d:%02d (%4.2f) \n",ii,ib,rateD);
1086 printf(
"Global mask [%1d] %08x \n",ii,gmask[ii]);
1088 if (gmask[ii] != omask) {
1134 UShort_t mask =
static_cast<UShort_t
>(localMask->
ValueAsInt(connector,0));
1136 mask &= ~(0x1 << strip);
1162 for (Int_t i = 0; i < 4; ++i) {
1163 for (Int_t j = 0; j < 16; ++j) {
1165 Int_t xMask = xPattern[i];
1166 Int_t yMask = yPattern[i];
1168 Int_t index = 16*i + j;
1169 Double_t patOcc = 0.;
1171 if ( (xMask >> j ) & 0x1 ) {
1175 if ( (yMask >> j ) & 0x1 ) {
1190 gSystem->Setenv(
"DAQDALIB_PATH",
"$DATE_ROOT/db");
1194 Int_t localBoardId = 0;
1195 Int_t nEventsN = 0, nEventsD = 0;
1197 Int_t connector = 0;
1198 Bool_t updated = kFALSE;
1212 while ( ( pat = dynamic_cast<AliMUONVCalibParam*>(next() ) ) ) {
1214 localBoardId = pat->
ID0();
1216 for (Int_t index = 0; index < pat->
Size(); index++) {
1218 Double_t patXOcc = pat->
ValueAsDouble(index, 0)/(Double_t)nEventsN;
1219 Double_t patYOcc = pat->
ValueAsDouble(index, 1)/(Double_t)nEventsN;
1227 connector = index/16;
1233 connector = index/16 + 4;
1247 while ( ( pat = dynamic_cast<AliMUONVCalibParam*>(next() ) ) ) {
1249 localBoardId = pat->
ID0();
1251 for (Int_t index = 0; index < pat->
Size(); index++) {
1253 Double_t patXOcc = pat->
ValueAsDouble(index, 0)/(Double_t)nEventsD;
1254 Double_t patYOcc = pat->
ValueAsDouble(index, 1)/(Double_t)nEventsD;
1262 connector = index/16;
1268 connector = index/16 + 4;
1279 UShort_t maskDA, mask;
1281 Int_t nMaskBitsChanged = 0;
1285 for (connector = 0; connector < 8; connector++) {
1286 maskDA =
static_cast<UShort_t
>(localMaskDA->
ValueAsInt(connector,0));
1287 mask =
static_cast<UShort_t
>(localMask->
ValueAsInt(connector,0));
1290 if (maskDA != mask) {
1293 for (Int_t iBit = 0; iBit < 16; iBit++) {
1294 if (((maskDA >> iBit) & 0x1) != ((mask >> iBit) &0x1)) {
1302 printf(
"LOCAL mask bits changed = %5d (%7.3f %%) \n",nMaskBitsChanged,100*(Float_t)nMaskBitsChanged/(Float_t)nMaskBits);
1336 int main(Int_t argc, Char_t **argv)
1341 gROOT->GetPluginManager()->AddHandler(
"TVirtualStreamerInfo",
"*",
"TStreamerInfo",
"RIO",
"TStreamerInfo()");
1345 printf(
"Wrong number of arguments\n");
1351 Char_t inputFile[256] =
"";
1354 if (argv[1] != NULL)
1355 strncpy(inputFile, argv[1], 256);
1357 printf(
"MUONTRGda : No input File !\n");
1364 Int_t nDateEvents = 0;
1376 TArrayS xPattern(4);
1377 TArrayS yPattern(4);
1378 Int_t localBoardId = 0;
1382 timers.Start(kTRUE);
1386 printf(
"Import from DB failed\n");
1387 printf(
"For local test set DAQDA_TEST_DIR to the local directory where the Mtg files are located \n");
1395 TString tmp(inputFile);
1396 Int_t pos1 = tmp.First(
'd');
1397 Int_t pos2 = tmp.Last(
'.');
1398 Int_t len = pos2 - (pos1+3);
1399 tmp = tmp(pos1+3,len);
1400 gSystem->Setenv(
"DATE_RUN_NUMBER",tmp.Data());
1401 gSystem->Exec(
"echo \"DATE_RUN_NUMBER = \" $DATE_RUN_NUMBER");
1405 printf(
"ExportFiles failed\n");
1410 Bool_t modeFET3 = kTRUE;
1412 printf(
"FET is not in mode 3. Only PHYSICS events will be analysed (noisy channels)\n");
1419 printf(
"The MTS proxy does not control all global cards\n");
1425 printf(
"Global masks are not ON\n");
1430 const Char_t* tableSOD[] = {
"ALL",
"yes",
"CAL",
"all", NULL, NULL};
1431 monitorDeclareTable(const_cast<char**>(tableSOD));
1434 status = monitorSetDataSource(inputFile);
1436 cerr <<
"ERROR : monitorSetDataSource status (hex) = " << hex << status
1437 <<
" " << monitorDecodeError(status) << endl;
1441 status = monitorDeclareMp(
"MUON Trigger monitoring");
1443 cerr <<
"ERROR : monitorDeclareMp status (hex) = " << hex << status
1444 <<
" " << monitorDecodeError(status) << endl;
1450 monitorSetNoWaitNetworkTimeout(1000);
1452 cout <<
"MUONTRGda : Reading data from file " << inputFile <<endl;
1454 UInt_t nCalibEvents;
1458 Bool_t overFlow, firstCalibEvent = kTRUE;
1461 const Int_t nCathodes = 2;
1462 UInt_t locLptScaler[nLocBoards];
1463 ULong64_t locStripScaler[nTriChambers][nLocBoards][nCathodes];
1464 UInt_t locStripOver[nTriChambers][nLocBoards][nCathodes];
1466 const Int_t bufflen =
1468 nLocBoards*
sizeof(UInt_t)+
1469 nLocBoards*nCathodes*nTriChambers*(
sizeof(UInt_t)+
sizeof(ULong64_t));
1470 UChar_t buffer[bufflen];
1476 for (Int_t bit = 0; bit < 6; bit++) {
1479 for (Int_t iLoc = 0; iLoc < nLocBoards; iLoc++) {
1480 locLptScaler[iLoc] = 0;
1481 for (Int_t iCath = 0; iCath < nCathodes; iCath++) {
1482 for (Int_t iCha = 0; iCha < nTriChambers; iCha++) {
1483 locStripScaler[iCha][iLoc][iCath] = 0;
1484 locStripOver[iCha][iLoc][iCath] = 0;
1490 Bool_t writeScalers = kFALSE;
1492 UInt_t *globalInput =
new UInt_t[4];
1493 Bool_t doUpdate = kFALSE;
1494 Int_t runNumber = 0;
1504 if (nEvents && nEvents % 1000 == 0)
1505 cout<<
"Cumulated events " << nEvents << endl;
1508 if (daqDA_checkShutdown())
1514 status = monitorGetEventDynamic(&event);
1520 status = monitorGetEventDynamic(&event);
1522 cout <<
"MUONTRGda : EOF found" << endl;
1529 AliRawReader *rawReader =
new AliRawReaderDate(event);
1531 Int_t eventType = rawReader->GetType();
1532 runNumber = rawReader->GetRunNumber();
1541 if (eventType == PHYSICS_EVENT) {
1545 }
else if (modeFET3 && eventType == CALIBRATION_EVENT) {
1580 while((status = rawStream->
NextDDL())) {
1591 if (cfg.
SaveScalers() && (eventType == CALIBRATION_EVENT)) {
1593 if (firstCalibEvent) {
1596 firstCalibEvent = kFALSE;
1606 for (Int_t bit = 0; bit < 6; bit++) {
1607 glSc[bit] += (double)(*(globScaler+bit));
1614 Int_t nReg = (Int_t)static_cast<AliMUONRawStreamTriggerHP*>(rawStream)->GetRegionalHeaderCount();
1615 for(Int_t iReg = 0; iReg < nReg; iReg++) {
1617 Int_t nLoc = (Int_t)static_cast<AliMUONRawStreamTriggerHP*>(rawStream)->GetLocalStructCount(iReg);
1618 for(Int_t iLoc = 0; iLoc < nLoc; iLoc++) {
1621 if (localBoardId > 0) {
1628 if (cfg.
SaveScalers() && (eventType == CALIBRATION_EVENT)) {
1631 if(localBoardId <= nLocBoards) {
1632 locLptScaler[localBoardId-1] +=
1637 for (Int_t ibitxy = 0; ibitxy < 16; ++ibitxy) {
1638 UInt_t scalerVal[4] = {
1639 localStructHP->
GetXY1(ibitxy),
1640 localStructHP->
GetXY2(ibitxy),
1641 localStructHP->
GetXY3(ibitxy),
1642 localStructHP->
GetXY4(ibitxy)
1645 for(Int_t ich = 0; ich < nTriChambers; ich++) {
1647 if (scalerVal[ich] < 0xffff/2) {
1648 locStripScaler[ich][localBoardId-1][cathode] += 2*scalerVal[ich];
1650 locStripOver[ich][localBoardId-1][cathode]++;
1668 for(Int_t iReg = 0; iReg < nReg; iReg++) {
1672 for(Int_t iLoc = 0; iLoc < nLoc; iLoc++) {
1675 if (localBoardId > 0) {
1686 if (rawStream->
GetDDL() == 0) {
1696 writeScalers = kTRUE;
1699 buffer[ibw++] = (nCalibEvents >> 24) & 0xff;
1700 buffer[ibw++] = (nCalibEvents >> 16) & 0xff;
1701 buffer[ibw++] = (nCalibEvents >> 8) & 0xff;
1702 buffer[ibw++] = (nCalibEvents >> 0) & 0xff;
1703 buffer[ibw++] = (deltaT >> 24) & 0xff;
1704 buffer[ibw++] = (deltaT >> 16) & 0xff;
1705 buffer[ibw++] = (deltaT >> 8) & 0xff;
1706 buffer[ibw++] = (deltaT >> 0) & 0xff;
1708 for (Int_t bit = 0; bit < 6; bit++) {
1709 buffer[ibw++] = (glSc[bit] >> 24) & 0xff;
1710 buffer[ibw++] = (glSc[bit] >> 16) & 0xff;
1711 buffer[ibw++] = (glSc[bit] >> 8) & 0xff;
1712 buffer[ibw++] = (glSc[bit] >> 0) & 0xff;
1716 for (Int_t iLoc = 0; iLoc < nLocBoards; iLoc++) {
1717 buffer[ibw++] = (locLptScaler[iLoc] >> 24) & 0xff;
1718 buffer[ibw++] = (locLptScaler[iLoc] >> 16) & 0xff;
1719 buffer[ibw++] = (locLptScaler[iLoc] >> 8) & 0xff;
1720 buffer[ibw++] = (locLptScaler[iLoc] >> 0) & 0xff;
1721 for (Int_t iCath = 0; iCath < nCathodes; iCath++) {
1722 for (Int_t iCha = 0; iCha < nTriChambers; iCha++) {
1725 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 56) & 0xff;
1726 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 48) & 0xff;
1727 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 40) & 0xff;
1728 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 32) & 0xff;
1729 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 24) & 0xff;
1730 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 16) & 0xff;
1731 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 8) & 0xff;
1732 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 0) & 0xff;
1734 buffer[ibw++] = (locStripOver[iCha][iLoc][iCath] >> 24) & 0xff;
1735 buffer[ibw++] = (locStripOver[iCha][iLoc][iCath] >> 16) & 0xff;
1736 buffer[ibw++] = (locStripOver[iCha][iLoc][iCath] >> 8) & 0xff;
1737 buffer[ibw++] = (locStripOver[iCha][iLoc][iCath] >> 0) & 0xff;
1742 fwrite(&buffer,ibw,1,fsc);
1746 for (Int_t bit = 0; bit < 6; bit++) {
1749 for (Int_t iLoc = 0; iLoc < nLocBoards; iLoc++) {
1750 locLptScaler[iLoc] = 0;
1751 for (Int_t iCath = 0; iCath < nCathodes; iCath++) {
1752 for (Int_t iCha = 0; iCha < nTriChambers; iCha++) {
1753 locStripScaler[iCha][iLoc][iCath] = 0;
1754 locStripOver[iCha][iLoc][iCath] = 0;
1782 printf(
"ExportTRIGSCAL failed\n");
1791 status = daqDA_FES_storeFile(
fileExp.Data(),
"EXPORTED");
1800 cout <<
"MUONTRGda: DA enable: " << cfg.
GetDAFlag() << endl;
1801 cout <<
"MUONTRGda: Run number: " << runNumber << endl;
1802 cout <<
"MUONTRGda: Nb of DATE events: " << nDateEvents << endl;
1803 cout <<
"MUONTRGda: Nb of events used: " << nEvents << endl;
1804 cout <<
"MUONTRGda: Nb of events used (noise): " << cfg.
GetEventsN() << endl;
1805 cout <<
"MUONTRGda: Nb of events used (deadc): " << cfg.
GetEventsD() << endl;
1806 cout <<
"MUONTRGda: Minumum nr of events for rate calculation: " << cfg.
GetMinEvents() << endl;
1807 cout <<
"MUONTRGda: Maximum nr of analyzed events: " << cfg.
GetMaxEvents() << endl;
1808 cout <<
"MUONTRGda: Skip events from start: " << cfg.
GetSkipEvents() << endl;
1809 cout <<
"MUONTRGda: Threshold for global noisy inputs: " << 100*cfg.
GetThrN() <<
"%" << endl;
1810 cout <<
"MUONTRGda: Threshold for global dead inputs: " << 100*cfg.
GetThrD() <<
"%" << endl;
1811 cout <<
"MUONTRGda: Threshold for local noisy inputs: " << 100*cfg.
GetThrLocN() <<
"%" << endl;
1812 cout <<
"MUONTRGda: Threshold for local dead inputs: " << 100*cfg.
GetThrLocD() <<
"%" << endl;
1813 cout <<
"MUONTRGda: Print level: " << cfg.
GetPrintLevel() << endl;
1814 cout <<
"MUONTRGda: Show decoder warnings: " << cfg.
WithWarnings() << endl;
1815 cout <<
"MUONTRGda: Use the fast decoder: " << cfg.
UseFastDecoder() << endl;
1816 cout <<
"MUONTRGda: DA mode (1=GLOBAL, 2=GLOBAL+LOCAL): " << cfg.
GetDAMode() << endl;
1817 cout <<
"MUONTRGda: Save scalers: " << cfg.
SaveScalers() << endl;
1819 cout <<
"MUONTRGda: Time to record scalers: " << cfg.
GetScalerRecTime() <<
" seconds" << endl;
1822 printf(
"MUONTRGda: Execution time : R:%7.2fs C:%7.2fs\n", timers.RealTime(), timers.CpuTime());
Bool_t fAlgoDeadcInput
select CALIBRATION events for dead channels analysis
void GetXPattern(TArrayS &array) const
return X pattern array
AliMUONRegionalTriggerConfig * GetRegionalMasks() const
configuration object for the regional crate (own)
virtual TIterator * CreateIterator() const =0
Return an iterator to loop over the whole store.
Light weight interface class to the local trigger card data.
void SetGlobalFileLastVersion(Int_t ver)
set the last known version of the global crate configuration
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
The class defines the configuration of global crate.
AliMUONTriggerIO * fTriggerIO
read/write masks and LUT to/from online files
void ReadMaskFiles(AliDAConfig &cfg)
static const TString fileExp("ExportedFiles.dat")
virtual Int_t GetDDL() const =0
Return number of DDL.
virtual AliMUONDDLTrigger * GetDDLTrigger() const =0
Return pointer to DDL payload object.
const Char_t * GetLastCurrentFileName()
last known versions of the configuration files, usually MtgLastCurrent.dat
Rawdata local card structure for trigger.
void SetLocalMaskFileName(const Char_t *name)
set the masks for the local cards, file name
int main(Int_t argc, Char_t **argv)
Int_t GetSodFlag() const
flag value of the Start-of-data field in MtgCurrent.dat
UInt_t GetGlobalMask(Int_t index) const
Get mask for the global input.
Int_t fLocalLutFileVersion
version of the transverse momentum Look-Up-Table in the detector DB
void SetRegionalFileVersion(Int_t ver)
set the version of the regional crate configuration in the detector DB
void SetGlobalFileName(const Char_t *name)
set the global crate configuration file name
Int_t GetEventsD() const
number of accumulated CALIBRATION events for dead channels analysis
const Char_t * GetRegionalFileName()
regional crate configuration file name
void SetThrLocN(Float_t val)
set the threshold for noisy local strips (fraction of events)
AliDAConfig & operator=(const AliDAConfig &cfg)
assignment operator, not implemented
AliMUONVStore * GetPatternStoreN() const
store for local strips patterns (noisy strips)
UChar_t GetId() const
Return Id.
virtual Int_t Size() const =0
The number of channels handled by this object.
Bool_t ImportFiles(AliDAConfig &cfg)
void SetSignatureFileVersion(Int_t ver)
set the version of the signature file in the detector DB
Bool_t ExportFiles(AliDAConfig &cfg)
void SetSaveScalers(Bool_t val)
set/unset the saving of cooked information from scalers
void SetWithWarnings()
set/unset to show warnings from the raw data decoder
Bool_t ExportTRIGSCAL(AliDAConfig &cfg)
void SetLocalMaskFileVersion(Int_t ver)
set the version of the masks for the local cards in the detector DB
void SetSkipEvents(Int_t val)
set the number of events to skip from start
void SetRegionalFileLastVersion(Int_t ver)
set the last known version of the regional crate configuration
UInt_t GetGlobalCrateEnable() const
Get global crate enbale.
UInt_t fLPtRTrig
local low Pt right trigger
void StoreGlobalInput(AliDAConfig &cfg, const UInt_t *const globalInput)
const Char_t * GetSodName()
name of the Start-of-data field in MtgCurrent.dat
Int_t GetRegionalFileVersion() const
version of the regional crate configuration in the detector DB
Int_t GetDAMode() const
DA active mode (GLOBAL or GLOBAL+LOCAL)
Int_t fGlobalFileLastVersion
last known version of the global crate configuration
Float_t fThrD
threshold for dead global inputs (fraction of events)
Int_t GetDAFlag() const
flag value of the Detector Algorithm field in MtgCurrent.dat
AliMUONGlobalCrateConfig * fGlobalMasks
configuration object for the global crate
Int_t GetRegionalFileLastVersion() const
last known version of the regional crate configuration
void SetGlobalFileVersion(Int_t ver)
set the version of the global crate configuration in the detector DB
Higher performance decoder stream class for reading MUON raw trigger data.
AliMUONGlobalCrateConfig * GetGlobalMasks() const
configuration object for the global crate (own)
Bool_t GetAlgoNoisyInput() const
select PHYSICS events for noisy channels analysis
void SetMaxEvents(Int_t val)
set the maximum number of events to analyze
TString fTrigScalFileName
trigger scalers, file name
Int_t fSodFlag
flag value of the Start-of-data field in MtgCurrent.dat
void ReadFileNames(AliDAConfig &cfg)
virtual void SetValueAsInt(Int_t i, Int_t j, Int_t value)=0
Set one value, for channel i, dimension j. Consider value is an integer.
UInt_t GetFetMode(const AliDAConfig &cfg)
virtual Double_t ValueAsDouble(Int_t i, Int_t j=0) const
Int_t fPrintLevel
print verbosity of the DA
static Int_t NofLocalBoards()
Return number of trigger local boards.
const Char_t * GetCurrentFileName()
file with current versions of the configuration files, usually MtgCurrent.dat
Int_t fRegionalFileVersion
version of the regional crate configuration in the detector DB
Bool_t fSaveScalers
save cooked information from the trigger scalers
Bool_t fUseFastDecoder
use the high-performance (HP) decoder
TString fGlobalFileName
global crate configuration, file name
AliMUONVStore * GetPatternStoreD() const
store for local strips patterns (dead strips)
const Int_t fNLocalBoard
number of local boards
UInt_t fLPtSTrig
local low Pt straight trigger
void UpdateGlobalMasks(AliDAConfig &cfg)
void MakePattern(AliDAConfig &cfg, Int_t localBoardId, const TArrayS &xPattern, const TArrayS &yPattern)
Int_t GetGlobalInputLength() const
length in bits of a global input word
Int_t GetMaxEvents() const
maximum number of events to analyze
Int_t fScalerRecTime
time between two records, in seconds
UShort_t GetXY1(Int_t n) const
Return XY1.
Int_t fLocalMaskFileVersion
version of the masks for the local cards in the detector DB
Int_t fSignatureFileVersion
version of the signature file in the detector DB
AliMUONVStore * fLocalMasksDA
store for the DA-calculated masks for the local cards
void SetLocalLutFileLastVersion(Int_t ver)
set the last known version of the transverse momentum Look-Up-Table
UShort_t GetXY2(Int_t n) const
Return XY2.
Container of calibration values for a given number of channels.
Class for reading MUON raw digits.
void SetDAName(Char_t *name)
set the name of the Detector Algorithm field in MtgCurrent.dat
void SetSignatureFileName(const Char_t *name)
set the signature file name
Int_t GetSignatureFileVersion() const
version of the signature file in the detector DB
UInt_t GetScalerRecTime() const
time between two records, in seconds
Bool_t ReadCurrentFile(AliDAConfig &cfg, TString currentFile, Bool_t lastCurrentFlag=kFALSE)
Handles read/write of masks and LUT to/from online files.
const Char_t * GetLocalLutFileName()
transverse momentum Look-Up-Table, file name
AliMUONDarcHeader * GetDarcHeader() const
get AliMUONDarcHeader
Base class for reading MUON raw trigger data.
Implementation of AliMUONVCalibParam for tuples of ints.
void WriteLastCurrentFile(AliDAConfig &cfg, TString currentFile)
const TString fCurrentFileName
usually MtgCurrent.dat
virtual Bool_t NextDDL()=0
DDL iterator.
void SetAlgoDeadcInput(Bool_t val)
select CALIBRATION events for dead channels analysis
Int_t GetLocalLutFileVersion() const
version of the transverse momentum Look-Up-Table in the detector DB
UShort_t GetXY4(Int_t n) const
Return XY4.
length in bits of a global input word
const Char_t * GetDAConfigFileName()
name of the DA configuration file from detector DB
Int_t GetGlobalFileLastVersion() const
last known version of the global crate configuration
Int_t GetGlobalInputs() const
number of global input words
void SetLocalLutFileName(const Char_t *name)
set the transverse momentum Look-Up-Table, file name
Bool_t GetMasksOn() const
Indicates if global masks are active on global inputs.
virtual Int_t ID0() const
First id of this object.
Bool_t fWithWarnings
show warnings from the raw data decoder
Float_t GetThrLocD() const
threshold for dead local strips (fraction of events)
void MakePatternStore(AliDAConfig &cfg)
Implementation of AliMUONVCalibParam for tuples of double.
Int_t GetGlobalFileVersion() const
version of the global crate configuration in the detector DB
Bool_t WriteLocalMasks(const char *localFile, const AliMUONVStore &localMasks) const
Int_t GetEventsN() const
number of accumulated PHYSICS events for noisy channels analysis
const Char_t * GetSignatureFileName()
signature, file name
void SetRegionalFileName(const Char_t *name)
set the regional crate configuration file name
void SetThrLocD(Float_t val)
set the threshold for dead local strips (fraction of events)
Int_t fEventsD
number of accumulated CALIBRATION events
void AddAccGlobalInputD(Int_t ii, Int_t ib, Int_t val)
count the value of the bit "ib" of global input word "ii" (CALIBRATION events)
void SetMinEvents(Int_t val)
set the minumum nr of events for rate calculation
UInt_t GetFetRegister(Int_t index) const
Get register for FET.
Int_t GetLocalMaskFileLastVersion() const
last known version of the masks for the local cards
number of global input words
Int_t GetLocalLutFileLastVersion() const
last known version of the transverse momentum Look-Up-Table
static Int_t TotalNofLocalBoards()
Return total number of trigger local boards.
Int_t LocalBoardId(Int_t index) const
Int_t fDAFlag
flag value of the Detector Algorithm field in MtgCurrent.dat (enabled/disabled)
const TString fLastCurrentFileName
usually MtgLastCurrent.dat
void SetTrigScalFileName(const Char_t *name)
set the trigger scalers file name
void SetUseFastDecoder()
set/unset the use of the high-performance (HP) decoder
const Char_t * GetGlobalFileName()
global crate configuration file name
void IncDeadcEvent()
increment the number of selected CALIBRATION events
AliMUONVStore * fLocalMasks
store for the masks for the local cards
TString fLocalLutFileName
transverse momentum Look-Up-Table, file name
Int_t GetAccGlobalInputN(Int_t ii, Int_t ib) const
get accumulated values for bit "ib" from global input word "ii", PHYSICS events
const TString fDAConfigFileName
name of the DA configuration file from detector DB
Implementation of AliMUONVStore.
TString fSignatureFileName
signature, file name
Float_t GetThrLocN() const
threshold for noisy local strips (fraction of events)
Int_t fEventsN
number of accumulated PHYSICS events
virtual Int_t ValueAsInt(Int_t i, Int_t j=0) const =0
void GetXPattern(TArrayS &array) const
return X pattern array
void GetYPattern(TArrayS &array) const
return Y pattern array
class for DA run parameters and DA working space
Float_t fThrLocD
threshold for dead local strips (fraction of events)
Int_t fSkipEvents
number of events to skip from start
void SetScalerRecTime(Int_t trec)
time between two records, in seconds
void IncGlobalFileVersion()
increment version of the global crate configuration file
AliMUONVStore * GetLocalMasksDA() const
store for the DA-calculated masks for the local cards (own)
Int_t fRegionalFileLastVersion
last known version of the regional crate configuration
Float_t GetThrN() const
threshold for noisy global inputs (fraction of events)
TString fDAName
name of the Detector Algorithm field in MtgCurrent.dat
Int_t fAccGlobalInputD[kGlobalInputs][kGlobalInputLength]
storage for global input (CALIBRATION events)
virtual Bool_t Add(TObject *object)=0
Add an object to the store.
UShort_t GetXY3(Int_t n) const
Return XY3.
void SetAlgoNoisyInput(Bool_t val)
select PHYSICS events for noisy channels analysis
void GetYPattern(TArrayS &array) const
return Y pattern array
Float_t fThrN
threshold for noisy global inputs (fraction of events)
Int_t fAccGlobalInputN[kGlobalInputs][kGlobalInputLength]
storage for global input (PHYSICS events)
Float_t GetThrD() const
threshold for dead global inputs (fraction of events)
void IncLocalMaskFileVersion()
increment version of the local mask configuration file
Bool_t ReadDAConfig(AliDAConfig &cfg)
AliMUONVStore * GetLocalMasks() const
store for the masks for the local cards (own)
AliMUONVStore * fPatternStoreN
store for local strips patterns
Int_t GetSkipEvents() const
number of events to skip from start
Int_t fMinEvents
minumum nr of events for rate calculation
void IncNoiseEvent()
increment the number of selected PHYSICS events
Int_t fDAMode
DA active mode, GLOBAL or GLOBAL+LOCAL.
void SetLocalLutFileVersion(Int_t ver)
set the version of the transverse momentum Look-Up-Table in the detector DB
TString fLocalMaskFileName
masks for the local cards, file name
Int_t GetAccGlobalInputD(Int_t ii, Int_t ib) const
get accumulated values for bit "ib" from global input word "ii", CALIBRATION events ...
const Char_t * GetDAName()
name of the Detector Algorithm field in MtgCurrent.dat
void AddAccGlobalInputN(Int_t ii, Int_t ib, Int_t val)
count the value of the bit "ib" of global input word "ii" (PHYSICS events)
Bool_t SaveScalers() const
save cooked information from scalers
const AliMUONLocalScalarsStruct * GetScalars() const
void SetDAMode(Int_t mode)
set DA active mode, 1 = GLOBAL (default), 2 = GLOBAL and LOCAL
void DecSkipEvents()
count skipped events
virtual void DisableWarnings()=0
Disable Warnings.
AliMUONVStore * fPatternStoreD
store for local strips patterns
void UpdateLocalMask(AliDAConfig &cfg, Int_t localBoardId, Int_t connector, Int_t strip)
UChar_t GetId() const
Return Id.
Bool_t GetAlgoDeadcInput() const
select CALIBRATION events for dead channels analysis
Globally used constants definition.
TString fRegionalFileName
regional crate configuration, file name
void SetPrintLevel(Int_t level)
set the print verbosity level of the DA
Int_t GetLocalMaskFileVersion() const
version of the masks for the local cards in the detector DB
void SetThrD(Float_t val)
set the threshold for dead global inputs (fraction of events)
Int_t GetMinEvents() const
minumum nr of events for rate calculation
Base class for MUON data stores.
Bool_t fAlgoNoisyInput
select PHYSICS events for noisy channels analysis
TString fSodName
name of the Start-of-data field in MtgCurrent.dat
AliMUONTriggerIO * GetTriggerIO() const
read/write configurations, masks and LUT to/from online files (own)
void SetLocalMaskFileLastVersion(Int_t ver)
set the last known version of the masks for the local cards
UChar_t GetComptXY() const
Return ComptXY.
void SetSodFlag(Int_t flag)
set the flag value of the Start-of-data field in MtgCurrent.dat
Bool_t WithWarnings() const
show warnings from the raw data decoder
Bool_t ReadConfig(const char *localFile, const char *regionalFile, const char *globalFile, AliMUONVStore *localMasks, AliMUONRegionalTriggerConfig *regionalConfig, AliMUONGlobalCrateConfig *globalConfig)
void SetGlobalMask(Int_t index, UInt_t mask)
Set mask for the global input.
UInt_t fLPtLTrig
local low Pt left trigger
The class defines the properties of regional trigger crate.
void SetThrN(Float_t val)
set the threshold for noisy global inputs (fraction of events)
Bool_t UseFastDecoder() const
use the high-performance (HP) decoder
virtual TObject * FindObject(const char *name) const
Find an object by name.
Int_t fMaxEvents
maximum number of events to analyze
Float_t fThrLocN
threshold for noisy local strips (fraction of events)
Int_t fLocalMaskFileLastVersion
last known version of the masks for the local cards
void SetSodName(Char_t *name)
set the name of the Start-of-data field in MtgCurrent.dat
const Char_t * GetLocalMaskFileName()
masks for the local cards, file name
AliMUONRegionalTriggerConfig * fRegionalMasks
configuration object for the regional crate
void SetDAFlag(Int_t flag)
set the flag value of the Detector Algorithm field in MtgCurrent.dat
virtual void SetValueAsDouble(Int_t i, Int_t j, Double_t value)
Bool_t WriteGlobalConfig(const char *globalFile, AliMUONGlobalCrateConfig *globalConfig) const
Int_t fGlobalFileVersion
version of the global crate configuration in the detector DB
Int_t fLocalLutFileLastVersion
last known version of the transverse momentum Look-Up-Table
static Int_t NofTriggerChambers()
const Char_t * GetTrigScalFileName()
signature, file name
Int_t GetPrintLevel() const
print verbosity of the DA