1 /**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * All rights reserved. *
6 * Artur Szostak <artursz@iafrica.com> *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
20 /// @file AliHLTMUONTriggerCalibratorComponent.cxx
21 /// @author Artur Szostak <artursz@iafrica.com>
23 /// @brief Implementation of the AliHLTMUONTriggerCalibratorComponent class.
26 #include "AliHLTMUONTriggerCalibratorComponent.h"
27 #include "AliHLTMUONConstants.h"
28 #include "AliHLTMUONUtils.h"
30 ClassImp(AliHLTMUONTriggerCalibratorComponent);
32 ///////////////////////////////////////////////////////////////////////////////
33 // The code from here on was copied from MUONTRGda.cxx and addapted to the
35 //TODO: test that any of this actually works and clean up the code.
36 ///////////////////////////////////////////////////////////////////////////////
46 #include "AliRawDataHeader.h"
47 #include "AliRawReaderMemory.h"
48 #include "AliMpConstants.h"
49 #include "AliMUONRawStreamTrigger.h"
50 #include "AliMUONDarcHeader.h"
51 #include "AliMUONRegHeader.h"
52 #include "AliMUONLocalStruct.h"
53 #include "AliMUONDDLTrigger.h"
54 #include "AliMUONVCalibParam.h"
55 #include "AliMUONVStore.h"
56 #include "AliMUONCalibParamND.h"
57 #include "AliMUONCalibParamNI.h"
58 #include "AliMUON1DArray.h"
59 #include "AliMUONTriggerIO.h"
64 #include "TStopwatch.h"
66 #include "TTimeStamp.h"
68 #include "TPluginManager.h"
78 const Int_t gkNLocalBoard = AliMpConstants::NofLocalBoards();
80 TString gCommand("ped");
82 TString gCurrentFileName("MtgCurrent.dat");
83 TString gLastCurrentFileName("MtgLastCurrent.dat");
91 TString gGlobalFileName;
92 TString gRegionalFileName;
93 TString gLocalMaskFileName;
94 TString gLocalLutFileName;
95 TString gSignatureFileName;
97 Int_t gGlobalFileVersion;
98 Int_t gRegionalFileVersion;
99 Int_t gLocalMaskFileVersion;
100 Int_t gLocalLutFileVersion;
101 Int_t gSignatureFileVersion;
103 Int_t gGlobalFileLastVersion;
104 Int_t gRegionalFileLastVersion;
105 Int_t gLocalMaskFileLastVersion;
106 Int_t gLocalLutFileLastVersion;
108 UInt_t gRunNumber = 0;
111 Int_t gPrintLevel = 0;
113 AliMUONVStore* gLocalMasks = NULL;
114 AliMUONVStore* gRegionalMasks = NULL;
115 AliMUONVCalibParam* gGlobalMasks = NULL;
117 AliMUONTriggerIO gTriggerIO;
119 AliMUONVStore* gPatternStore = NULL;
121 TString gHistoFileName = "";
123 Float_t gkThreshold = 0.2;
125 }; // end of namespace
127 //__________________________________________________________________
128 void UpdateLocalMask(Int_t localBoardId, Int_t connector, Int_t strip)
132 AliMUONVCalibParam* localMask =
133 static_cast<AliMUONVCalibParam*>(gLocalMasks->FindObject(localBoardId));
135 UShort_t mask = localMask->ValueAsInt(connector,0);
137 mask ^= (0x1 << strip); // set strip mask to zero
139 localMask->SetValueAsInt(connector,0, mask);
142 //__________________________________________________________________
143 void WriteLastCurrentFile(TString currentFile = gLastCurrentFileName)
145 if (gSodName.IsNull()) gSodName = "SOD";
146 if (gDAName.IsNull()) gDAName = "MTG";
147 if (gGlobalFileName.IsNull()) gGlobalFileName = "global.dat";
148 if (gRegionalFileName.IsNull()) gRegionalFileName = "regional.dat";
149 if (gLocalMaskFileName.IsNull()) gLocalMaskFileName = "localMask.dat";
150 if (gLocalLutFileName.IsNull()) gLocalLutFileName = "localLut.dat";
151 if (gSignatureFileName.IsNull()) gSignatureFileName = "signature.dat";
153 // write last current file
157 out.open(file.Data());
158 out << gSodName << " " << gSodFlag << endl;
159 out << gDAName << " " << gDAFlag << endl;
161 out << gGlobalFileName << " " << gGlobalFileVersion << endl;
162 out << gRegionalFileName << " " << gRegionalFileVersion << endl;
163 out << gLocalMaskFileName << " " << gLocalMaskFileVersion << endl;
164 out << gLocalLutFileName << " " << gLocalLutFileVersion << endl;
165 out << gSignatureFileName << " " << gSignatureFileVersion << endl;
170 //___________________________________________________________________________________________
171 Bool_t ReadCurrentFile(TString currentFile = gCurrentFileName, Bool_t lastCurrentFlag = false)
174 // read last current file name and version
180 std::ifstream in(gSystem->ExpandPathName(file.Data()));
182 printf("Cannot open last current file %s\n",currentFile.Data());
189 sscanf(line, "%s %d", name, &gSodFlag);
191 if (gPrintLevel) printf("Sod Flag %d\n", gSodFlag);
195 sscanf(line, "%s %d", name, &gDAFlag);
197 if (gPrintLevel) printf("DA Flag: %d\n", gDAFlag);
203 Int_t pos = tmp.First(" ");
204 gGlobalFileName = tmp(0, pos);
206 if (!lastCurrentFlag) {
207 gGlobalFileVersion = atoi(tmp(pos+1, tmp.Length()-pos).Data());
208 if (gPrintLevel) printf("Global File Name: %s version: %d\n",
209 gGlobalFileName.Data(), gGlobalFileVersion);
211 gGlobalFileLastVersion = atoi(tmp(pos+1, tmp.Length()-pos).Data());
212 if (gPrintLevel) printf("Global File Name: %s last version: %d\n",
213 gGlobalFileName.Data(), gGlobalFileLastVersion);
219 pos = tmp.First(" ");
220 gRegionalFileName = tmp(0, pos);
222 if (!lastCurrentFlag) {
223 gRegionalFileVersion = atoi(tmp(pos+1, tmp.Length()-pos).Data());
224 if (gPrintLevel) printf("Regional File Name: %s version: %d\n",
225 gRegionalFileName.Data(), gRegionalFileVersion);
228 gRegionalFileLastVersion = atoi(tmp(pos+1, tmp.Length()-pos).Data());
229 if (gPrintLevel) printf("Regional File Name: %s last version: %d\n",
230 gRegionalFileName.Data(), gRegionalFileLastVersion);
236 pos = tmp.First(" ");
237 gLocalMaskFileName = tmp(0, pos);
239 if (!lastCurrentFlag) {
240 gLocalMaskFileVersion = atoi(tmp(pos+1, tmp.Length()-pos).Data());
241 if (gPrintLevel) printf("Mask File Name: %s version: %d\n",
242 gLocalMaskFileName.Data(), gLocalMaskFileVersion);
244 gLocalMaskFileLastVersion = atoi(tmp(pos+1, tmp.Length()-pos).Data());
245 if (gPrintLevel) printf("Mask File Name: %s last version: %d\n",
246 gLocalMaskFileName.Data(), gLocalMaskFileLastVersion);
251 pos = tmp.First(" ");
252 gLocalLutFileName = tmp(0, pos);
254 if (!lastCurrentFlag) {
255 gLocalLutFileVersion = atoi(tmp(pos+1, tmp.Length()-pos).Data());
256 if (gPrintLevel) printf("Lut File Name: %s version: %d\n",
257 gLocalLutFileName.Data(), gLocalLutFileVersion);
259 gLocalLutFileLastVersion = atoi(tmp(pos+1, tmp.Length()-pos).Data());
260 if (gPrintLevel) printf("Lut File Name: %s last version: %d\n",
261 gLocalLutFileName.Data(), gLocalLutFileLastVersion);
266 pos = tmp.First(" ");
267 gSignatureFileName = tmp(0, pos);
268 gSignatureFileVersion = atoi(tmp(pos+1, tmp.Length()-pos).Data());
269 if (gPrintLevel) printf("Lut File Name: %s version: %d\n",
270 gSignatureFileName.Data(), gSignatureFileVersion);
278 // if last current file does not exist than read current file
279 if (!ReadCurrentFile(gLastCurrentFileName, true))
281 ReadCurrentFile(gCurrentFileName, true);
282 WriteLastCurrentFile();
285 // any case read current file
294 // Export files to FES
295 // Export files to DB not yet done, waiting for a version > 1.2 of daqDAlib
296 // env variables have to be set (suppose by ECS ?)
297 // setenv DATE_FES_PATH
298 // setenv DATE_RUN_NUMBER
299 // setenv DATE_ROLE_NAME
300 // setenv DATE_DETECTOR_CODE
302 // to be sure that env variable is set
303 gSystem->Setenv("DAQDALIB_PATH", "$DATE_SITE/infoLogger");
308 Bool_t modified = false;
311 TString fileExp("ExportedFiles.dat");
314 out.open(fileExp.Data());
316 printf("Failed to create file: %s\n",file.Data());
320 if (gGlobalFileLastVersion != gGlobalFileVersion) {
321 file = gGlobalFileName.Data();
322 // status = daqDA_FES_storeFile(file.Data(), file.Data());
325 printf("Failed to export file: %s\n",gGlobalFileName.Data());
328 out << gGlobalFileName.Data() << endl;
329 if(gPrintLevel) printf("Export file: %s\n",gGlobalFileName.Data());
332 if (gLocalMaskFileLastVersion != gLocalMaskFileVersion) {
334 file = gLocalMaskFileName;
335 // status = daqDA_FES_storeFile(file.Data(), file.Data());
338 printf("Failed to export file: %s\n",gLocalMaskFileName.Data());
341 if(gPrintLevel) printf("Export file: %s\n",gLocalMaskFileName.Data());
342 out << gLocalMaskFileName.Data() << endl;
345 if (gLocalLutFileLastVersion != gLocalLutFileVersion) {
346 file = gLocalLutFileName;
348 // status = daqDA_FES_storeFile(file.Data(), file.Data());
351 printf("Failed to export file: %s\n",gLocalLutFileName.Data());
354 if(gPrintLevel) printf("Export file: %s\n",gLocalLutFileName.Data());
355 out << gLocalLutFileName.Data() << endl;
359 // exported regional file whenever mask or/and Lut are modified
360 if ( (gRegionalFileLastVersion != gRegionalFileVersion) || modified) {
361 file = gRegionalFileName;
362 // status = daqDA_FES_storeFile(file.Data(), file.Data());
365 printf("Failed to export file: %s\n",gRegionalFileName.Data());
368 if(gPrintLevel) printf("Export file: %s\n",gRegionalFileName.Data());
369 out << gRegionalFileName.Data() << endl;
374 // export Exported file to FES anyway
375 // status = daqDA_FES_storeFile(fileExp.Data(), fileExp.Data());
378 printf("Failed to export file: %s\n", fileExp.Data());
381 if(gPrintLevel) printf("Export file: %s\n",fileExp.Data());
389 // copy locally a file from daq detector config db
390 // The current detector is identified by detector code in variable
391 // DATE_DETECTOR_CODE. It must be defined.
392 // If environment variable DAQDA_TEST_DIR is defined, files are copied from DAQDA_TEST_DIR
393 // instead of the database. The usual environment variables are not needed.
395 // to be sure that env variable is set
396 gSystem->Setenv("DAQDALIB_PATH", "$DATE_SITE/db");
400 // status = daqDA_DB_getFile(gCurrentFileName.Data(), gCurrentFileName.Data());
403 printf("Failed to get current config file from DB: %s\n",gCurrentFileName.Data());
409 // status = daqDA_DB_getFile(gGlobalFileName.Data(), gGlobalFileName.Data());
412 printf("Failed to get current config file from DB: %s\n", gGlobalFileName.Data());
416 // status = daqDA_DB_getFile(gRegionalFileName.Data(), gRegionalFileName.Data());
419 printf("Failed to get current config file from DB: %s\n",gRegionalFileName.Data());
423 // status = daqDA_DB_getFile(gLocalMaskFileName.Data(), gLocalMaskFileName.Data());
426 printf("Failed to get current config file from DB: %s\n",gLocalMaskFileName.Data());
430 // status = daqDA_DB_getFile(gLocalLutFileName.Data(), gLocalLutFileName.Data());
433 printf("Failed to get current config file from DB: %s\n",gLocalLutFileName.Data());
441 void MakePattern(Int_t localBoardId, TArrayS& xPattern, TArrayS& yPattern)
444 // calculate the hit map for each strip in x and y direction
445 AliMUONVCalibParam* pat =
446 static_cast<AliMUONVCalibParam*>(gPatternStore->FindObject(localBoardId));
449 pat = new AliMUONCalibParamND(2, 64, localBoardId, 0,0.); // put default wise 0.
450 gPatternStore->Add(pat);
453 for (Int_t i = 0; i < 4; ++i) {
454 for (Int_t j = 0; j < 16; ++j) {
456 Int_t xMask = xPattern[i];
457 Int_t yMask = yPattern[i];
459 Int_t index = 16*i + j;
460 Double_t patOcc = 0.;
462 if ( (xMask >> j ) & 0x1 ) {
463 patOcc = pat->ValueAsDouble(index, 0) + 1.;
464 pat->SetValueAsDouble(index, 0, patOcc);
466 if ( (yMask >> j ) & 0x1 ) {
467 patOcc = pat->ValueAsDouble(index, 0) + 1.;
468 pat->SetValueAsDouble(index, 0, patOcc);
476 void MakePatternStore(Bool_t pedestal = true)
479 // calculates the occupancy (option: store in a root file)
480 // check noisy strip (pedestal true, software trigger)
481 // check dead channel (pesdetal false, FET trigger)
483 Int_t localBoardId = 0;
484 Bool_t updated = false;
491 TH1F* xOccHisto[243];
492 TH1F* yOccHisto[243];
493 TH1F* xPatOccHisto = 0x0;
494 TH1F* yPatOccHisto = 0x0;
496 TFile* histoFile = 0x0;
498 if (gHistoFileName[0] != 0) {
499 histoFile = new TFile(gHistoFileName,"RECREATE","MUON Tracking pedestals");
501 sprintf(name,"pat_x");
502 sprintf(title,"Occupancy for x strip");
506 xPatOccHisto = new TH1F(name,title,nx,xmin,xmax);
507 xPatOccHisto ->SetDirectory(histoFile);
509 sprintf(name,"pat_y");
510 sprintf(title,"Occupancy for y strip");
511 yPatOccHisto = new TH1F(name,title,nx,xmin,xmax);
512 yPatOccHisto->SetDirectory(histoFile);
516 // iterator over pedestal
517 TIter next(gPatternStore->CreateIterator());
518 AliMUONVCalibParam* pat;
520 while ( ( pat = dynamic_cast<AliMUONVCalibParam*>(next() ) ) )
522 localBoardId = pat->ID0();
524 if (gHistoFileName[0] != 0) {
530 sprintf(name,"pat_x_%d",localBoardId);
531 sprintf(title,"Occupancy for x strip, board %d",localBoardId);
532 xOccHisto[localBoardId] = new TH1F(name,title,nx,xmin,xmax);
534 sprintf(name,"pat_y_%d",localBoardId);
535 sprintf(title,"Occupancy for y strip, board %d",localBoardId);
536 yOccHisto[localBoardId] = new TH1F(name,title,nx,xmin,xmax);
540 for (Int_t index = 0; index < pat->Size() ; ++index) {// 64 bits for X and 64 bits for Y strips
542 Double_t patXOcc = pat->ValueAsDouble(index, 0)/(Double_t)gNEvents;
543 Double_t patYOcc = pat->ValueAsDouble(index, 1)/(Double_t)gNEvents;
545 pat->SetValueAsDouble(index, 0, patXOcc);
546 pat->SetValueAsDouble(index, 1, patYOcc);
550 if ( (patXOcc > gkThreshold && pedestal) || (patXOcc < 1.- gkThreshold && !pedestal) ) {
551 UShort_t strip = index % 16;
552 Int_t connector = index/16;
553 UpdateLocalMask(localBoardId, connector, strip);
558 if ( (patYOcc > gkThreshold && pedestal) || (patYOcc < 1.- gkThreshold && !pedestal) ) {
559 UShort_t strip = index % 16;
560 Int_t connector = index/16 + 4;
561 UpdateLocalMask(localBoardId, connector, strip);
566 if (gHistoFileName[0] != 0) {
567 xPatOccHisto->Fill(patXOcc);
568 yPatOccHisto->Fill(patYOcc);
569 xOccHisto[localBoardId]->Fill(index, patXOcc);
570 yOccHisto[localBoardId]->Fill(index, patYOcc);
576 if (gHistoFileName[0] != 0) {
584 gLocalMaskFileVersion++;
586 TString tmp(gLocalMaskFileName);
587 Int_t pos = tmp.First("-");
588 gLocalMaskFileName = tmp(0,pos+1) + Form("%d",gLocalMaskFileVersion) + ".dat";
590 // write last current file
591 WriteLastCurrentFile();
593 gTriggerIO.WriteMasks(gLocalMaskFileName, gRegionalFileName, gGlobalFileName, gLocalMasks, gRegionalMasks, gGlobalMasks);
598 AliHLTMUONTriggerCalibratorComponent::AliHLTMUONTriggerCalibratorComponent() :
599 AliHLTCalibrationProcessor(),
603 /// Default contructor.
607 AliHLTMUONTriggerCalibratorComponent::~AliHLTMUONTriggerCalibratorComponent()
609 /// Default destructor.
613 const char* AliHLTMUONTriggerCalibratorComponent::GetComponentID()
615 /// Inherited from AliHLTComponent.
616 /// Returns the component ID string for this component type.
618 return AliHLTMUONConstants::TriggerCalibratorId();
622 void AliHLTMUONTriggerCalibratorComponent::GetInputDataTypes(
623 vector<AliHLTComponentDataType>& list
626 /// Inherited from AliHLTComponent.
627 /// Returns the list of input block types expected by this component.
630 list.push_back( AliHLTMUONConstants::TriggerDDLRawDataType() );
634 AliHLTComponentDataType AliHLTMUONTriggerCalibratorComponent::GetOutputDataType()
636 /// Inherited from AliHLTComponent.
637 /// Returns the type of output block generated by this component.
640 return AliHLTMUONConstants::TriggerDDLRawDataType();
644 void AliHLTMUONTriggerCalibratorComponent::GetOutputDataSize(
645 unsigned long& constBase, double& inputMultiplier
648 /// Inherited from AliHLTComponent.
649 /// Returns an estimate of the expected output data size.
652 inputMultiplier = 2.; //TODO: is this the correct estimate.
656 AliHLTComponent* AliHLTMUONTriggerCalibratorComponent::Spawn()
658 /// Inherited from AliHLTComponent.
659 /// Creates a new instance of AliHLTMUONTriggerCalibratorComponent.
661 return new AliHLTMUONTriggerCalibratorComponent();
665 Int_t AliHLTMUONTriggerCalibratorComponent::ScanArgument(int argc, const char** argv)
667 /// Inherited from AliHLTCalibrationProcessor.
668 /// Parses the command line parameters.
670 TString arg = argv[0];
672 if (arg.CompareTo("-h") == 0)
674 HLTInfo("******************* usage **********************");
675 HLTInfo("The available options are :");
676 HLTInfo("-h help (this screen)");
679 HLTInfo("-r <root file> (default = %s)", gHistoFileName.Data());
682 HLTInfo("-t <threshold values> (default = %3.1f)", gkThreshold);
683 HLTInfo("-d <print level> (default = %d)", gPrintLevel);
684 HLTInfo("-s <skip events> (default = %d)", fSkipEvents);
685 HLTInfo("-n <max events> (default = %d)", fMaxEvents);
686 HLTInfo("-e <execute ped/calib> (default = %s)", gCommand.Data());
687 return 0; // Zero parameters parsed.
690 if (arg.CompareTo("-t") == 0)
692 if (argc < 2) return -EPROTO;
693 gkThreshold = atof(argv[1]);
694 return 1; // 1 parameter parsed.
696 if (arg.CompareTo("-e") == 0)
698 if (argc < 2) return -EPROTO;
700 gCommand.ToLower(); // set command to lower case
701 return 1; // 1 parameter parsed.
703 if (arg.CompareTo("-d") == 0)
705 if (argc < 2) return -EPROTO;
706 gPrintLevel = atoi(argv[1]);
707 return 1; // 1 parameter parsed.
709 if (arg.CompareTo("-s") == 0)
711 if (argc < 2) return -EPROTO;
712 fSkipEvents = atoi(argv[1]);
713 return 1; // 1 parameter parsed.
715 if (arg.CompareTo("-n") == 0)
717 if (argc < 2) return -EPROTO;
718 fMaxEvents = atoi(argv[1]);
719 return 1; // 1 parameter parsed.
721 if (arg.CompareTo("-r") == 0)
723 if (argc < 2) return -EPROTO;
724 gHistoFileName = argv[1];
725 return 1; // 1 parameter parsed.
728 // Do not know what this argument is so return an error code.
729 HLTError("Bad argument %s (please check with -h)", arg.Data());
734 Int_t AliHLTMUONTriggerCalibratorComponent::InitCalibration()
736 /// Inherited from AliHLTCalibrationProcessor.
737 /// Initialise the calibration component.
739 // comment out, since we do not retrieve files from database
742 HLTError("Import from DB failed");
743 HLTError("For local test set DAQDA_TEST_DIR to the local directory where the Mtg files are located.");
749 if(!ExportFiles()) return -1;
755 gLocalMasks = new AliMUON1DArray(gkNLocalBoard+9);
756 gRegionalMasks = new AliMUON1DArray(16);
757 gGlobalMasks = new AliMUONCalibParamNI(1,2,1,0,0);
758 gPatternStore = new AliMUON1DArray(gkNLocalBoard+9);
760 TString localFile = gLocalMaskFileName;
761 TString regionalFile = gRegionalFileName;
762 TString globalFile = gGlobalFileName;
764 gTriggerIO.ReadMasks(localFile.Data(), regionalFile.Data(), globalFile.Data(),
765 gLocalMasks, gRegionalMasks, gGlobalMasks, false);
771 Int_t AliHLTMUONTriggerCalibratorComponent::DeinitCalibration()
773 /// Inherited from AliHLTCalibrationProcessor.
774 /// Cleanup the calibration component releasing allocated memory.
777 delete gRegionalMasks;
778 delete gGlobalMasks; // in case
779 delete gPatternStore;
781 gRegionalMasks = NULL;
783 gPatternStore = NULL;
789 Int_t AliHLTMUONTriggerCalibratorComponent::ProcessCalibration(
790 const AliHLTComponentEventData& /*evtData*/,
791 AliHLTComponentTriggerData& /*trigData*/
794 /// Inherited from AliHLTCalibrationProcessor.
795 /// Perform a calibration procedure on the new event.
797 // Skip Events if needed
804 // Do not process more than fMaxEvents.
805 if (gNEvents >= fMaxEvents) return 0;
806 if (gNEvents && gNEvents % 100 == 0)
807 HLTInfo("Cumulated events %d", gNEvents);
811 gRunNumber = GetRunNo();
814 Int_t eventType = GetRunType();
815 if (eventType != 7) // PHYSICS_EVENT - from event.h (DATE software)
817 HLTWarning("This event is not a physics event");
825 AliMUONDDLTrigger* ddlTrigger = 0x0;
826 AliMUONDarcHeader* darcHeader = 0x0;
827 AliMUONRegHeader* regHeader = 0x0;
828 AliMUONLocalStruct* localStruct = 0x0;
830 const AliHLTComponentBlockData* iter = NULL;
832 // Loop over all DDL raw data input blocks and decode the event.
833 iter = GetFirstInputBlock( AliHLTMUONConstants::TriggerDDLRawDataType() );
837 // decoding rawdata headers
838 AliRawReaderMemory* rawReader = new AliRawReaderMemory(
839 reinterpret_cast<UChar_t*>(iter->fPtr), iter->fSize
841 rawReader->SetEquipmentID(AliHLTMUONUtils::SpecToEquipId(iter->fSpecification));
843 // decoding MUON payload
844 AliMUONRawStreamTrigger* rawStream = new AliMUONRawStreamTrigger(rawReader);
845 //rawStream->SetMaxReg(1);
849 while((status = rawStream->NextDDL()))
851 if (gPrintLevel) HLTInfo("iDDL %d", rawStream->GetDDL());
853 ddlTrigger = rawStream->GetDDLTrigger();
854 darcHeader = ddlTrigger->GetDarcHeader();
856 if (gPrintLevel) HLTInfo("Global output %x", (Int_t)darcHeader->GetGlobalOutput());
858 // loop over regional structures
859 Int_t nReg = darcHeader->GetRegHeaderEntries();
860 for(Int_t iReg = 0; iReg < nReg; ++iReg)
862 if (gPrintLevel) HLTInfo("RegionalId %d", iReg);
864 regHeader = darcHeader->GetRegHeaderEntry(iReg);
866 // loop over local structures
867 Int_t nLocal = regHeader->GetLocalEntries();
868 for(Int_t iLocal = 0; iLocal < nLocal; ++iLocal)
870 localStruct = regHeader->GetLocalEntry(iLocal);
872 Int_t localBoardId = gTriggerIO.LocalBoardId(index++);
873 if (gPrintLevel) HLTInfo("local %d", localBoardId );
877 localStruct->GetXPattern(xPattern);
878 localStruct->GetYPattern(yPattern);
879 MakePattern(localBoardId, xPattern, yPattern);
883 HLTInfo("X pattern %x %x %x %x, Y pattern %x %x %x %x",
884 localStruct->GetX1(), localStruct->GetX2(),localStruct->GetX3(),localStruct->GetX4(),
885 localStruct->GetY1(), localStruct->GetY2(),localStruct->GetY3(),localStruct->GetY4()
895 // Get next DDL raw data input block, with the same specification as defined in GetFirstInputBlock().
896 iter = GetNextInputBlock();
899 if (gCommand.Contains("ped"))
902 if (gCommand.Contains("cal"))
903 HLTWarning("Options %s disabled", gCommand.Data());
904 // MakePatternStore(false);
909 HLTInfo("MUONTRKda : Run number : %d", gRunNumber);
910 HLTInfo("MUONTRKda : Histo file generated : %s", gHistoFileName.Data());
911 HLTInfo("MUONTRKda : Nb of events used = %d", gNEvents);
914 // PushBack data to shared memory ...
921 Int_t AliHLTMUONTriggerCalibratorComponent::ShipDataToFXS(
922 const AliHLTComponentEventData& /*evtData*/,
923 AliHLTComponentTriggerData& /*trigData*/
926 /// Inherited from AliHLTCalibrationProcessor.
927 /// Push the data to the FXS to ship off to the offline CDB.
930 // PushBack data to FXS ...
931 //PushToFXS( ..... ) ;