]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - HLT/MUON/OfflineInterface/AliHLTMUONTriggerRecordsSource.h
Update master to aliroot
[u/mrichter/AliRoot.git] / HLT / MUON / OfflineInterface / AliHLTMUONTriggerRecordsSource.h
... / ...
CommitLineData
1#ifndef ALIHLTMUONTRIGGERRECORDSSOURCE_H
2#define ALIHLTMUONTRIGGERRECORDSSOURCE_H
3/**************************************************************************
4 * This file is property of and copyright by the ALICE HLT Project *
5 * All rights reserved. *
6 * *
7 * Primary Authors: *
8 * Artur Szostak <artursz@iafrica.com> *
9 * *
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
19// $Id$
20
21/**
22 * @file AliHLTMUONTriggerRecordsSource.h
23 * @author Artur Szostak <artursz@iafrica.com>
24 * @date 16 Sep 2007
25 * @brief Class for generating trigger record data blocks from AliRoot data.
26 */
27
28#include "AliHLTOfflineDataSource.h"
29
30class AliMUONMCDataInterface;
31class AliMUONDataInterface;
32
33/**
34 * AliHLTMUONTriggerRecordsSource is a HLT-AliRoot data source object which generates
35 * and serves AliHLTMUONTriggerRecordsBlockStruct type data blocks to the HLT system.
36 * This is meant as a debugging utility which can optionally generate the data
37 * blocks from simulated GEANT hits, simulated local trigger objects or MUON
38 * offline reconstructed local trigger objects.
39 *
40 * Command line flags:
41 * -hitdata
42 * Specify this option to publish trigger records constructed from GEANT hits.
43 * -simdata
44 * Specify this option to publish trigger records constructed from simulated
45 * local trigger objects.
46 * -recdata
47 * Specify this option to publish trigger records constructed from offline
48 * reconstructed local trigger objects.
49 * -plane left|right|all
50 * Specifies if data from the left (x < 0), right (x >= 0) or the whole XY
51 * plane should be published.
52 * -firstevent <number>
53 * Indicates the first event number to fetch from AliRoot. The default is to
54 * start from zero and increment the event number after every GetEvent call.
55 * This mode causes the component to ignore the event number passed to it by
56 * the system and rather use an internal counter. This mode can be overriden
57 * with the -event_number_literal flag.
58 * -event_number_literal
59 * This flag indicates to use the event numbers as literal indices into the
60 * AliRoot trees. This option will cause the component to ignore the -firstevent
61 * flag.
62 */
63class AliHLTMUONTriggerRecordsSource : public AliHLTOfflineDataSource
64{
65public:
66
67 AliHLTMUONTriggerRecordsSource();
68 virtual ~AliHLTMUONTriggerRecordsSource();
69
70 virtual const char* GetComponentID();
71
72 virtual AliHLTComponentDataType GetOutputDataType();
73
74 virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
75
76 virtual AliHLTComponent* Spawn();
77
78protected:
79
80 virtual int DoInit(int argc, const char** argv);
81 virtual int DoDeinit();
82
83 virtual int GetEvent(
84 const AliHLTComponentEventData& evtData,
85 AliHLTComponentTriggerData& trigData,
86 AliHLTUInt8_t* outputPtr,
87 AliHLTUInt32_t& size,
88 AliHLTComponentBlockDataList& outputBlocks
89 );
90
91 using AliHLTOfflineDataSource::GetEvent;
92
93private:
94
95 // Prevent copying of these objects.
96 AliHLTMUONTriggerRecordsSource(const AliHLTMUONTriggerRecordsSource& /*object*/);
97 AliHLTMUONTriggerRecordsSource& operator = (const AliHLTMUONTriggerRecordsSource& /*object*/);
98
99 AliMUONMCDataInterface* fMCDataInterface; //! access to MUON MC-related data
100 AliMUONDataInterface* fDataInterface; //! access to MUON data
101 bool fBuildFromHits; //! Flag indicating if trigger records should be built from GEANT hits.
102
103 enum SelectionType
104 {
105 kLeftPlane, // everything from x < 0
106 kRightPlane, // everything from x >= 0
107 kWholePlane // for all x
108 };
109
110 SelectionType fSelection; //! Indicates if we should publish from the left, right or whole XY plane.
111
112 Int_t fCurrentEventIndex; //! The current event index that is loaded.
113 // -1 indicates that we should rather use the event
114 // numbers as given by the system.
115
116 ClassDef(AliHLTMUONTriggerRecordsSource, 0) // dHLT data source for trigger record data blocks.
117};
118
119#endif // ALIHLTMUONTRIGGERRECORDSSOURCE_H