3 /**************************************************************************
4 * This file is property of and copyright by the Experimental Nuclear *
5 * Physics Group, Dep. of Physics *
6 * University of Oslo, Norway, 2007 *
8 * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
9 * Contributors are mentioned in the code where appropriate. *
10 * Please report bugs to perthi@fys.uio.no *
12 * Permission to use, copy, modify and distribute this software and its *
13 * documentation strictly for non-commercial purposes is hereby granted *
14 * without fee, provided that the above copyright notice appears in all *
15 * copies and that both the copyright notice and this permission notice *
16 * appear in the supporting documentation. The authors make no claims *
17 * about the suitability of this software for any purpose. It is *
18 * provided "as is" without express or implied warranty. *
19 **************************************************************************/
21 #include "AliHLTPHOSRcuProperties.h"
22 #include "AliHLTPHOSUtilities.h"
26 AliHLTPHOSRcuProperties::AliHLTPHOSRcuProperties() :fkEquippmentID(0),
34 fPrintInfoFrequncy(10000),
35 fIsSetEquippmentID(kFALSE),
37 fIsInitialized(false),
41 fUtilitiesPtr = new AliHLTPHOSUtilities();
46 AliHLTPHOSRcuProperties::~AliHLTPHOSRcuProperties()
53 AliHLTPHOSRcuProperties::GetEquippmentID() const
55 return fkEquippmentID;
60 AliHLTPHOSRcuProperties::GetRCUID() const
67 AliHLTPHOSRcuProperties::ScanArguments(int argc, const char** argv)
71 fIsSetEquippmentID = fUtilitiesPtr->ScanSingleIntArgument(argc, argv, "-equipmentID", &fkEquippmentID);
73 if(fIsSetEquippmentID == true)
75 // cout << "AliHLTPHOSRcuProperties::ScanArguments fIsSetEquippmentID == true" << endl;
79 // cout << "AliHLTPHOSRcuProperties::ScanArguments fIsSetEquippmentID == false" << endl;
83 InitializeCoordinates(fkEquippmentID);
84 // fPrintInfo = fIsSetEquippmentID = fUtilitiesPtr->ScanSingleIntArgument(argc, argv, "-printinfo", &fPrintInfoFrequncy);
85 fPrintInfo = fUtilitiesPtr->ScanSingleIntArgument(argc, argv, "-printinfo", &fPrintInfoFrequncy);
87 if(fIsSetEquippmentID == kFALSE)
89 fLog.Logging( kHLTLogFatal, "HLT::AliHLTPHOSRcuProperties::DoInt( int argc, const char** argv )", "Missing argument",
90 "The argument equippmentID is not set: set it with a component argumet like this: -equippmentID <number>");
99 AliHLTPHOSRcuProperties::InitializeCoordinates(AliHLTUInt16_t /*equippmentID*/)
101 fRcuID = (fkEquippmentID - 1792)%NRCUSPERMODULE;
102 fModID = (fkEquippmentID -1792 - fRcuID)/NRCUSPERMODULE;
128 fRcuZOffset = NZROWSRCU*fRcuZ;
129 fRcuXOffset = NXCOLUMNSRCU*fRcuX;
130 fIsInitialized = true;