]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TRD/AliHLTTRDOfflineTrackerV1Component.cxx
trigger classes selection added
[u/mrichter/AliRoot.git] / HLT / TRD / AliHLTTRDOfflineTrackerV1Component.cxx
CommitLineData
4de61263 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: *
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 AliHLTTRDOfflineTrackerV1Component.cxx
20 @author
21 @date 2009-08-31
22 @brief A TRDClusterizer processing component for the HLT.
23*/
24
25#include "AliHLTTRDOfflineTrackerV1Component.h"
26#include "AliCDBManager.h"
2359a6ef 27#include "AliTRDrecoParam.h"
28#include "AliHLTTRDDefinitions.h"
4de61263 29
30ClassImp(AliHLTTRDOfflineTrackerV1Component)
31
2359a6ef 32AliHLTTRDOfflineTrackerV1Component::AliHLTTRDOfflineTrackerV1Component()
33 :AliHLTTRDTrackerV1Component()
4de61263 34{
35 // Default constructor
2359a6ef 36 fOffline=kTRUE;
4de61263 37}
38
39AliHLTTRDOfflineTrackerV1Component::~AliHLTTRDOfflineTrackerV1Component()
40{
41 // Destructor
42 // Work is Done in DoDeInit()
43}
44
2359a6ef 45int AliHLTTRDOfflineTrackerV1Component::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList)
46{
47 // Get the output data types
48 tgtList.clear();
49 AliHLTTRDTrackerV1Component::GetOutputDataTypes(tgtList);
50 tgtList.push_back(AliHLTTRDDefinitions::fgkTRDOffTracksDataType);
51 return tgtList.size();
52}
53
54void AliHLTTRDOfflineTrackerV1Component::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
55{
56 // Get the output data size
57 constBase = 1000000;
58 inputMultiplier = 4*((double)fOutputPercentage);
59}
60
4de61263 61AliHLTComponent* AliHLTTRDOfflineTrackerV1Component::Spawn()
62{
63 // Spawn function, return new instance of this class
64 return new AliHLTTRDOfflineTrackerV1Component;
65};
66
67int AliHLTTRDOfflineTrackerV1Component::DoInit( int argc, const char** argv )
68{
2359a6ef 69 int iResult = 0;
4de61263 70 SetOfflineParams();
2359a6ef 71 iResult=AliHLTTRDTrackerV1Component::DoInit(argc, argv);
72 fRecoParam->SetStreamLevel(AliTRDrecoParam::kTracker, 1); //in order to have the friends written
73 return iResult;
4de61263 74}
75
76const char* AliHLTTRDOfflineTrackerV1Component::GetComponentID()
77{
78 // Return the component ID const char *
79 return "TRDOfflineTrackerV1"; // The ID of this component
80}
81
82void AliHLTTRDOfflineTrackerV1Component::SetOfflineParams(){
4de61263 83 if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
84 HLTFatal("You are resetting the Default Storage of the CDBManager!");
85 HLTFatal("Let's hope that this program is NOT running on the HLT cluster!");
86 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
4de61263 87 }
88 if(AliCDBManager::Instance()->GetRun()<0){
89 HLTFatal("You are resetting the CDB run number to 0!");
90 HLTFatal("Let's hope that this program is NOT running on the HLT cluster!");
91 AliCDBManager::Instance()->SetRun(0);
4de61263 92 }
93}
9cafabed 94
95int AliHLTTRDOfflineTrackerV1Component::DoDeinit()
96{
97 return AliHLTTRDTrackerV1Component::DoDeinit();
98}
99
100int AliHLTTRDOfflineTrackerV1Component::DoEvent(const AliHLTComponent_EventData& evtData, const AliHLTComponent_BlockData* blocks,
101 AliHLTComponent_TriggerData& trigData, AliHLTUInt8_t* outputPtr,
102 AliHLTUInt32_t& size, vector<AliHLTComponent_BlockData>& outputBlocks )
103{
2359a6ef 104 if ( GetFirstInputBlock( kAliHLTDataTypeSOR ) || GetFirstInputBlock( kAliHLTDataTypeEOR ) )
105 return 0;
9cafabed 106 return AliHLTTRDTrackerV1Component::DoEvent(evtData, blocks, trigData, outputPtr, size, outputBlocks );
107}