39 #include <Riostream.h>
42 #include "AliRawReaderDate.h"
62 #include "TStopwatch.h"
64 #include "TPluginManager.h"
67 static const TString
fileExp(
"ExportedFiles.dat");
140 for (Int_t x = 0; x < 2; x++) {
141 for (Int_t y = 0; y < 4; y++) {
484 std::ifstream in(gSystem->ExpandPathName(file.Data()));
486 printf(
"Cannot open DA configuration file %s ; use default values.\n",file.Data());
495 pos = tmp.First(
" ");
501 pos = tmp.First(
" ");
507 pos = tmp.First(
" ");
513 pos = tmp.First(
" ");
519 pos = tmp.First(
" ");
525 pos = tmp.First(
" ");
531 pos = tmp.First(
" ");
537 pos = tmp.First(
" ");
543 pos = tmp.First(
" ");
549 pos = tmp.First(
" ");
555 pos = tmp.First(
" ");
561 pos = tmp.First(
" ");
567 pos = tmp.First(
" ");
583 out.open(file.Data(), std::ofstream::out);
607 std::ifstream in(gSystem->ExpandPathName(file.Data()));
609 printf(
"Cannot open last current file %s\n",currentFile.Data());
615 sscanf(line,
"%s %d", name, &flag);
622 sscanf(line,
"%s %d", name, &flag);
630 Int_t pos = tmp.First(
" ");
631 TString tmp1 = tmp(0, pos);
634 if (!lastCurrentFlag) {
647 pos = tmp.First(
" ");
651 if (!lastCurrentFlag) {
665 pos = tmp.First(
" ");
669 if (!lastCurrentFlag) {
681 pos = tmp.First(
" ");
685 if (!lastCurrentFlag) {
697 pos = tmp.First(
" ");
734 gSystem->Setenv(
"DAQDALIB_PATH",
"$DATE_ROOT/infoLogger");
735 gSystem->Setenv(
"DAQDA_TEST_DIR",
"/users_local1/Software/ALICE/AMORE/FES");
741 Bool_t modified = kFALSE;
742 Bool_t globalExported = kFALSE;
743 Bool_t storeOCDB = kTRUE;
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");
845 Bool_t storeOCDB = kTRUE;
848 out.open(
fileExp.Data(), std::ofstream::app);
850 printf(
"Failed to open file in append mode: %s\n",
fileExp.Data());
857 status = daqDA_FES_storeFile(file.Data(),
"GLOBAL");
869 status = daqDA_FES_storeFile(file.Data(),
"REGIONAL");
881 status = daqDA_FES_storeFile(file.Data(),
"TRIGSCAL");
909 gSystem->Setenv(
"DAQDALIB_PATH",
"$DATE_ROOT/db");
1007 gSystem->Setenv(
"DAQDALIB_PATH",
"$DATE_ROOT/db");
1010 Float_t rateN = 0.0, rateD = 0.0;
1011 UInt_t gmask[4], omask;
1012 Bool_t noise, deadc, withEvN, withEvD, updated = kFALSE;
1025 noise = (rateN > cfg.
GetThrN());
1030 deadc = (rateD < cfg.
GetThrD());
1033 if (!withEvN && !withEvD) {
1037 printf(
"Mask not changed (just copy the old values)\n");
1039 if (!withEvN && withEvD) {
1048 gmask[ii] |= 0x0 << ib;
1050 printf(
"Found dead channel %1d:%02d (%4.2f) \n",ii,ib,rateD);
1053 if (withEvN && !withEvD) {
1062 gmask[ii] |= 0x0 << ib;
1064 printf(
"Found noisy channel %1d:%02d (%4.2f) \n",ii,ib,rateN);
1067 if (withEvN && withEvD) {
1068 if (!noise && !deadc) {
1076 gmask[ii] |= 0x0 << ib;
1079 printf(
"Found noisy channel %1d:%02d (%4.2f) \n",ii,ib,rateN);
1081 printf(
"Found dead channel %1d:%02d (%4.2f) \n",ii,ib,rateD);
1090 printf(
"Global mask [%1d] %08x \n",ii,gmask[ii]);
1092 if (gmask[ii] != omask) {
1138 UShort_t mask =
static_cast<UShort_t
>(localMask->
ValueAsInt(connector,0));
1140 mask &= ~(0x1 << strip);
1166 for (Int_t i = 0; i < 4; ++i) {
1167 for (Int_t j = 0; j < 16; ++j) {
1169 Int_t xMask = xPattern[i];
1170 Int_t yMask = yPattern[i];
1172 Int_t index = 16*i + j;
1173 Double_t patOcc = 0.;
1175 if ( (xMask >> j ) & 0x1 ) {
1179 if ( (yMask >> j ) & 0x1 ) {
1194 gSystem->Setenv(
"DAQDALIB_PATH",
"$DATE_ROOT/db");
1198 Int_t localBoardId = 0;
1199 Int_t nEventsN = 0, nEventsD = 0;
1201 Int_t connector = 0;
1202 Bool_t updated = kFALSE;
1216 while ( ( pat = dynamic_cast<AliMUONVCalibParam*>(next() ) ) ) {
1218 localBoardId = pat->
ID0();
1220 for (Int_t index = 0; index < pat->
Size(); index++) {
1222 Double_t patXOcc = pat->
ValueAsDouble(index, 0)/(Double_t)nEventsN;
1223 Double_t patYOcc = pat->
ValueAsDouble(index, 1)/(Double_t)nEventsN;
1231 connector = index/16;
1237 connector = index/16 + 4;
1251 while ( ( pat = dynamic_cast<AliMUONVCalibParam*>(next() ) ) ) {
1253 localBoardId = pat->
ID0();
1255 for (Int_t index = 0; index < pat->
Size(); index++) {
1257 Double_t patXOcc = pat->
ValueAsDouble(index, 0)/(Double_t)nEventsD;
1258 Double_t patYOcc = pat->
ValueAsDouble(index, 1)/(Double_t)nEventsD;
1266 connector = index/16;
1272 connector = index/16 + 4;
1283 UShort_t maskDA, mask;
1285 Int_t nMaskBitsChanged = 0;
1289 for (connector = 0; connector < 8; connector++) {
1290 maskDA =
static_cast<UShort_t
>(localMaskDA->
ValueAsInt(connector,0));
1291 mask =
static_cast<UShort_t
>(localMask->
ValueAsInt(connector,0));
1294 if (maskDA != mask) {
1297 for (Int_t iBit = 0; iBit < 16; iBit++) {
1298 if (((maskDA >> iBit) & 0x1) != ((mask >> iBit) &0x1)) {
1306 printf(
"LOCAL mask bits changed = %5d (%7.3f %%) \n",nMaskBitsChanged,100*(Float_t)nMaskBitsChanged/(Float_t)nMaskBits);
1340 int main(Int_t argc, Char_t **argv)
1345 gROOT->GetPluginManager()->AddHandler(
"TVirtualStreamerInfo",
"*",
"TStreamerInfo",
"RIO",
"TStreamerInfo()");
1347 printf(
"MTRda version v.23102015.01 \n");
1351 printf(
"Wrong number of arguments\n");
1357 Char_t inputFile[256] =
"";
1360 if (argv[1] != NULL) {
1361 strncpy(inputFile, argv[1], 256);
1363 printf(
"MTRda : No input File !\n");
1371 Int_t nDateEvents = 0;
1383 TArrayS xPattern(4);
1384 TArrayS yPattern(4);
1385 Int_t localBoardId = 0;
1389 timers.Start(kTRUE);
1393 printf(
"Import from DB failed\n");
1394 printf(
"For local test set DAQDA_TEST_DIR to the local directory where the Mtg files are located \n");
1402 TString tmp(inputFile);
1403 Int_t pos1 = tmp.First(
'd');
1404 Int_t pos2 = tmp.Last(
'.');
1405 Int_t len = pos2 - (pos1+3);
1406 tmp = tmp(pos1+3,len);
1407 gSystem->Setenv(
"DATE_RUN_NUMBER",tmp.Data());
1408 gSystem->Exec(
"echo \"DATE_RUN_NUMBER = \" $DATE_RUN_NUMBER");
1412 printf(
"ExportFiles failed\n");
1417 Bool_t modeFET3 = kTRUE;
1419 printf(
"FET is not in mode 3. Only PHYSICS events will be analysed (noisy channels)\n");
1426 printf(
"The MTS proxy does not control all global cards\n");
1432 printf(
"Global masks are not ON\n");
1437 const Char_t* tableSOD[] = {
"ALL",
"yes",
"CAL",
"all", NULL, NULL};
1438 monitorDeclareTable(const_cast<char**>(tableSOD));
1441 status = monitorSetDataSource(inputFile);
1443 cerr <<
"ERROR : monitorSetDataSource status (hex) = " << hex << status
1444 <<
" " << monitorDecodeError(status) << endl;
1448 status = monitorDeclareMp(
"MUON Trigger monitoring");
1450 cerr <<
"ERROR : monitorDeclareMp status (hex) = " << hex << status
1451 <<
" " << monitorDecodeError(status) << endl;
1457 monitorSetNoWaitNetworkTimeout(1000);
1459 cout <<
"MTRda : Reading data from file " << inputFile <<endl;
1461 UInt_t nCalibEvents;
1465 Bool_t overFlow, firstCalibEvent = kTRUE;
1468 const Int_t nCathodes = 2;
1469 UInt_t locLptScaler[nLocBoards];
1470 ULong64_t locStripScaler[nTriChambers][nLocBoards][nCathodes];
1471 UInt_t locStripOver[nTriChambers][nLocBoards][nCathodes];
1473 const Int_t bufflen =
1475 nLocBoards*
sizeof(UInt_t)+
1476 nLocBoards*nCathodes*nTriChambers*(
sizeof(UInt_t)+
sizeof(ULong64_t));
1477 UChar_t buffer[bufflen];
1483 for (Int_t bit = 0; bit < 6; bit++) {
1486 for (Int_t iLoc = 0; iLoc < nLocBoards; iLoc++) {
1487 locLptScaler[iLoc] = 0;
1488 for (Int_t iCath = 0; iCath < nCathodes; iCath++) {
1489 for (Int_t iCha = 0; iCha < nTriChambers; iCha++) {
1490 locStripScaler[iCha][iLoc][iCath] = 0;
1491 locStripOver[iCha][iLoc][iCath] = 0;
1497 Bool_t writeScalers = kFALSE;
1499 UInt_t *globalInput =
new UInt_t[4];
1500 Bool_t doUpdate = kFALSE;
1501 Int_t runNumber = 0;
1508 struct eventHeaderStruct *event(0x0);
1511 if (nEvents && nEvents % 1000 == 0)
1512 cout<<
"Cumulated events " << nEvents << endl;
1515 if (daqDA_checkShutdown()) {
1523 status = monitorGetEventDynamic((
void**)&event);
1529 status = monitorGetEventDynamic((
void**)&event);
1531 cout <<
"MTRda : EOF found" << endl;
1539 AliRawReader *rawReader =
new AliRawReaderDate(event);
1541 Int_t eventType = rawReader->GetType();
1542 runNumber = rawReader->GetRunNumber();
1551 if (eventType == PHYSICS_EVENT) {
1555 }
else if (modeFET3 && eventType == CALIBRATION_EVENT) {
1591 while((status = rawStream->
NextDDL())) {
1602 if (cfg.
SaveScalers() && (eventType == CALIBRATION_EVENT)) {
1604 if (firstCalibEvent) {
1607 firstCalibEvent = kFALSE;
1617 for (Int_t bit = 0; bit < 6; bit++) {
1618 glSc[bit] += (double)(*(globScaler+bit));
1625 Int_t nReg = (Int_t)static_cast<AliMUONRawStreamTriggerHP*>(rawStream)->GetRegionalHeaderCount();
1626 for(Int_t iReg = 0; iReg < nReg; iReg++) {
1628 Int_t nLoc = (Int_t)static_cast<AliMUONRawStreamTriggerHP*>(rawStream)->GetLocalStructCount(iReg);
1629 for(Int_t iLoc = 0; iLoc < nLoc; iLoc++) {
1632 if (localBoardId > 0) {
1639 if (cfg.
SaveScalers() && (eventType == CALIBRATION_EVENT)) {
1642 if(localBoardId <= nLocBoards) {
1643 locLptScaler[localBoardId-1] +=
1648 for (Int_t ibitxy = 0; ibitxy < 16; ++ibitxy) {
1649 UInt_t scalerVal[4] = {
1650 localStructHP->
GetXY1(ibitxy),
1651 localStructHP->
GetXY2(ibitxy),
1652 localStructHP->
GetXY3(ibitxy),
1653 localStructHP->
GetXY4(ibitxy)
1656 for(Int_t ich = 0; ich < nTriChambers; ich++) {
1658 if (scalerVal[ich] < 0xffff/2) {
1659 locStripScaler[ich][localBoardId-1][cathode] += 2*scalerVal[ich];
1661 locStripOver[ich][localBoardId-1][cathode]++;
1679 for(Int_t iReg = 0; iReg < nReg; iReg++) {
1683 for(Int_t iLoc = 0; iLoc < nLoc; iLoc++) {
1686 if (localBoardId > 0) {
1697 if (rawStream->
GetDDL() == 0) {
1706 printf(
"MTRda: write scalers after %d events\n",nEvents);
1707 writeScalers = kTRUE;
1710 buffer[ibw++] = (nCalibEvents >> 24) & 0xff;
1711 buffer[ibw++] = (nCalibEvents >> 16) & 0xff;
1712 buffer[ibw++] = (nCalibEvents >> 8) & 0xff;
1713 buffer[ibw++] = (nCalibEvents >> 0) & 0xff;
1714 buffer[ibw++] = ((UInt_t)(deltaT+0.5) >> 24) & 0xff;
1715 buffer[ibw++] = ((UInt_t)(deltaT+0.5) >> 16) & 0xff;
1716 buffer[ibw++] = ((UInt_t)(deltaT+0.5) >> 8) & 0xff;
1717 buffer[ibw++] = ((UInt_t)(deltaT+0.5) >> 0) & 0xff;
1718 printf(
"MTRda: calib events %u time %f \n",nCalibEvents,deltaT);
1719 for (Int_t bit = 0; bit < 6; bit++) {
1720 buffer[ibw++] = (glSc[bit] >> 24) & 0xff;
1721 buffer[ibw++] = (glSc[bit] >> 16) & 0xff;
1722 buffer[ibw++] = (glSc[bit] >> 8) & 0xff;
1723 buffer[ibw++] = (glSc[bit] >> 0) & 0xff;
1727 for (Int_t iLoc = 0; iLoc < nLocBoards; iLoc++) {
1728 buffer[ibw++] = (locLptScaler[iLoc] >> 24) & 0xff;
1729 buffer[ibw++] = (locLptScaler[iLoc] >> 16) & 0xff;
1730 buffer[ibw++] = (locLptScaler[iLoc] >> 8) & 0xff;
1731 buffer[ibw++] = (locLptScaler[iLoc] >> 0) & 0xff;
1732 for (Int_t iCath = 0; iCath < nCathodes; iCath++) {
1733 for (Int_t iCha = 0; iCha < nTriChambers; iCha++) {
1736 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 56) & 0xff;
1737 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 48) & 0xff;
1738 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 40) & 0xff;
1739 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 32) & 0xff;
1740 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 24) & 0xff;
1741 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 16) & 0xff;
1742 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 8) & 0xff;
1743 buffer[ibw++] = (locStripScaler[iCha][iLoc][iCath] >> 0) & 0xff;
1745 buffer[ibw++] = (locStripOver[iCha][iLoc][iCath] >> 24) & 0xff;
1746 buffer[ibw++] = (locStripOver[iCha][iLoc][iCath] >> 16) & 0xff;
1747 buffer[ibw++] = (locStripOver[iCha][iLoc][iCath] >> 8) & 0xff;
1748 buffer[ibw++] = (locStripOver[iCha][iLoc][iCath] >> 0) & 0xff;
1752 printf(
"MTRda: write to buffer %d bytes.\n",ibw);
1753 fwrite(buffer,ibw,1,fsc);
1757 for (Int_t bit = 0; bit < 6; bit++) {
1760 for (Int_t iLoc = 0; iLoc < nLocBoards; iLoc++) {
1761 locLptScaler[iLoc] = 0;
1762 for (Int_t iCath = 0; iCath < nCathodes; iCath++) {
1763 for (Int_t iCha = 0; iCha < nTriChambers; iCha++) {
1764 locStripScaler[iCha][iLoc][iCath] = 0;
1765 locStripOver[iCha][iLoc][iCath] = 0;
1793 printf(
"ExportTRIGSCAL failed\n");
1802 status = daqDA_FES_storeFile(
fileExp.Data(),
"EXPORTED");
1811 cout <<
"MTRda: DA enable: " << cfg.
GetDAFlag() << endl;
1812 cout <<
"MTRda: Run number: " << runNumber << endl;
1813 cout <<
"MTRda: Nb of DATE events: " << nDateEvents << endl;
1814 cout <<
"MTRda: Nb of events used: " << nEvents << endl;
1815 cout <<
"MTRda: Nb of events used (noise): " << cfg.
GetEventsN() << endl;
1816 cout <<
"MTRda: Nb of events used (deadc): " << cfg.
GetEventsD() << endl;
1817 cout <<
"MTRda: Minumum nr of events for rate calculation: " << cfg.
GetMinEvents() << endl;
1818 cout <<
"MTRda: Maximum nr of analyzed events: " << cfg.
GetMaxEvents() << endl;
1819 cout <<
"MTRda: Skip events from start: " << cfg.
GetSkipEvents() << endl;
1820 cout <<
"MTRda: Threshold for global noisy inputs: " << 100*cfg.
GetThrN() <<
"%" << endl;
1821 cout <<
"MTRda: Threshold for global dead inputs: " << 100*cfg.
GetThrD() <<
"%" << endl;
1822 cout <<
"MTRda: Threshold for local noisy inputs: " << 100*cfg.
GetThrLocN() <<
"%" << endl;
1823 cout <<
"MTRda: Threshold for local dead inputs: " << 100*cfg.
GetThrLocD() <<
"%" << endl;
1824 cout <<
"MTRda: Print level: " << cfg.
GetPrintLevel() << endl;
1825 cout <<
"MTRda: Show decoder warnings: " << cfg.
WithWarnings() << endl;
1826 cout <<
"MTRda: Use the fast decoder: " << cfg.
UseFastDecoder() << endl;
1827 cout <<
"MTRda: DA mode (1=GLOBAL, 2=GLOBAL+LOCAL): " << cfg.
GetDAMode() << endl;
1828 cout <<
"MTRda: Save scalers: " << cfg.
SaveScalers() << endl;
1830 cout <<
"MTRda: Time to record scalers: " << cfg.
GetScalerRecTime() <<
" seconds" << endl;
1833 printf(
"MTRda: 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.
length in bits of a global input word
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
number of global input words
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.
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
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