]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TRD/AliHLTTRDAgent.cxx
update of AltroChannelSelector component by Jason: added monitoring histograms, make...
[u/mrichter/AliRoot.git] / HLT / TRD / AliHLTTRDAgent.cxx
CommitLineData
ce6fd1b1 1// $Id$
d679dd6c 2//**************************************************************************
3//* This file is property of and copyright by the ALICE HLT Project *
4//* ALICE Experiment at CERN, All rights reserved. *
5//* *
6//* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
7//* for The ALICE HLT Project. *
8//* *
9//* Permission to use, copy, modify and distribute this software and its *
10//* documentation strictly for non-commercial purposes is hereby granted *
11//* without fee, provided that the above copyright notice appears in all *
12//* copies and that both the copyright notice and this permission notice *
13//* appear in the supporting documentation. The authors make no claims *
14//* about the suitability of this software for any purpose. It is *
15//* provided "as is" without express or implied warranty. *
16//**************************************************************************
17
ce6fd1b1 18/// @file AliHLTTRDAgent.cxx
19/// @author Matthias Richter
20/// @date
21/// @brief Agent of the libAliHLTTRD library
22///
d679dd6c 23
24#include "AliHLTTRDAgent.h"
d679dd6c 25#include "AliHLTTRDDefinitions.h"
26
27// #include "AliHLTOUT.h"
28// #include "AliHLTOUTHandlerChain.h"
29// #include "AliRunLoader.h"
30
31/** global instance for agent registration */
32AliHLTTRDAgent gAliHLTTRDAgent;
33
34// component headers
35#include "AliHLTTRDClusterizerComponent.h"
d679dd6c 36#include "AliHLTTRDTrackerV1Component.h"
37#include "AliHLTTRDCalibrationComponent.h"
cad0c17d 38#include "AliHLTTRDCalibFitComponent.h"
39#include "AliHLTTRDCalibHistoComponent.h"
d679dd6c 40#include "AliHLTTRDEsdWriterComponent.h"
ef29c6da 41#include "AliHLTTRDClusterHistoComponent.h"
ae24e8b7 42#include "AliHLTTRDTrackHistoComponent.h"
b21edf6e 43#include "AliHLTTRDHistoMergerComponent.h"
4de61263 44#include "AliHLTTRDOfflineClusterizerComponent.h"
45#include "AliHLTTRDOfflineTrackerV1Component.h"
ce6fd1b1 46#include "AliHLTTRDMonitorComponent.h"
47#include "AliHLTTRDGlobalMonitorComponent.h"
d679dd6c 48
49/** ROOT macro for the implementation of ROOT specific class methods */
50ClassImp(AliHLTTRDAgent)
51
52 AliHLTTRDAgent::AliHLTTRDAgent()
53 :
54 AliHLTModuleAgent("TRD"),
55 fRawDataHandler(NULL)
56{
57 // see header file for class documentation
58 // or
59 // refer to README to build package
60 // or
61 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
62}
63
64AliHLTTRDAgent::~AliHLTTRDAgent()
65{
66 // see header file for class documentation
67}
68
69int AliHLTTRDAgent::CreateConfigurations(AliHLTConfigurationHandler* /*handler*/,
70 AliRawReader* /*rawReader*/,
71 AliRunLoader* /*runloader*/) const
72{
73 // see header file for class documentation
74
75 return 0;
76}
77
78const char* AliHLTTRDAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
79 AliRunLoader* /*runloader*/) const
80{
81 // see header file for class documentation
82
83 return "";
84}
85
86const char* AliHLTTRDAgent::GetRequiredComponentLibraries() const
87{
88 return "";
89}
90
91int AliHLTTRDAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
92{
93 // see header file for class documentation
94 if (!pHandler) return -EINVAL;
95 pHandler->AddComponent(new AliHLTTRDClusterizerComponent);
d679dd6c 96 pHandler->AddComponent(new AliHLTTRDTrackerV1Component);
97 pHandler->AddComponent(new AliHLTTRDCalibrationComponent);
cad0c17d 98 pHandler->AddComponent(new AliHLTTRDCalibFitComponent);
99 pHandler->AddComponent(new AliHLTTRDCalibHistoComponent);
d679dd6c 100 pHandler->AddComponent(new AliHLTTRDEsdWriterComponent);
9772d58a 101 pHandler->AddComponent(new AliHLTTRDClusterHistoComponent);
ae24e8b7 102 pHandler->AddComponent(new AliHLTTRDTrackHistoComponent);
b21edf6e 103 pHandler->AddComponent(new AliHLTTRDHistoMergerComponent);
4de61263 104 pHandler->AddComponent(new AliHLTTRDOfflineClusterizerComponent);
105 pHandler->AddComponent(new AliHLTTRDOfflineTrackerV1Component);
ce6fd1b1 106 pHandler->AddComponent(new AliHLTTRDMonitorComponent);
107 pHandler->AddComponent(new AliHLTTRDGlobalMonitorComponent);
d679dd6c 108 return 0;
109}
110
111int AliHLTTRDAgent::GetHandlerDescription(AliHLTComponentDataType dt,
112 AliHLTUInt32_t spec,
113 AliHLTOUTHandlerDesc& desc) const
114{
115 // see header file for class documentation
116
117 // raw data blocks to be fed into offline reconstruction
118 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTRD)) {
119 desc=AliHLTOUTHandlerDesc(kRawReader, dt, GetModuleId());
120 HLTInfo("module %s handles data block type %s specification %d (0x%x)",
121 GetModuleId(), AliHLTComponent::DataType2Text(dt).c_str(), spec, spec);
122 return 1;
123 }
124 return 0;
125}
126
127AliHLTOUTHandler* AliHLTTRDAgent::GetOutputHandler(AliHLTComponentDataType dt,
128 AliHLTUInt32_t /*spec*/)
129{
130 // see header file for class documentation
131
132 // raw data blocks to be fed into offline reconstruction
133 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTRD)) {
134 // use the default handler
135 if (!fRawDataHandler) {
136 fRawDataHandler=new AliHLTOUTHandlerEquId;
137 }
138 return fRawDataHandler;
139 }
140 return NULL;
141}
142
143int AliHLTTRDAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
144{
145 // see header file for class documentation
146 if (pInstance==NULL) return -EINVAL;
147
148 if (pInstance==fRawDataHandler) {
149 delete fRawDataHandler;
150 fRawDataHandler=NULL;
151 return 0;
152 }
153
154 delete pInstance;
155 return 0;
156}
157