#include <Riostream.h>
#include <TSystem.h>
+using std::ifstream;
+using std::endl;
+using std::ios;
/// \cond CLASSIMP
ClassImp(AliMUONGlobalCrateConfig)
/// \endcond
// enable
in.getline(line, 255);
tmp = AliMpHelper::Normalize(line);
- UChar_t en = 0;
- sscanf(tmp.Data(), "%hhx", &en);
+ UInt_t en = 0;
+ sscanf(tmp.Data(), "%x", &en);
SetGlobalCrateEnable(en);
in.getline(line, 255);
ULong_t addr;
sscanf(tmp.Data(), "%lx", &addr);
SetJtagVmeAddr(addr);
- AliDebug(1, Form("Jtag Vme Address: 0x%x", addr));
+ AliDebug(1, Form("Jtag Vme Address: 0x%lx", addr));
// clk div, rx phase, read delay
in.getline(line, 255);
sscanf(tmp.Data(), "%lx", &addr);
if (addr) nDarc++;
SetFirstDarcVmeAddr(addr);
- AliDebug(1, Form("First Darc Vme Address: 0x%x", addr));
+ AliDebug(1, Form("First Darc Vme Address: 0x%lx", addr));
// type
in.getline(line, 255);
in.getline(line, 255);
tmp = AliMpHelper::Normalize(line);
ULong_t addr;
- if (addr) nDarc++;
sscanf(tmp.Data(), "%lx", &addr);
+ if (addr) nDarc++;
SetSecondDarcVmeAddr(addr);
- AliDebug(1, Form("Second Darc Vme Address: 0x%x", addr));
+ AliDebug(1, Form("Second Darc Vme Address: 0x%lx", addr));
// type
in.getline(line, 255);
ULong_t addr;
sscanf(tmp.Data(), "%lx", &addr);
SetGlobalVmeAddr(addr);
- AliDebug(1, Form("Global Vme Address: 0x%x", addr));
+ AliDebug(1, Form("Global Vme Address: 0x%lx", addr));
for (Int_t i = 0; i < GetGlobalNofRegisters(); ++i) {
in.getline(line, 255);
ULong_t addr;
sscanf(tmp.Data(), "%lx", &addr);
SetFetVmeAddr(addr);
- AliDebug(1, Form("Fet Vme Address: 0x%x", addr));
+ AliDebug(1, Form("Fet Vme Address: 0x%lx", addr));
for (Int_t i = 0; i < GetFetNofRegisters(); ++i) {
in.getline(line, 255);
{
/// Get the crate name for a given line and a given index
if (jtagLine > AliMpConstants::LocalBoardNofChannels() || index > AliMpConstants::LocalBoardNofChannels())
- return 0x0;
+ return "";
else
return fJtagCrateName[jtagLine*fgkJtagNofLines + index];
}
UInt_t AliMUONGlobalCrateConfig::GetGlobalRegister(Int_t index) const
{
/// return global register for a given index
- if (index > fgkGlobalNofRegisters) {
+ if (index >= fgkGlobalNofRegisters) {
AliWarning("Index size too big for Global Register");
return 0;
} else
void AliMUONGlobalCrateConfig::SetGlobalRegister(Int_t index, UInt_t reg)
{
/// set Global register for a given index
- if (index > fgkGlobalNofRegisters) {
+ if (index >= fgkGlobalNofRegisters) {
AliWarning("Index size too big for Global Register");
return;
}
UInt_t AliMUONGlobalCrateConfig::GetFetRegister(Int_t index) const
{
/// return global register for a given index
- if (index > fgkFetNofRegisters) {
+ if (index >= fgkFetNofRegisters) {
AliWarning("Index size too big for Fet Register");
return 0;
} else
void AliMUONGlobalCrateConfig::SetFetRegister(Int_t index, UInt_t reg)
{
/// set Global register for a given index
- if (index > fgkFetNofRegisters) {
+ if (index >= fgkFetNofRegisters) {
AliWarning("Index size too big for Global Register");
return;
}