]>
Commit | Line | Data |
---|---|---|
90ebac25 | 1 | // @(#) $Id$ |
2 | ||
9be2600f | 3 | /************************************************************************** |
4 | * This file is property of and copyright by the ALICE HLT Project * | |
5 | * ALICE Experiment at CERN, All rights reserved. * | |
6 | * * | |
7 | * Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> * | |
8 | * for The ALICE HLT Project. * | |
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 | ||
90ebac25 | 19 | /** @file AliHLTSampleOfflineSinkComponent.cxx |
20 | @author Matthias Richter | |
21 | @date | |
22 | @brief A sample offline sink component. | |
23 | */ | |
24 | ||
25 | #include "AliHLTSampleOfflineSinkComponent.h" | |
26 | #include "AliRunLoader.h" | |
27 | #include "AliLoader.h" | |
28 | #include "AliLog.h" | |
29 | #include "TTree.h" | |
30 | ||
31 | /** global instance for agent registration */ | |
32 | AliHLTSampleOfflineSinkComponent gAliHLTSampleOfflineSinkComponent; | |
33 | ||
34 | /** ROOT macro for the implementation of ROOT specific class methods */ | |
35 | ClassImp(AliHLTSampleOfflineSinkComponent) | |
36 | ||
37 | AliHLTSampleOfflineSinkComponent::AliHLTSampleOfflineSinkComponent() | |
38 | { | |
39 | // see header file for class documentation | |
40 | // or | |
41 | // refer to README to build package | |
42 | // or | |
43 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
44 | } | |
45 | ||
46 | AliHLTSampleOfflineSinkComponent::~AliHLTSampleOfflineSinkComponent() | |
47 | { | |
48 | // see header file for class documentation | |
49 | } | |
50 | ||
51 | const char* AliHLTSampleOfflineSinkComponent::GetComponentID() | |
52 | { | |
53 | // see header file for class documentation | |
54 | return "SampleOfflineDataSink"; | |
55 | } | |
56 | ||
57 | void AliHLTSampleOfflineSinkComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list) | |
58 | { | |
59 | // see header file for class documentation | |
60 | list.clear(); | |
61 | list.push_back(kAliHLTAnyDataType); | |
62 | } | |
63 | ||
64 | AliHLTComponent* AliHLTSampleOfflineSinkComponent::Spawn() | |
65 | { | |
66 | // see header file for class documentation | |
67 | return new AliHLTSampleOfflineSinkComponent; | |
68 | } | |
69 | ||
d76bc02a | 70 | int AliHLTSampleOfflineSinkComponent::DoInit( int /*argc*/, const char** /*argv*/ ) |
90ebac25 | 71 | { |
72 | // see header file for class documentation | |
73 | int iResult=0; | |
74 | return iResult; | |
75 | } | |
76 | ||
77 | int AliHLTSampleOfflineSinkComponent::DoDeinit() | |
78 | { | |
79 | // see header file for class documentation | |
80 | int iResult=0; | |
81 | return iResult; | |
82 | } | |
83 | ||
d76bc02a | 84 | int AliHLTSampleOfflineSinkComponent::DumpEvent(const AliHLTComponentEventData& /*evtData*/, |
85 | AliHLTComponentTriggerData& /*trigData*/) | |
90ebac25 | 86 | { |
87 | // see header file for class documentation | |
88 | int iResult=0; | |
89 | AliInfoStream() << "dump event " << GetEventCount() << endl; | |
90 | TTree* pTree=(TTree*)GetFirstInputObject(kAliHLTAnyDataType, "TTree"); | |
91 | while (pTree) { | |
92 | AliInfoStream() << " got TTree object with " << pTree->GetEntries() << " entries" << endl; | |
93 | pTree=(TTree*)GetNextInputObject(); | |
94 | } | |
95 | return iResult; | |
96 | } | |
97 | ||
d76bc02a | 98 | int AliHLTSampleOfflineSinkComponent::FillESD(int eventNo, AliRunLoader* /*runLoader*/, AliESDEvent* /*esd*/) |
90ebac25 | 99 | { |
100 | // see header file for class documentation | |
101 | int iResult=0; | |
102 | AliInfoStream() << "event " << eventNo << endl; | |
103 | return iResult; | |
104 | } | |
d76bc02a | 105 |