3dd14e20 |
1 | #ifndef ALIHLTMUONRECHITSSOURCE_H |
2 | #define ALIHLTMUONRECHITSSOURCE_H |
3 | /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ |
5 | |
6 | /* $Id$ */ |
7 | |
8 | /** |
9 | * @file AliHLTMUONRecHitsSource.h |
10 | * @author Artur Szostak <artursz@iafrica.com> |
11 | * @date |
12 | * @brief Class for generating reconstructed hits data blocks from AliRoot data. |
13 | */ |
14 | |
15 | #include "AliHLTOfflineDataSource.h" |
16 | |
8d33d1c2 |
17 | class AliMUONMCDataInterface; |
18 | class AliMUONDataInterface; |
3dd14e20 |
19 | |
20 | /** |
21 | * AliHLTMUONRecHitsSource is a HLT-AliRoot data source object which generates |
22 | * and serves AliHLTMUONRecHitsBlockStruct type data blocks to the HLT system. |
23 | * This is meant as a debugging utility which can optionally generate the data |
159b743b |
24 | * blocks from simulated GEANT hits or MUON offline reconstructed hits. |
25 | * |
26 | * Command line flags: |
27 | * -simdata |
28 | * Specify this option to publish GEANT hits. |
29 | * -recdata |
30 | * Specify this option to publish offline reconstructed raw clusters. |
31 | * -plane left|right|all |
32 | * Specifies if data from the left (x < 0), right (x >= 0) or the whole XY |
33 | * plane should be published. |
34 | * -chamber <number>|<number>-<number>[,<number>|<number>-<number>]... |
35 | * Selects the chambers from which to publish data. Valid chamber numbers |
36 | * in the range [1..10]. The string after '-chamber' is a comma separated |
37 | * list of numbers or ranges. Some examples of strings: |
38 | * 1 1-2 1,2,3 1,3-5,7 etc... |
3dd14e20 |
39 | */ |
40 | class AliHLTMUONRecHitsSource : public AliHLTOfflineDataSource |
41 | { |
42 | public: |
43 | |
44 | AliHLTMUONRecHitsSource(); |
45 | virtual ~AliHLTMUONRecHitsSource(); |
46 | |
47 | virtual int GetEvent( |
48 | const AliHLTComponentEventData& evtData, |
49 | AliHLTComponentTriggerData& trigData, |
50 | AliHLTUInt8_t* outputPtr, |
51 | AliHLTUInt32_t& size, |
52 | vector<AliHLTComponentBlockData>& outputBlocks |
53 | ); |
54 | |
55 | virtual const char* GetComponentID(); |
56 | |
57 | virtual AliHLTComponentDataType GetOutputDataType(); |
58 | |
59 | virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier); |
60 | |
61 | virtual AliHLTComponent* Spawn(); |
62 | |
63 | protected: |
64 | |
65 | virtual int DoInit(int argc, const char** argv); |
66 | virtual int DoDeinit(); |
67 | |
68 | private: |
69 | |
8d33d1c2 |
70 | AliMUONMCDataInterface* fMCDataInterface; // access to MUON MC-related data |
71 | AliMUONDataInterface* fDataInterface; // access to MUON data |
72 | |
5df25c2a |
73 | enum SelectionType |
74 | { |
75 | kLeftPlane, // everything from x < 0 |
76 | kRightPlane, // everything from x >= 0 |
77 | kWholePlane // for all x |
78 | }; |
79 | |
159b743b |
80 | /** |
81 | * Parses a string with the following format: |
82 | * <number>|<number>-<number>[,<number>|<number>-<number>]... |
83 | * For example: 1 1,2,3 1-2 1,2-4,5 etc... |
84 | * Flags in the fServeChamber will be set to 'true' for all appropriate |
85 | * values parsed. |
86 | * @param str The string to parse. |
87 | * @return Zero on success and EINVAL if there is a parse error. |
88 | */ |
5df25c2a |
89 | int ParseChamberString(const char* str); |
90 | |
5df25c2a |
91 | SelectionType fSelection; //! Indicates if we should publish from the left, right or whole XY plane. |
92 | bool fServeChamber[10]; //! Flag to indicate if hits from a given chamber should be published. |
3dd14e20 |
93 | |
94 | ClassDef(AliHLTMUONRecHitsSource, 0); // dHLT data source for reconstructed hit data blocks. |
95 | }; |
96 | |
97 | #endif // ALIHLTMUONRECHITSSOURCE_H |