]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCClusterAccessHLTOUT.h
- adding data structure for raw clusters
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCClusterAccessHLTOUT.h
CommitLineData
c54aa300 1//-*- Mode: C++ -*-
2// $Id$
3#ifndef ALIHLTTPCCLUSTERACCESSHLTOUT_H
4#define ALIHLTTPCCLUSTERACCESSHLTOUT_H
5//* This file is property of and copyright by the ALICE HLT Project *
6//* ALICE Experiment at CERN, All rights reserved. *
7//* See cxx source for full Copyright notice *
8
9/// @file AliHLTTPCClusterAccessHLTOUT.h
10/// @author Matthias Richter
11/// @date 2011-06-06
12/// @brief Interface to HLT TPC clusters
13///
14
15#include "TObject.h"
81e7f739 16#include "AliHLTDataTypes.h"
17#include "AliHLTTPCClusterMCData.h"
18#include <map>
c54aa300 19
20class AliTPCClustersRow;
21class AliHLTOUT;
22class TClonesArray;
23
81e7f739 24typedef std::map<AliHLTUInt32_t, AliHLTTPCClusterMCLabel> AliHLTTPCClusterMCDataList;
25
c54aa300 26/**
27 * @class AliHLTTPCClusterAccessHLTOUT
28 * Generator for TPC cluster array from HLT TPC clusters in the HLTOUT
81e7f739 29 * data stream. It uses the TObject method interface. Combined with dynamic
30 * loading, any cross dependency between the TPC code and HLT libraries
31 * can be avoided.
c54aa300 32 *
81e7f739 33 * Creating the instance:
34 * The class is implemented in libAliHLTTPC.so and can be loaded
35 * through the TClass interface (you might want to add
36 * further error messages on the various error conditions).
37 * <pre>
38 * TObject* pClusterAccess=NULL;
39 * TClass* pCl=NULL;
40 * ROOT::NewFunc_t pNewFunc=NULL;
41 * do {
42 * pCl=TClass::GetClass("AliHLTTPCClusterAccessHLTOUT");
43 * } while (!pCl && gSystem->Load("libAliHLTTPC.so")==0);
44 * if (pCl && (pNewFunc=pCl->GetNew())!=NULL) {
45 * void* p=(*pNewFunc)(NULL);
46 * if (p) {
47 * pClusterAccess=reinterpret_cast<TObject*>(p);
48 * }
49 * }
50 * </pre>
51 *
52 * Usage:
53 * TObject::Execute can be used to execute commands. Command 'read'
54 * will get hold on the HLTOUT data and read the clusters. The const char*
55 * parameter 'param' is used to select the region.
56 * - param=NULL: read all
57 * - param="sector=sectorno"
58 * 'sectorno' specifies sector number in the offline code, range 0 and 71,
59 * enumerating first the 36 inner (partitions 0+1) and then 36 outer sectors
60 * (partitions 2-5).
61 *
62 * Command 'verbosity=level' sets the verbositylevel which is default 0
63 * (no info output).
64 * <pre>
65 * pClusterAccess->Clear();
66 * pClusterAccess->Execute("read", param);
67 * TObject* pClusterAccess->FindObject("clusterarray");
68 * </pre>
69 *
c54aa300 70 * @ingroup alihlt_tpc
71 */
72class AliHLTTPCClusterAccessHLTOUT : public TObject
73{
74 public:
75 /** standard constructor */
76 AliHLTTPCClusterAccessHLTOUT();
77 /** destructor */
78 ~AliHLTTPCClusterAccessHLTOUT();
79
80 /// inherited from TObject: abstract command interface
81 virtual void Execute(const char *method, const char *params, Int_t *error=0);
82
83 /// inherited from TObject: return the cluster array if name id "clusterarray"
84 virtual TObject *FindObject(const char *name) const;
85
86 /// inherited from TObject: cleanup
87 virtual void Clear(Option_t * option ="");
88
89 /// inherited from TObject
90 virtual void Print(Option_t *option="") const;
91
92 /// process the cluster data block of various formats from HLTOUT
81e7f739 93 int ProcessClusters(const char* params);
94
95 /// process the cluster mc data block {CLMCINFO:TPC } from HLTOUT
96 int ReadAliHLTTPCClusterMCData(AliHLTOUT* pHLTOUT, AliHLTTPCClusterMCDataList &tpcClusterLabels) const;
c54aa300 97
98 /// process the cluster data block {CLUSTERS:TPC } from HLTOUT
81e7f739 99 int ReadAliHLTTPCClusterData(AliHLTOUT* pHLTOUT, TClonesArray* pClusters, const AliHLTTPCClusterMCDataList *tpcClusterLabels=NULL) const;
c54aa300 100
5e75f4e0 101 /// process the cluster data block {CLUSTRAW:TPC } from HLTOUT
102 int ReadAliHLTTPCRawClusterData(AliHLTOUT* pHLTOUT, TClonesArray* pClusters, const AliHLTTPCClusterMCDataList *tpcClusterLabels);
103
c54aa300 104 private:
105 /// copy constructor prohibited
106 AliHLTTPCClusterAccessHLTOUT(const AliHLTTPCClusterAccessHLTOUT&);
107 /// assignment operator prohibited
108 AliHLTTPCClusterAccessHLTOUT& operator=(const AliHLTTPCClusterAccessHLTOUT&);
109
81e7f739 110 int fVerbosity; //! verbosity level
111 TClonesArray* fClusters; //! cluster array
c54aa300 112
113 ClassDef(AliHLTTPCClusterAccessHLTOUT, 0)
114};
115#endif