]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/trigger/AliHLTTriggerAgent.cxx
added agent for libAliHLTTrigger with HLTOUT handlers for HLTRDLST and HLTTRGDT blocks
[u/mrichter/AliRoot.git] / HLT / trigger / AliHLTTriggerAgent.cxx
1 // $Id$
2
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
19 /** @file   AliHLTTriggerAgent.cxx
20     @author Matthias Richter
21     @date   
22     @brief  Agent of the libAliHLTTrigger library
23 */
24
25 #include <cassert>
26 #include "AliHLTTriggerAgent.h"
27
28 // header files of library components
29 #include "AliHLTEventSummaryProducerComponent.h"
30 #include "AliHLTRunSummaryProducerComponent.h"
31
32 /** global instance for agent registration */
33 AliHLTTriggerAgent gAliHLTTriggerAgent;
34
35 /** ROOT macro for the implementation of ROOT specific class methods */
36 ClassImp(AliHLTTriggerAgent)
37
38 AliHLTTriggerAgent::AliHLTTriggerAgent()
39   :
40   AliHLTModuleAgent("Trigger")
41 {
42   // see header file for class documentation
43   // or
44   // refer to README to build package
45   // or
46   // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
47 }
48
49 AliHLTTriggerAgent::~AliHLTTriggerAgent()
50 {
51   // see header file for class documentation
52 }
53
54 int AliHLTTriggerAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
55 {
56   // see header file for class documentation
57   assert(pHandler);
58   if (!pHandler) return -EINVAL;
59   //pHandler->AddComponent(new );
60   return 0;
61 }
62
63 int AliHLTTriggerAgent::GetHandlerDescription(AliHLTComponentDataType dt,
64                                            AliHLTUInt32_t /*spec*/,
65                                           AliHLTOUTHandlerDesc& desc) const
66 {
67   // see header file for class documentation
68
69   // handler for the HLT readou list and trigger data data blocks {'HLTRDLST':'HLT '}
70   if (dt==AliHLTComponentDataTypeInitializer("HLTRDLST", kAliHLTDataOriginOut) ||
71       dt==AliHLTComponentDataTypeInitializer("HLTTRGDT", kAliHLTDataOriginOut)) {
72       desc=AliHLTOUTHandlerDesc(kProprietary, dt, GetModuleId());
73       return 1;
74   }
75
76   return 0;
77 }
78
79 AliHLTOUTHandler* AliHLTTriggerAgent::GetOutputHandler(AliHLTComponentDataType dt,
80                                                    AliHLTUInt32_t /*spec*/)
81 {
82   // see header file for class documentation
83
84   // handler for the HLT readou list and trigger data data blocks {'HLTRDLST':'HLT '}
85   if (dt==AliHLTComponentDataTypeInitializer("HLTRDLST", kAliHLTDataOriginOut) ||
86       dt==AliHLTComponentDataTypeInitializer("HLTTRGDT", kAliHLTDataOriginOut)) {
87     return NULL;
88   }
89
90   return NULL;
91 }
92
93 int AliHLTTriggerAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
94 {
95   // see header file for class documentation
96   if (pInstance==NULL) return -EINVAL;
97
98   return 0;
99 }