38 #include <Riostream.h>
57 fTriggerCrates.SetOwner(
true);
64 fTriggerCrates(rhs.fTriggerCrates),
65 fLocalBoardMap(rhs.fLocalBoardMap),
66 fLocalBoardArray(rhs.fLocalBoardArray)
74 fTriggerCrates(ioCtor),
75 fLocalBoardMap(ioCtor),
87 if (
this == &rhs)
return *
this;
90 TObject::operator=(rhs);
116 if ( !in.good() )
return kFALSE;
118 Int_t localBoardId = 0;
122 Int_t localBoardIndex(0);
129 if (!strlen(line))
break;
133 sscanf(line,
"%hx",&crateId);
143 sscanf(line,
"%d",&nofBoards);
152 Char_t localBoardName[20];
156 for ( Int_t i = 0; i < nofBoards; ++i )
159 sscanf(line,
"%02d %19s %03d %03x",&slot,localBoardName,&localBoardId,&switches);
174 for (Int_t ii = 0; ii < listInt.GetSize(); ++ii) {
175 if ( listInt[ii] ) board->
AddDE(listInt[ii]);
189 board->
SetTC(listInt[4]);
201 AliDebug(1,Form(
"%d local board referenced from the array",
fLocalBoardArray.GetLast()+1));
216 AliDebugStream(2) <<
"Read data from file " << fileName.Data() << endl;
218 TString inFileName(gSystem->ExpandPathName(fileName.Data()));
219 ifstream inFile(inFileName.Data(), ios::in);
220 if ( ! inFile.good() ) {
222 <<
"Local Trigger Board Mapping File " << inFileName.Data() <<
" not found bordel de merde" << endl;
235 AliDebugStream(2) <<
"Read data from stream " << endl;
254 if ( ! localBoard && warn ) {
256 <<
"Loacl board with localBoardId = " << localBoardId <<
" not found." << endl;
270 if ( ! crate && warn ) {
272 <<
"Trigger crate with name = " << name.Data() <<
" not defined." << endl;
323 AliError(Form(
"Could not get local board at index %d",index));
void SetInputYto(Int_t id)
Set Id to where the Y input are copied.
Bool_t AddDE(Int_t detElemId)
AliMpLocalBoard * FindLocalBoard(Int_t localBoardId, Bool_t warn=true) const
Bool_t ReadData(const TString &fileName)
Int_t GetNofTriggerCrates() const
Int_t GetId() const
Return the identifier (unique)
The class defines the properties of trigger crate.
AliMpRegionalTrigger & operator=(const AliMpRegionalTrigger &rhs)
static TString Normalize(const char *line)
AliMpExMap fLocalBoardMap
map of local boards (owner of boards)
void SetInputXto(Int_t id)
Set Id to where the X input are copied.
void SetTC(Bool_t connect)
Set transverse connector.
Class that manages the properties of the local board.
virtual ~AliMpRegionalTrigger()
static Int_t NofLocalBoards()
Return number of trigger local boards.
Bool_t AddLocalBoard(Int_t localBoardId)
TIterator * CreateLocalBoardIterator() const
static TString LocalTriggerBoardMapping()
void SetNotified(Bool_t notify)
Set notified flag (not copy card)
TObjArray fLocalBoardArray
array of local boards (not owner of boards, the map is the owner)
void SetInputXfrom(Int_t id)
Set Id from where the X input are copied.
void SetCrate(TString name)
Set crate name.
Int_t GetNofLocalBoards() const
void SetTriggerCratesOwner(Bool_t owner)
AliMpTriggerCrate * FindTriggerCrate(TString crateName, Bool_t warn=true) const
void SetSwitch(UInt_t swit)
Set switch in a compact way.
TObject * GetValue(Int_t keyFirst, Int_t keySecond) const
void SetInputYfrom(Int_t id)
Set Id from where the Y input are copied.
The class defines the properties of regional trigger crate.
static Int_t LocalBoardNofChannels()
Max number of channels per local board.
void Add(Int_t keyFirst, Int_t keySecond, TObject *object)
void SetOwner(Bool_t owner)
AliMpExMap fTriggerCrates
map for trigger crates
Globally used constants definition.
Int_t LocalBoardId(Int_t index) const
TIterator * CreateCrateIterator() const
AliMpExMapIterator * CreateIterator() const
Mapping data streams provider.
static void DecodeName(const char *manus, char sep, TArrayI &theList)