Bool_t fRequestStation[5]; ///< kTRUE to request at least one cluster in station i to validate the track
- Double32_t fGainA1Limits[2]; //< Low and High threshold for gain a0 parameter
- Double32_t fGainA2Limits[2]; //< Low and High threshold for gain a1 parameter
- Double32_t fGainThresLimits[2]; //< Low and High threshold for gain threshold parameter
- Double32_t fHVSt12Limits[2]; //< Low and High threshold for St12 HV
- Double32_t fHVSt345Limits[2]; //< Low and High threshold for St345 HV
- Double32_t fPedMeanLimits[2]; //< Low and High threshold for pedestal mean
- Double32_t fPedSigmaLimits[2]; //< Low and High threshold for pedestal sigma
+ Double32_t fGainA1Limits[2]; ///< Low and High threshold for gain a0 parameter
+ Double32_t fGainA2Limits[2]; ///< Low and High threshold for gain a1 parameter
+ Double32_t fGainThresLimits[2]; ///< Low and High threshold for gain threshold parameter
+ Double32_t fHVSt12Limits[2]; ///< Low and High threshold for St12 HV
+ Double32_t fHVSt345Limits[2]; ///< Low and High threshold for St345 HV
+ Double32_t fPedMeanLimits[2]; ///< Low and High threshold for pedestal mean
+ Double32_t fPedSigmaLimits[2]; ///< Low and High threshold for pedestal sigma
- UInt_t fPadGoodnessMask; //< goodness mask (see AliMUONPadStatusMaker)
+ UInt_t fPadGoodnessMask; ///< goodness mask (see AliMUONPadStatusMaker)
// functions
void SetLowFluxParam();
#include "AliMpFiles.h"
#include "AliMpHelper.h"
#include "AliMpExMapIterator.h"
+#include "AliMpRegionalTriggerReader.h"
#include "AliLog.h"
#include <TArrayI.h>
#include <Riostream.h>
#include <TClass.h>
#include <TSystem.h>
+#include <TList.h>
/// \cond CLASSIMP
//______________________________________________________________________________
Int_t AliMUONRegionalTriggerConfig::ReadData(const TString& fileName)
{
-/// Load the Regional trigger from ASCII data files
-/// and return its instance
-
- TString inFileName(fileName);
- if ( inFileName == "" )
- inFileName = AliMpFiles::LocalTriggerBoardMapping();
-
- inFileName = gSystem->ExpandPathName(inFileName.Data());
-
- ifstream in(inFileName.Data(), ios::in);
+ /// Load the Regional trigger from ASCII data files
- if (!in) {
- AliErrorStream()
- << "Local Trigger Board Mapping File " << fileName.Data() << " not found" << endl;
- return kFALSE;
+ ifstream inFile(fileName.Data(), ios::in);
+ if ( ! inFile.good() ) {
+ AliErrorStream()
+ << "Local Trigger Board Mapping File " << fileName.Data() << " not found" << endl;
+ return 0;
}
- AliMUONTriggerCrateConfig* crate = 0x0;
-
- TArrayI list;
- UShort_t crateId, mask;
- Int_t mode, coincidence;
- Int_t localBoardId = 0;
- char line[80];
-
- while (!in.eof())
- {
- in.getline(line,80);
- if (!strlen(line)) break;
- TString crateName(AliMpHelper::Normalize(line));
-
- in.getline(line,80);
- sscanf(line,"%hx",&crateId);
-
- in.getline(line,80);
- sscanf(line,"%d",&mode);
-
- in.getline(line,80);
- sscanf(line,"%d",&coincidence);
-
- in.getline(line,80);
- sscanf(line,"%hx",&mask);
-
- crate = (AliMUONTriggerCrateConfig*)(fTriggerCrates.GetValue(crateName.Data()));
- if (!crate)
- {
- // cout << "Creating crate: " << crateName.Data() << endl;
- crate = new AliMUONTriggerCrateConfig(crateName.Data(), crateId, mask, mode, coincidence);
- fTriggerCrates.Add(crateName.Data(), crate);
- }
-
- Char_t localBoardName[20];
- Int_t slot;
- UInt_t switches;
-
- for ( Int_t i = 0; i < AliMpConstants::LocalBoardNofChannels(); ++i )
- {
- if ( (mask >> i ) & 0x1 )
- {
- // read local board
- in.getline(line,80);
- sscanf(line,"%02d %s %03d %03x",&slot,localBoardName,&localBoardId,&switches);
- crate->AddLocalBoard(localBoardId);
-
- // skip DEs for local board
- in.getline(line,80);
-
- // skip copy number and transverse connector
- in.getline(line,80);
- }
- }
- }
- return fTriggerCrates.GetSize();
+ TList list;
+ list.AddAt(&fTriggerCrates,0);
+
+ Int_t status = AliMpRegionalTriggerReader::ReadData(list, inFile);
+
+ if (status == -1) {
+ AliErrorStream()
+ << "Regional Trigger configuration File " << fileName.Data() << " not found" << endl;
+ return 0;
+ }
+
+ return status;
}
-
//______________________________________________________________________________
AliMUONTriggerCrateConfig* AliMUONRegionalTriggerConfig::FindTriggerCrate(TString name,
- Bool_t warn) const {
+ Bool_t warn) const
+{
/// Return trigger crate with given name
AliMUONTriggerCrateConfig* crate
Double_t fXmax; ///< max x value for histograms
static const Int_t fgkExtraDimension; ///< to hold extra information
static const Int_t fgkVirtualExtraDimension; ///< to give access to information not stored, but computed on the fly
- Bool_t fIsChannelLevelEnabled; //< whether we allow storing of channel (fChannelValues) values
- Bool_t fIsManuLevelEnabled; //< whether we allow storing of manu (fManuValues) values
+ Bool_t fIsChannelLevelEnabled; ///< whether we allow storing of channel (fChannelValues) values
+ Bool_t fIsManuLevelEnabled; ///< whether we allow storing of manu (fManuValues) values
ClassDef(AliMUONTrackerData,6) // Implementation of AliMUONVTrackerData
};
UShort_t maskBuffer[8];
- Int_t nLocalBoards(0);
+ Int_t nLocalBoards(1);
while ( fread ( maskBuffer, 2, 8, fp ) )
{
}
Int_t nCrates = ReadRegionalConfig(regionalFile, regionalConfig);
-
+
if (!nCrates) return kFALSE;
if (localMasks && localFile)
return fRegionalTrigger.LocalBoardId(index);
}
+
+
+//______________________________________________________________________________
+
+Int_t AliMUONTriggerIO::LocalBoardId(Int_t ddlId, Int_t crateId, Int_t localId) const
+{
+ /// Return local board id from crate and local indexes.
+
+ Int_t nofDDLs = 0;
+ TString name = AliMpTriggerCrate::GenerateName(crateId, ddlId, nofDDLs);
+
+ AliMpTriggerCrate* crate = fRegionalTrigger.FindTriggerCrate(name, false);
+ return crate->GetLocalBoardId(localId);
+}
FILE* flut);
Int_t LocalBoardId(Int_t index) const;
+ Int_t LocalBoardId(Int_t ddlId, Int_t crateId, Int_t localId) const;
private:
/*
+MTR DA for online
+
Contact: Franck Manso <manso@clermont.in2p3.fr>
Link: http://aliceinfo.cern.ch/static/Offline/dimuon/muon_html/README_mtrda.html
Run Type: ELECTRONICS_CALIBRATION_RUN (calib), DETECTOR_CALIBRATION_RUN (ped)
#include "TArrayS.h"
// global variables
-const Int_t gkNLocalBoard = AliMpConstants::TotalNofLocalBoards();
+const Int_t gkNLocalBoard = AliMpConstants::TotalNofLocalBoards()+1;
-TString gCommand("");
+TString gCommand("ped");
TString gCurrentFileName("MtgCurrent.dat");
TString gLastCurrentFileName("MtgLastCurrent.dat");
if (!ReadCurrentFile(gLastCurrentFileName, true))
{
ReadCurrentFile(gCurrentFileName, true);
- WriteLastCurrentFile();
}
// any case read current file
// setenv DATE_ROLE_NAME
// setenv DATE_DETECTOR_CODE
+ // for offline purposes
+ // gSystem->Setenv("DAQDALIB_PATH", "$DATE_SITE/infoLogger");
+
// update files
Int_t status = 0;
if (!out.good()) {
printf("Failed to create file: %s\n",file.Data());
return false;
- } file = gGlobalFileName.Data();
+ }
+ file = gGlobalFileName.Data();
if (gGlobalFileLastVersion != gGlobalFileVersion) {
-
status = daqDA_FES_storeFile(file.Data(), file.Data());
if (status) {
printf("Failed to export file: %s\n",gGlobalFileName.Data());
if(gPrintLevel) printf("Export file: %s\n",gGlobalFileName.Data());
}
+ file = gLocalMaskFileName;
if (gLocalMaskFileLastVersion != gLocalMaskFileVersion) {
modified = true;
- file = gLocalMaskFileName;
// export to FES
status = daqDA_FES_storeFile(file.Data(), file.Data());
if (status) {
out << gLocalMaskFileName.Data() << endl;
}
+ file = gLocalLutFileName;
if (gLocalLutFileLastVersion != gLocalLutFileVersion) {
- file = gLocalLutFileName;
modified = true;
status = daqDA_FES_storeFile(file.Data(), file.Data());
if (status) {
}
// exported regional file whenever mask or/and Lut are modified
+ file = gRegionalFileName;
if ( (gRegionalFileLastVersion != gRegionalFileVersion) || modified) {
- file = gRegionalFileName;
status = daqDA_FES_storeFile(file.Data(), file.Data());
if (status) {
printf("Failed to export file: %s\n",gRegionalFileName.Data());
}
if(gPrintLevel) printf("Export file: %s\n",fileExp.Data());
+ // write last current file
+ WriteLastCurrentFile();
+
return true;
}
//__________________
Int_t status = 0;
+ // for offline test
+ //gSystem->Setenv("DAQDALIB_PATH", "$DATE_SITE/db");
+ //gSystem->Setenv("DAQDA_TEST_DIR", "v3r3data");
+
status = daqDA_DB_getFile(gCurrentFileName.Data(), gCurrentFileName.Data());
if (status) {
printf("Failed to get current config file from DB: %s\n",gCurrentFileName.Data());
void ReadMaskFiles()
{
// read mask files
- gLocalMasks = new AliMUON1DArray(gkNLocalBoard+9);
+ gLocalMasks = new AliMUON1DArray(gkNLocalBoard);
gRegionalMasks = new AliMUONRegionalTriggerConfig();
gGlobalMasks = new AliMUONGlobalCrateConfig();
TString tmp(gLocalMaskFileName);
Int_t pos = tmp.First("-");
- gLocalMaskFileName = tmp(0,pos+1) + Form("%d",gLocalMaskFileVersion) + ".dat";
-
- // write last current file
- WriteLastCurrentFile();
+ TString sNumber = tmp(pos+1,1);
+ Int_t currentFileNumber = sNumber.Atoi()+1;
+ gLocalMaskFileName = tmp(0,pos+1) + Form("%d",currentFileNumber) + ".dat";
gTriggerIO.WriteConfig(gLocalMaskFileName, gRegionalFileName, gGlobalFileName, gLocalMasks, gRegionalMasks, gGlobalMasks);
+
+ WriteLastCurrentFile(gCurrentFileName);
+
+
+ Int_t status = daqDA_DB_storeFile(gLocalMaskFileName.Data(), gLocalMaskFileName.Data());
+ if (status) {
+ printf("Failed to export file to DB: %s\n",gLocalMaskFileName.Data());
+ return;
+ }
+
+ status = daqDA_DB_storeFile(gCurrentFileName.Data(), gCurrentFileName.Data());
+ if (status) {
+ printf("Failed to export file to DB: %s\n",gCurrentFileName.Data());
+ return;
+ }
+
}
}
Int_t skipEvents = 0;
Int_t maxEvents = 1000000;
Char_t inputFile[256];
- strcpy(inputFile, "");
+ inputFile[0] = 0;
+ if (argc > 1)
+ if (argv[1] != NULL)
+ strncpy(inputFile, argv[1], 256);
+ else {
+ printf("MUONTRGda : No input File !\n");
+ return -1;
+ }
TString flatOutputFile;
// option handler
return -1;
}
- if (!gDAFlag) {
- if(!ExportFiles()) return -1;
- return 0;
- }
-
ReadMaskFiles();
+ if(!ExportFiles())
+ return -1;
+
+
status = monitorSetDataSource(inputFile);
if (status) {
cerr << "ERROR : monitorSetDataSource status (hex) = " << hex << status
return -1;
}
- cout << "MUONTRKda : Reading data from file " << inputFile <<endl;
+ /* define wait event timeout - 1s max */
+ monitorSetNowait();
+ monitorSetNoWaitNetworkTimeout(1000);
+
+
+ cout << "MUONTRGda : Reading data from file " << inputFile <<endl;
while(1)
{
// starts reading
status = monitorGetEventDynamic(&event);
if (status < 0) {
- cout<<"EOF found"<<endl;
+ cout << "MUONTRGda : EOF found" << endl;
break;
}
Int_t eventType = rawReader->GetType();
gRunNumber = rawReader->GetRunNumber();
-
+ // L1Swc1
+ // CALIBRATION_EVENT
+ // SYSTEM_SOFTWARE_TRIGGER_EVENT
+ // DETECTOR_SOFTWARE_TRIGGER_EVENT
if (eventType != PHYSICS_EVENT)
continue; // for the moment
AliMUONRawStreamTrigger* rawStream = new AliMUONRawStreamTrigger(rawReader);
//rawStream->SetMaxReg(1);
- Int_t index = 0;
// loops over DDL
while((status = rawStream->NextDDL())) {
localStruct = regHeader->GetLocalEntry(iLocal);
- Int_t localBoardId = gTriggerIO.LocalBoardId(index++);
+ Int_t localBoardId = gTriggerIO.LocalBoardId(rawStream->GetDDL(), iReg, iLocal);
+ if (localBoardId == 0) continue;
if (gPrintLevel) printf("local %d\n", localBoardId );
TArrayS xPattern(4);
} // while (1)
- if (gCommand.Contains("ped"))
+ if (gCommand.Contains("ped") && gDAFlag)
MakePatternStore();
- if (gCommand.Contains("cal"))
+ if (gCommand.Contains("cal") && gDAFlag)
MakePatternStore(false);
- if (!ExportFiles())
- return -1;
timers.Stop();
delete gLocalMasks;
delete gRegionalMasks;
- delete gGlobalMasks; // in case
+ delete gGlobalMasks;
delete gPatternStore;
return status;
#pragma link C++ class AliMpRegionalTrigger+;
#pragma link C++ class AliMpTriggerCrate+;
#pragma link C++ class AliMpLocalBoard+;
+#pragma link C++ class AliMpRegionalTriggerReader+;
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
The main goal of the DA is the transfert of the modified configuration files to the FES.
The configuration files stored in the online DB are the following:
-MtgGlobalCrate-<version>.dat: contains the global crate information
-MtgRegionalCrate-<version>.dat: contains the regional crate information
-MtgLocalMask-<version>.dat: contains the local mask
-MtgLocalLut-<version>.dat: contains the local LUT
-MtgCurrent.dat: contains the name list of the above files with their version
+- MtgGlobalCrate-<version>.dat: contains the global crate information
+- MtgRegionalCrate-<version>.dat: contains the regional crate information
+- MtgLocalMask-<version>.dat: contains the local mask
+- MtgLocalLut-<version>.dat: contains the local LUT
+- MtgCurrent.dat: contains the name list of the above files with their version
and the flag for master/slave status on the DA
The copy onto the FES for the modified local masks is only done when the flag is set to master for the DA.
mapping/AliMpTriggerSegmentation.cxx \
mapping/AliMpRegionalTrigger.cxx \
mapping/AliMpTriggerCrate.cxx \
- mapping/AliMpLocalBoard.cxx
+ mapping/AliMpLocalBoard.cxx \
+ mapping/AliMpRegionalTriggerReader.cxx
# Category management
#
//-----------------------------------------------------------------------------
#include "AliMpRegionalTrigger.h"
+#include "AliMpRegionalTriggerReader.h"
#include "AliMpExMapIterator.h"
#include "AliMpTriggerCrate.h"
#include "AliMpLocalBoard.h"
/// Load the Regional trigger from ASCII data files
/// and return its instance
+ TList list;
+ list.AddAt(&fTriggerCrates, 0);
+ list.AddAt(&fLocalBoardMap, 1);
+ list.AddAt(&fLocalBoardArray, 2);
- AliMpLocalBoard* board = 0x0;
- AliMpTriggerCrate* crate = 0x0;
-
-
- Int_t localBoardId = 0;
- TArrayI list;
- UShort_t crateId, mask;
+ Int_t status = AliMpRegionalTriggerReader::ReadData(list, in);
- char line[80];
-
- while (!in.eof())
- {
- in.getline(line,80);
- if (!strlen(line)) break;
- TString crateName(AliMpHelper::Normalize(line));
-
- in.getline(line,80);
- sscanf(line,"%hx",&crateId);
-
- // skip mode
- in.getline(line,80);
-
- // skip coincidence
- in.getline(line,80);
-
- // skip mask
- in.getline(line,80);
- sscanf(line,"%hx",&mask);
-
- crate = (AliMpTriggerCrate*)(fTriggerCrates.GetValue(crateName.Data()));
- if (!crate)
- {
- // cout << "Creating crate: " << crateName.Data() << endl;
- crate = new AliMpTriggerCrate(crateName.Data(), crateId);
- fTriggerCrates.Add(crateName.Data(), crate);
- }
-
- Char_t localBoardName[20];
- Int_t slot;
- UInt_t switches;
-
- for ( Int_t i = 0; i < AliMpConstants::LocalBoardNofChannels(); ++i )
- {
- if ( (mask >> i ) & 0x1 )
- {
- in.getline(line,80);
- sscanf(line,"%02d %s %03d %03x",&slot,localBoardName,&localBoardId,&switches);
- // cout << " Creating local board: " << localBoardId << endl;
- board = new AliMpLocalBoard(localBoardId, localBoardName, slot);
- board->SetSwitch(switches);
- board->SetCrate(crateName);
-
- if (localBoardId > AliMpConstants::NofLocalBoards())
- board->SetNotified(false); // copy cards
-
- crate->AddLocalBoard(localBoardId);
-
- // add list of DEs for local board
- list.Reset();
- in.getline(line,80);
- TString tmp(AliMpHelper::Normalize(line));
- AliMpHelper::DecodeName(tmp,' ',list);
- for (Int_t ii = 0; ii < list.GetSize(); ++ii) {
- if ( list[ii] ) board->AddDE(list[ii]);
- }
-
- // set copy number and transverse connector
- in.getline(line,80);
- tmp = AliMpHelper::Normalize(line);
- AliMpHelper::DecodeName(tmp,' ',list);
+ if (status == -1) {
+ AliErrorStream()
+ << "Regional Trigger Mapping File not found" << endl;
+ return kFALSE;
+ }
- board->SetInputXfrom(list[0]);
- board->SetInputXto(list[1]);
-
- board->SetInputYfrom(list[2]);
- board->SetInputYto(list[3]);
-
- board->SetTC(list[4]);
-
- // add local board into array
- fLocalBoardArray.AddAt(board,board->GetId());
- fLocalBoardMap.Add(board->GetId(),board);
- }
- }
- }
+ if (!status)
+ return kFALSE;
+
return kTRUE;
}
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+// $Id$
+// $MpId: AliMpTrigger.cxx,v 1.4 2006/05/24 13:58:52 ivana Exp $
+
+//-----------------------------------------------------------------------------
+// Class AliMpRegionalTriggerReader
+// --------------------
+// The class to read the regional trigger crate files
+// Author: Ch. Finck, Subatech Nantes
+//-----------------------------------------------------------------------------
+
+#include "AliMpRegionalTriggerReader.h"
+#include "AliMpTriggerCrate.h"
+#include "AliMpLocalBoard.h"
+#include "AliMUONRegionalTriggerConfig.h"
+#include "AliMUONTriggerCrateConfig.h"
+#include "AliMpConstants.h"
+#include "AliMpFiles.h"
+#include "AliMpHelper.h"
+#include "AliMpExMap.h"
+
+#include "AliLog.h"
+
+#include <TArrayI.h>
+#include <TObjArray.h>
+#include <Riostream.h>
+#include <TClass.h>
+#include <TSystem.h>
+
+
+/// \cond CLASSIMP
+ClassImp(AliMpRegionalTriggerReader)
+/// \endcond
+
+
+//______________________________________________________________________________
+AliMpRegionalTriggerReader::AliMpRegionalTriggerReader()
+ : TObject()
+{
+/// constructor
+}
+
+//______________________________________________________________________________
+AliMpRegionalTriggerReader::~AliMpRegionalTriggerReader()
+{
+/// Destructor
+}
+
+//
+// public methods
+//
+
+//______________________________________________________________________________
+Int_t AliMpRegionalTriggerReader::ReadData(TList& list, istream& in)
+{
+/// Load the Regional trigger from ASCII data files
+/// and fill objects
+
+ if (!in) {
+ return -1;
+ }
+
+ AliMpExMap* triggerCrates = 0x0;
+ AliMpExMap* localBoardMap = 0x0;
+ TObjArray* localBoardArray = 0x0;
+
+ // common trigger crate map for mapping/config
+ triggerCrates = static_cast<AliMpExMap*> (list.At(0));
+
+ Bool_t mapping = false;
+ // only for mapping
+ if (list.GetSize() == 3)
+ {
+ mapping = true;
+ localBoardMap = static_cast<AliMpExMap*> (list.At(1));
+ localBoardArray = static_cast<TObjArray*> (list.At(2));
+ }
+
+ AliMpLocalBoard* board = 0x0;
+ AliMpTriggerCrate* crate = 0x0;
+ AliMUONTriggerCrateConfig* crateConfig = 0x0;
+
+ Int_t localBoardId = 0;
+ TArrayI listInt;
+ UShort_t crateId, mask;
+ Int_t mode, coincidence;
+ Int_t nofBoards;
+ char line[80];
+
+ // decode file and store in objects
+ while (!in.eof())
+ {
+ in.getline(line,80);
+ if (!strlen(line)) break;
+ TString crateName(AliMpHelper::Normalize(line));
+
+ in.getline(line,80);
+ sscanf(line,"%hx",&crateId);
+
+ // read mode
+ in.getline(line,80);
+ sscanf(line,"%d",&mode);
+
+ // read coincidence
+ in.getline(line,80);
+ sscanf(line,"%d",&coincidence);
+
+ // read mask
+ in.getline(line,80);
+ sscanf(line,"%hx",&mask);
+
+ // read # local board
+ in.getline(line,80);
+ sscanf(line,"%d",&nofBoards);
+
+ if (mapping)
+ {
+ crate = (AliMpTriggerCrate*)(triggerCrates->GetValue(crateName.Data()));
+ if (!crate)
+ {
+ crate = new AliMpTriggerCrate(crateName.Data(), crateId);
+ triggerCrates->Add(crateName.Data(), crate);
+ }
+ }
+ else
+ {
+ crateConfig = (AliMUONTriggerCrateConfig*)(triggerCrates->GetValue(crateName.Data()));
+ if (!crateConfig)
+ {
+ crateConfig = new AliMUONTriggerCrateConfig(crateName.Data(), crateId, mask, mode, coincidence);
+ triggerCrates->Add(crateName.Data(), crateConfig);
+ }
+ }
+
+ Char_t localBoardName[20];
+ Int_t slot;
+ UInt_t switches;
+
+ for ( Int_t i = 0; i < nofBoards; ++i )
+ {
+ in.getline(line,80);
+ sscanf(line,"%02d %s %03d %03x",&slot,localBoardName,&localBoardId,&switches);
+ if (mapping)
+ {
+ board = new AliMpLocalBoard(localBoardId, localBoardName, slot);
+ board->SetSwitch(switches);
+ board->SetCrate(crateName);
+
+ if (localBoardId > AliMpConstants::NofLocalBoards())
+ board->SetNotified(false); // copy cards
+
+ crate->AddLocalBoard(localBoardId);
+ }
+ else
+ {
+ crateConfig->AddLocalBoard(localBoardId);
+ }
+
+ // add list of DEs for local board
+ listInt.Reset();
+ in.getline(line,80);
+ if (mapping)
+ {
+ TString tmp(AliMpHelper::Normalize(line));
+ AliMpHelper::DecodeName(tmp,' ',listInt);
+ for (Int_t ii = 0; ii < listInt.GetSize(); ++ii) {
+ if ( listInt[ii] ) board->AddDE(listInt[ii]);
+ }
+ }
+
+ // set copy number and transverse connector
+ in.getline(line,80);
+ if (mapping)
+ {
+ TString tmp1 = AliMpHelper::Normalize(line);
+ AliMpHelper::DecodeName(tmp1,' ',listInt);
+
+ board->SetInputXfrom(listInt[0]);
+ board->SetInputXto(listInt[1]);
+
+ board->SetInputYfrom(listInt[2]);
+ board->SetInputYto(listInt[3]);
+
+ board->SetTC(listInt[4]);
+
+ // add local board into array
+ localBoardArray->AddAt(board,board->GetId());
+ localBoardMap->Add(board->GetId(),board);
+
+ }
+ }
+ }
+
+ return triggerCrates->GetSize();
+ }
--- /dev/null
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+// $MpId: $
+
+/// \ingroup mptrigger
+/// \class AliMpRegionalTriggerReader
+/// \brief The class to read regional trigger crate file
+///
+/// \author Ch. Finck, Subatech Nantes
+
+#ifndef ALI_MP_REGIONAL_TRIGGER_READER_H
+#define ALI_MP_REGIONAL_TRIGGER_READER_H
+
+#include <TObject.h>
+#include <TList.h>
+
+class AliMpRegionalTriggerReader : public TObject{
+
+ public:
+ AliMpRegionalTriggerReader();
+ virtual ~AliMpRegionalTriggerReader();
+
+ // methods
+ static Int_t ReadData(TList& list, istream& in);
+
+
+ private:
+ /// Not implemented
+ AliMpRegionalTriggerReader(const AliMpRegionalTriggerReader& rhs);
+ /// Not implemented
+ AliMpRegionalTriggerReader& operator=(const AliMpRegionalTriggerReader& rhs);
+
+
+ ClassDef(AliMpRegionalTriggerReader,0) // Regional trigger crate reader
+};
+
+
+#endif //ALI_MP_REGIONAL_CRATE_READER_H
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Char_t localBoardName[20];
Int_t j,localBoardId;
UInt_t switches;
-
+ Int_t nofBoards;
+
while (!in.eof())
{
for (Int_t i = 0; i < 4; ++i)
// read mask
if (!in.getline(line,80)) break;
sscanf(line,"%hx",&mask);
-
- for ( Int_t i = 0; i < 16; ++i )
+
+ // read # boards
+ if (!in.getline(line,80)) break;
+ sscanf(line,"%d",&nofBoards);
+
+ for ( Int_t i = 0; i < nofBoards; ++i )
{
- if ( (mask >> i ) & 0x1 )
+
+ if (!in.getline(line,80)) break;
+ sscanf(line,"%02d %s %03d %03x", &j, localBoardName, &localBoardId, &switches);
+ if (localBoardId <= AliMpConstants::NofLocalBoards())
{
- if (!in.getline(line,80)) break;
- sscanf(line,"%02d %s %03d %03x", &j, localBoardName, &localBoardId, &switches);
- if (localBoardId <= AliMpConstants::NofLocalBoards())
- {
- fLocalBoardMap.Add(new TObjString(localBoardName), new TObjString(Form("%d",localBoardId)));
- AliDebugClass(10,Form("Board %s has number %d\n", localBoardName, localBoardId));
- }
- // skip 2 following lines
- if (!in.getline(line,80)) break;
- if (!in.getline(line,80)) break;
- }
+ fLocalBoardMap.Add(new TObjString(localBoardName), new TObjString(Form("%d",localBoardId)));
+ AliDebugClass(10,Form("Board %s has number %d\n", localBoardName, localBoardId));
+ }
+ // skip 2 following lines
+ if (!in.getline(line,80)) break;
+ if (!in.getline(line,80)) break;
+
}
}
2
0
ffff
+16
01 RC1L1B12 001 1d4
1114 1214 1314 1414
0 0 0 0 0
2
0
ffff
+16
01 RC2L1B12 017 1d4
1114 1214 1314 1414
0 0 0 0 0
2
0
ffff
+16
01 RIntC2-Dw 236 010
0
31 0 31 0 0
2
0
ffff
+16
01 RC3L1B12 039 1d4
1114 1214 1314 1414
0 0 0 0 0
2
0
ffff
+16
01 RC4L1B12 061 1d4
1114 1214 1314 1414
0 0 0 0 0
2
0
ffff
+16
01 RC5L1B12 077 1d4
1114 1214 1314 1414
0 0 0 0 0
2
0
ffff
+16
01 RC6L1B12 093 1d4
1114 1214 1314 1414
0 0 0 0 0
2
0
01ff
+09
01 RC7L1B12 109 054
1114 1214 1314 1414
0 0 0 0 0
2
0
ffff
+16
01 LC1L1B12 118 1d4
1113 1213 1313 1413
0 0 0 0 0
2
0
ffff
+16
01 LC2L1B12 134 1d4
1113 1213 1313 1413
0 0 0 0 0
2
0
ffff
+16
01 LIntC2-Dw 240 010
0
148 0 148 0 0
2
0
ffff
+16
01 LC3L1B12 156 1d4
1113 1213 1313 1413
0 0 0 0 0
2
0
ffff
+16
01 LC4L1B12 178 1d4
1113 1213 1313 1413
0 0 0 0 0
2
0
ffff
+16
01 LC5L1B12 194 1d4
1113 1213 1313 1413
0 0 0 0 0
2
0
ffff
+16
01 LC6L1B12 210 1d4
1113 1213 1313 1413
0 0 0 0 0
2
0
01ff
+09
01 LC7L1B12 226 054
1113 1213 1313 1413
0 0 0 0 0