#include "AliMpSegmentation.h"
#include "AliMpPad.h"
#include "AliMpDDLStore.h"
+#include "AliMpManuStore.h"
#include "AliMpVPadIterator.h"
+#include "AliMpCDB.h"
+#include "AliMpDataStreams.h"
#include "AliLog.h"
fCurrentPlane(AliMp::kBendingPlane),
fCurrentDetElem(100),
fCurrentDEName(),
- fSegmentation(),
- fDDLStore(AliMpDDLStore::Instance()),
+ fkSegmentation(),
+ fDDLStore(0x0),
+ fManuStore(0x0),
fZoomMode(false)
{
/// Standard constructor
+ // Load mapping
+ if ( ! AliMpCDB::LoadDDLStore() ) {
+ AliFatal("Could not access mapping from OCDB !");
+ }
+
+ if ( ! AliMpCDB::LoadManuStore() ) {
+ AliFatal("Could not access run-dependent mapping from OCDB !");
+ }
+
+ fDDLStore = AliMpDDLStore::Instance();
+ fManuStore = AliMpManuStore::Instance();
+
fTrashList.SetOwner(kFALSE);
// Create canvas widget
fMain->MapWindow();
// instance segmentation
- fSegmentation = AliMpSegmentation::Instance()->GetMpSegmentation(fCurrentDetElem, detElem->GetCathodType(fCurrentPlane));
+ fkSegmentation = AliMpSegmentation::Instance()->GetMpSegmentation(fCurrentDetElem, detElem->GetCathodType(fCurrentPlane));
fLogMessage->AddLine("Segmentation loaded");
fLogMessage->ShowBottom();
}
EventToReal(eventX,eventY,x,y);
// get manu
- AliMpPad pad = fSegmentation->PadByPosition(TVector2(x,y), false);
+ AliMpPad pad = fkSegmentation->PadByPosition(TVector2(x,y), false);
if (!pad.IsValid()) {
return;
}
- Int_t manu = pad.GetLocation().GetFirst();
+ Int_t manu = pad.GetManuId();
fNumberEntry->SetNumber(manu);
AliMpDetElement* detElem = AliMpDEManager::GetDetElement(fCurrentDetElem);
TString nameType = detElem->GetSegType();
-
+
+ AliMpDataStreams dataStreams;
+
AliMpSlatMotifMap mm;
- AliMpSt345Reader reader(mm);
+
+ AliMpSt345Reader reader(dataStreams,&mm);
AliMpSlat* slatCurrent = reader.ReadSlat(nameType.Data(), fCurrentPlane);
AliMpSlat* slatOther = reader.ReadSlat(nameType.Data(), AliMp::OtherPlaneType(fCurrentPlane));
canvas->Clear();
AliMpDetElement* detElem = AliMpDEManager::GetDetElement(fCurrentDetElem);
- AliMp::StationType station = detElem->GetStationType();
+ AliMq::Station12Type station = detElem->GetStation12Type();
- AliMpSectorReader readerCurrent(station, fCurrentPlane);
+ AliMpDataStreams dataStreams;
+
+ AliMpSectorReader readerCurrent(dataStreams, station, fCurrentPlane);
AliMpSector* sectorCurrent = readerCurrent.BuildSector();
- AliMpSectorReader readerOther(station, AliMp::OtherPlaneType(fCurrentPlane));
+ AliMpSectorReader readerOther(dataStreams, station, AliMp::OtherPlaneType(fCurrentPlane));
AliMpSector* sectorOther = readerOther.BuildSector();
AliMpVPainter *painter = AliMpVPainter::CreatePainter(sectorCurrent);
static TVector2 padDim = br - ul;
// get DE dimension (half size)
- TVector2 deDim(fSegmentation->Dimensions()*2.0);
+ TVector2 deDim(fkSegmentation->Dimensions()*2.0);
TVector2 padReal;
Int_t firstBus = TMath::MinElement(detElem->GetNofBusPatches(), vec);
Int_t lastBus = TMath::MaxElement(detElem->GetNofBusPatches(), vec);
- detElem = AliMpDEManager::GetDetElement(fCurrentDetElem);
- Int_t numberOfSerialManu = detElem->GetNofManus(); // number of manu with an identified serial number
+ Int_t numberOfSerialManu = fManuStore->NofManus(detElem->GetId()); // number of manu with an identified serial number
fLogMessage->AddLine(Form("DrawDE: detection element: %d, name: %s",
fCurrentDetElem, fCurrentDEName.Data()));
fNumberEntry->SetNumber(fNumberEntry->GetIntNumber() - 1024);
}
DrawDE();
- fSegmentation = AliMpSegmentation::Instance()
+ fkSegmentation = AliMpSegmentation::Instance()
->GetMpSegmentation(fCurrentDetElem, detElem->GetCathodType(fCurrentPlane));
break;
fCurrentDetElem = fDEComboIdx[fDECombo->GetSelected()];
- fSegmentation = AliMpSegmentation::Instance()
+ fkSegmentation = AliMpSegmentation::Instance()
->GetMpSegmentation(fCurrentDetElem, detElem->GetCathodType(fCurrentPlane));
}
}
fNameDECombo->Select(fDEOccurrence[fCurrentDetElem]);
- fSegmentation = AliMpSegmentation::Instance()
+ fkSegmentation = AliMpSegmentation::Instance()
->GetMpSegmentation(fCurrentDetElem, detElem->GetCathodType(fCurrentPlane));
}
AliMpMotifPosition* motifPos = 0x0;
Int_t manuId = 0;
- for ( AliMpSlat::Size_t i = 0; i < slat->GetSize(); ++i ) {
+ for ( Int_t i = 0; i < slat->GetSize(); ++i ) {
AliMpPCB* pcb = slat->GetPCB(i);
- for ( AliMpPCB::Size_t j = 0; j < slat->GetPCB(i)->GetSize(); ++j ) {
+ for ( Int_t j = 0; j < slat->GetPCB(i)->GetSize(); ++j ) {
motifPos = pcb->GetMotifPosition(j);
for (Int_t iRowSeg = 0; iRowSeg < sector->GetRow(iRow)->GetNofRowSegments(); ++iRowSeg){
- for (Int_t iRowSeg = 0; iRowSeg < row->GetNofRowSegments(); ++iRowSeg) {
- AliMpVRowSegment *rowSegment = row->GetRowSegment(iRowSeg);
+ for (Int_t iRowSeg2 = 0; iRowSeg2 < row->GetNofRowSegments(); ++iRowSeg2) {
+ AliMpVRowSegment *rowSegment = row->GetRowSegment(iRowSeg2);
for (Int_t iMotif = 0; iMotif < rowSegment->GetNofMotifs(); ++iMotif){
motifPos->GetMotif()->GetPadDimensions(0).Y()*2. ));
fLogMessage->AddLine( Form("PopupManuMotif: manu: %d, serial number: %d, buspatch: %d",
- manuId,
- fDDLStore->GetDetElement(fCurrentDetElem)->GetManuSerialFromId(manuId),
- fDDLStore->GetBusPatchId(fCurrentDetElem, manuId)) );
+ manuId,
+ fManuStore->GetManuSerial(fCurrentDetElem, manuId),
+ fDDLStore->GetBusPatchId(fCurrentDetElem, manuId)) );
fLogMessage->ShowBottom();
if ( area.IsValid() )
{
- AliMpVPadIterator* iterator = fSegmentation->CreateIterator(area);
+ AliMpVPadIterator* iterator = fkSegmentation->CreateIterator(area);
if (iterator)
{
AliMpVPainter* painter = AliMpVPainter::CreatePainter(iterator);