1 /**************************************************************************
2 * This file is property of and copyright by the Experimental Nuclear *
3 * Physics Group, Dep. of Physics *
4 * University of Oslo, Norway, 2007 *
6 * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
7 * Contributors are mentioned in the code where appropriate. *
8 * Please report bugs to perthi@fys.uio.no *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
18 #include "AliHLTPHOSRcuProcessor.h"
20 AliHLTPHOSRcuProcessor::AliHLTPHOSRcuProcessor(): fkEquippmentID(0)
25 AliHLTPHOSRcuProcessor::~AliHLTPHOSRcuProcessor()
32 AliHLTPHOSRcuProcessor::GetEquippmentID() const
34 return fkEquippmentID;
38 AliHLTPHOSRcuProcessor::SetEquippmentID(AliHLTUInt16_t id)
40 AliHLTUInt16_t &ref = const_cast<AliHLTUInt16_t&>(fkEquippmentID);
46 AliHLTPHOSRcuProcessor::ScanArguments(int argc, const char** argv)
52 for(int i=0; i<argc && iResult>=0; i++)
56 if (argument.IsNull())
61 if (argument.CompareTo("-equipmentID") == 0)
63 cout << "AliHLTPHOSProcessor:DoInit argument = -equipmentID " <<endl;
66 SetEquippmentID((AliHLTUInt16_t)atoi(argv[i+1]));
67 cout << "AliHLTPHOSRawAnalyzerComponent:DoInit setting equippment ID to " << fkEquippmentID <<endl;
68 SetCoordinates(fkEquippmentID);
69 fIsSetEquippmentID = kTRUE;
70 cout << " fIsSetEquippmentID = kTRUE"<< endl;
75 Logging( kHLTLogFatal, "HLT::AliHLTPHOSRcuHistogramProducerComponent::DoInt( int argc, const char** argv )", "Missing argument",
76 "The argument -equippmentID expects a number");
82 if (argument.CompareTo("-printinfo") == 0)
87 fPrintInfoFrequncy = atoi(argv[i+1]);
89 cout << "AliHLTPHOSRawAnalyzerComponent::DoIni setting printinfo = kTRUE, with update frequency every "<< fPrintInfoFrequncy << "th event" <<endl;
93 cout << "WARNING: asking for event info, but no update frequency is specified, option is ignored" << endl;
100 if(fIsSetEquippmentID == kFALSE)
102 Logging( kHLTLogFatal, "HLT::AliHLTPHOSRcuHistogramProducerComponent::DoInt( int argc, const char** argv )", "Missing argument",
103 "The argument equippmentID is not set: set it with a component argumet like this: -equippmentID <number>");
110 AliHLTPHOSRcuProcessor::SetCoordinates(AliHLTUInt16_t /*equippmentID*/)
112 int rcuIndex = (fkEquippmentID - 1792)%N_RCUS_PER_MODULE;
113 fModuleID = (fkEquippmentID -1792 -rcuIndex)/N_RCUS_PER_MODULE;
139 fRcuZOffset = N_ZROWS_RCU*fRcuZ;
140 fRcuXOffset = N_XCOLUMNS_RCU*fRcuX;
142 cout <<"********InitInfo************"<< endl;
143 cout <<"AliHLTPHOSRawAnalyzerComponent::SetCoordinate casted"<< endl;
144 cout <<"Equpippment ID =\t"<< fkEquippmentID <<endl;
145 cout <<"Module ID =\t"<< (int)fModuleID<<endl;
146 cout <<"RCUX =\t\t" << (int)fRcuX << endl;
147 cout <<"RCUZ =\t\t" << (int)fRcuZ << endl;
148 cout <<"RcuZOffset = \t" << (int)fRcuZOffset << endl;
149 cout <<"RcuXOffset = \t" << (int)fRcuXOffset << endl << endl;