2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
4 /**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
10 #include "AliEveHOMERSourceMap.h"
11 #include "AliEveHOMERSourceMapByDet.h"
12 #include "AliEveHOMERSourceMapByType.h"
14 //______________________________________________________________________
16 // AliEveHOMERSourceMap is an abstract container for HLT HOMER sources,
17 // see AliHLTHOMERSourceDesc.
19 // The concrete implementations AliEveHOMERSourceMapByDet and
20 // AliEveHOMERSourceMapByType allow retrieval of HOMER sources in proper
21 // order as required for their display in EVE object browser.
24 ClassImp(AliEveHOMERSourceMap)
26 AliEveHOMERSourceMap::AliEveHOMERSourceMap(ESourceGrouping_e grouping) :
32 AliEveHOMERSourceMap* AliEveHOMERSourceMap::Create(ESourceGrouping_e grouping)
34 // Static constructor - instantiates appropriate sub-class.
38 case kSG_ByDet: return new AliEveHOMERSourceMapByDet(grouping);
39 case kSG_ByType: return new AliEveHOMERSourceMapByType(grouping);
44 Int_t AliEveHOMERSourceMap::iterator::level()
46 // Returns the depth in iteration:
47 // Det / Sub-Det / Sub-Sub-Det / Data-Type.
49 const AliEveHOMERSource::SourceId& sid = id();
52 if ( ! sid.fDet.IsNull()) ++lvl;
53 if ( ! sid.fSDet.IsNull()) ++lvl;
54 if ( ! sid.fSSDet.IsNull()) ++lvl;
55 if ( ! sid.fType.IsNull()) ++lvl;
59 void AliEveHOMERSourceMap::PrintXXX()
61 // Print entries in the map.
63 for (iterator i = begin(); i != end(); ++i)
65 printf("%*s%s [state=%d, handle=0x%lx] {ssdet='%s'}\n", 4*i.level(), "",
66 i.description().Data(), i.state().fState,
67 (ULong_t) i.state().fHandle,
68 i.id().fSSDet.Data());